Skip to content

Commit

Permalink
add: GitHub actions, check that reviewer has commented on PR + tag do…
Browse files Browse the repository at this point in the history
…cs PRs (#3788)

* Create docs-check.yml

* Update docs-check.yml

* Update docs-check.yml

* Create docs-tag.yml
  • Loading branch information
jessiemongeon1 authored Nov 21, 2024
1 parent 9c67472 commit 4217147
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Validate Docs PR comments
on:
issue_comment:
types: [created]
paths:
- docs/developer-docs/

jobs:
check_comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/github-script@v6
if: contains(github.event.comment.body, 'I agree that I have run the commands and code included in this PR and have confirmed their accuracy and functionality.')
with:
script: |
const comments = require('./.github/workflows/scripts/comments.js');
await comments.create(context, github, `PR content has been validated by a reviewer.`);
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/docs-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tag Docs PRs
on:
pull_request:
paths:
- docs/developer-docs/**
jobs:
docs-tag:
name: Tag PR with documentation
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Tag PR with documentation
run: |
gh pr edit ${{ github.event.pull_request.number }} --add-label documentation
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4217147

Please sign in to comment.