From d64a3e98b846984197780929699da07ff4b42fdf Mon Sep 17 00:00:00 2001 From: FredrikOseberg Date: Mon, 9 Dec 2024 15:17:15 +0100 Subject: [PATCH] feat: add core feature alert --- .github/workflows/core-feature-alert.yml | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/core-feature-alert.yml diff --git a/.github/workflows/core-feature-alert.yml b/.github/workflows/core-feature-alert.yml new file mode 100644 index 0000000000..f23f18cfa0 --- /dev/null +++ b/.github/workflows/core-feature-alert.yml @@ -0,0 +1,28 @@ +name: Core Feature Alert + +on: + pull_request: + paths: + - src/features/client-feature-toggles + - src/features/frontend-api + +jobs: + notify-core-changes: + runs-on: ubuntu-latest + + steps: + - name: Fetch PR Creator's Username + id: pr-creator + run: echo "PR_CREATOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV + + - name: Post a notification about core feature changes + uses: actions/github-script@v6 + with: + script: | + const prCreator = process.env.PR_CREATOR; + github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + body: `@FredrikOseberg, @${prCreator}, core features have been modified in this pull request. Please review!` + }) \ No newline at end of file