Create docs-reminder.yml #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs Reminder Auto Comment | |
on: [pull_request] | |
jobs: | |
check-and-comment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Organization Membership | |
id: check_membership | |
run: | | |
ORG_MEMBER=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
"https://api.github.com/orgs/runpod/members/${{ github.event.pull_request.user.login }}" \ | |
-o /dev/null -w '%{http_code}\n' -s) | |
echo "ORG_MEMBER=$ORG_MEMBER" >> $GITHUB_ENV | |
echo "::set-output name=is_member::$(if [ "$ORG_MEMBER" = "204" ]; then echo "true"; else echo "false"; fi)" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Auto Comment if Member | |
if: steps.check_membership.outputs.is_member == 'true' | |
uses: wow-actions/auto-comment@v1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
pullRequestOpened: | | |
👋 Hi @{{ author }}, | |
If your PR contains any user-facing changes please flag it for documentation. | |
Submit a doc request [here](https://linear.app/runpod/team/TW/backlog). | |
Thanks! |