Skip to content

Commit 648910e

Browse files
authored
Merge pull request github#5285 from adityasharad/actions/docs-review
Actions: Add workflow to request docs review
2 parents 0eb2c06 + dbed4a1 commit 648910e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/docs-review.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# When a PR is labelled with 'ready-for-docs-review',
2+
# this workflow comments on the PR to notify the GitHub CodeQL docs team.
3+
name: Request docs review
4+
on:
5+
# Runs in the context of the base repo.
6+
# This gives the workflow write access to comment on PRs.
7+
# The workflow should not check out or build the given ref,
8+
# or use untrusted data from the event payload in a command line.
9+
pull_request_target:
10+
types: [labeled]
11+
12+
jobs:
13+
request-docs-review:
14+
name: Request docs review
15+
# Run only on labelled PRs to the main repository.
16+
# Do not run on PRs to forks.
17+
if:
18+
github.event.label.name == 'ready-for-docs-review'
19+
&& github.event.pull_request.draft == false
20+
&& github.event.pull_request.base.repo.full_name == 'github/codeql'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Comment to request docs review
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
PR_NUMBER: ${{ github.event.pull_request.number }}
27+
run: |
28+
gh pr comment "$PR_NUMBER" --repo "github/codeql" \
29+
--body "Hello @github/docs-content-codeql: this PR is ready for docs review."

0 commit comments

Comments
 (0)