Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

chore(gha): comment on PR about reviews #4

chore(gha): comment on PR about reviews

chore(gha): comment on PR about reviews #4

name: Notion Migration
on:
pull_request:
types: [opened, reopened]
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: ":warning: As we're migrating to Notion, we want to make sure that changes to the handbook are absolutely necessary. To ensure it is the case, it's now mandatory to get an approving review to merge a pull request.\n\nExamples\n\n- Setting up a redirection to a Notion page: PR will be approved.\n- Correcting an important mistake on a page that doesn't have an equivalent yet: PR will be approved.\n- Updating content that isn't mission critical: PR will be rejected."
})
octokit.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
reviewers: ["madisongclark"]
});