From b822d2aa4307a31624faa77249e36b2d49571529 Mon Sep 17 00:00:00 2001 From: Jean-Hadrien Chabran Date: Tue, 14 May 2024 12:18:12 +0200 Subject: [PATCH 1/2] chore(gha): comment on PR about reviews --- .github/workflows/notion-migration.yaml | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/notion-migration.yaml diff --git a/.github/workflows/notion-migration.yaml b/.github/workflows/notion-migration.yaml new file mode 100644 index 000000000000..51a41f7dfc0b --- /dev/null +++ b/.github/workflows/notion-migration.yaml @@ -0,0 +1,26 @@ +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.\n\nSourcegraphers: Reach out to [#wg-notion](https://sourcegraph.slack.com/archives/C06T68DBMSA) if you have any question." + }) + + github.rest.pulls.requestReviewers({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + reviewers: ["madisongclark"] + }); From f793ebc0e4860dc69a86862a92e59cbfe0af54f2 Mon Sep 17 00:00:00 2001 From: Jean-Hadrien Chabran Date: Tue, 14 May 2024 13:52:55 +0200 Subject: [PATCH 2/2] Use callout instead --- .github/workflows/notion-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notion-migration.yaml b/.github/workflows/notion-migration.yaml index 51a41f7dfc0b..5f4b4c70055e 100644 --- a/.github/workflows/notion-migration.yaml +++ b/.github/workflows/notion-migration.yaml @@ -15,7 +15,7 @@ jobs: 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.\n\nSourcegraphers: Reach out to [#wg-notion](https://sourcegraph.slack.com/archives/C06T68DBMSA) if you have any question." + body: "> [!WARNING] \n> 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.\n\nSourcegraphers: Reach out to [#wg-notion](https://sourcegraph.slack.com/archives/C06T68DBMSA) if you have any question." }) github.rest.pulls.requestReviewers({