Skip to content

Commit 053015b

Browse files
committed
Move onto existing action
1 parent 24db9ff commit 053015b

File tree

2 files changed

+16
-27
lines changed

2 files changed

+16
-27
lines changed

.github/workflows/pr-expectations.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/pr.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,19 @@ jobs:
1818
- uses: ./.github/actions/assign-pr
1919
with:
2020
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
22+
review_comment:
23+
name: Add review comment
24+
runs-on: ubuntu-latest
25+
steps:
26+
- id: check_if_contributor_is_external
27+
name: Check if contributor is external
28+
run: 'curl --write-out ''%{http_code}'' --silent --output /dev/null -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ env.GH_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/orgs/cloudflare/members/${{ github.event.pull_request.user.login }} | grep -q ''204'' && echo "is_external=false" >> $GITHUB_OUTPUT || echo "is_external=true" >> $GITHUB_OUTPUT'
29+
env:
30+
GH_TOKEN: ${{ secrets.HOLOPIN_LABELER }}
31+
- name: External comment
32+
run: gh pr comment "$NUMBER" --body "Howdy and thanks for contributing to our repo.\n\nWe generally get around to reviewing new, external PRs within **2 weeks**.\n\nIf it's been longer than then without any movement, try tagging the **Assignees** in a comment."
33+
if: steps.check_if_contributor_is_external.outputs.is_external == 'true'
34+
- name: Internal comment
35+
run: gh pr comment "$NUMBER" --body "Howdy and thanks for contributing to our repo.\n\nWe generally get around to reviewing internal PRs with **1 week**. If it's something urgent or has been sitting without any movement for more than that, start a thread in the `Developer Docs` space internally."
36+
if: steps.check_if_contributor_is_external.outputs.is_external == 'false'

0 commit comments

Comments
 (0)