* fix(actions): update workflows, add auto-approval * fix: apply suggestions from code review Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com> * fix: apply suggestions from code review Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com> Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
# This workflow allows us to reach the merging requirements
|
|
name: Deps update auto approval
|
|
on:
|
|
pull_request_target:
|
|
branches:
|
|
- 'main'
|
|
paths:
|
|
- 'docs/index.html'
|
|
- '.github/workflows/*.yml'
|
|
- 'client/package.json'
|
|
- 'client/plugins/**/package.json'
|
|
- 'curriculum/package.json'
|
|
- 'package.json'
|
|
- 'tools/**/package.json'
|
|
# - 'api-server/**/package.json'
|
|
|
|
jobs:
|
|
auto-approve-renovate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/github-script@v3
|
|
with:
|
|
github-token: ${{secrets.GITHUB_ACTIONS_CAMPERBOT_PA_TOKEN}}
|
|
script: |
|
|
if (context.payload.pull_request.user.login === "renovate[bot]") {
|
|
github.pulls.createReview({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
pull_number: context.issue.number,
|
|
event: 'APPROVE',
|
|
body: "To be approved by `@freeCodeCamp/dev-team`"
|
|
});
|
|
github.pulls.requestReviewers({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
pull_number: context.issue.number,
|
|
reviewers: ['raisedadead']
|
|
// team_reviewers: [`dev-team`]
|
|
});
|
|
}
|