1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
unleash.unleash/.github/workflows/core-feature-alert.yml

42 lines
1.3 KiB
YAML
Raw Normal View History

2024-12-09 15:17:15 +01:00
name: Core Feature Alert
on:
pull_request:
2024-12-09 15:38:42 +01:00
types:
- opened
- synchronize
2024-12-09 15:17:15 +01:00
paths:
2024-12-09 15:28:43 +01:00
- src/lib/features/client-feature-toggles/*
- src/lib/features/frontend-api/*
2024-12-09 15:49:10 +01:00
2024-12-09 15:17:15 +01:00
jobs:
2024-12-09 15:50:21 +01:00
notify-core-changes:
2024-12-09 15:17:15 +01:00
runs-on: ubuntu-latest
steps:
2024-12-09 15:50:21 +01:00
- name: Fetch PR Creator's Username
id: pr-creator
run: echo "PR_CREATOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
2024-12-09 15:17:15 +01:00
2024-12-09 15:50:21 +01:00
- name: Post a notification about core feature changes
2024-12-09 15:17:15 +01:00
uses: actions/github-script@v6
with:
script: |
2024-12-09 15:50:21 +01:00
const prCreator = process.env.PR_CREATOR;
github.rest.issues.createComment({
2024-12-09 15:17:15 +01:00
owner: context.repo.owner,
repo: context.repo.repo,
2024-12-09 15:50:21 +01:00
issue_number: context.payload.pull_request.number,
body: `@${prCreator}, core features have been modified in this pull request. Please review!`
})
2024-12-09 15:51:24 +01:00
# - name: Add reviewers to the PR
# uses: actions/github-script@v6
# with:
# script: |
# const reviewers = ['FredrikOseberg'];
# github.rest.pulls.requestReviewers({
# owner: context.repo.owner,
# repo: context.repo.repo,
# pull_number: context.payload.pull_request.number,
# reviewers: reviewers,
# });