Create docs-reminder.yml #2
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/YOUR_ORG_NAME/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 }}, | |
Please ensure any user-facing changes are flagged for documentation. | |
**Quick Checklist:** | |
- **User-facing?** Submit a doc request [here](https://linear.app/runpod/team/TW/backlog). | |
Let's keep our docs as up-to-date as our code. Need help? Tag the doc team or drop a comment here. | |
Thanks for helping us maintain great documentation for our users! |