Repository navigation
57 lines (49 loc) · 2.02 KB
/
Copy pathready-for-doc-review.yml
File metadata and controls
57 lines (49 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Ready for docs-content review
# GitHub repos other than docs can add PRs to the docs-content review board by label,
# team review request, or reusable workflow, so writers can find work ready for review.
on:
pull_request:
types: [labeled, review_requested]
workflow_call:
permissions:
contents: read
jobs:
request_doc_review:
name: Request a review from the docs-content team
if: >-
github.repository_owner == 'github' && github.repository != 'github/docs' &&
(github.event.label.name == 'ready-for-doc-review' || github.event.requested_team.name == 'docs-content' || github.event.requested_team.name == 'docs-reviewers')
runs-on: ubuntu-latest
steps:
- name: Check out repo content
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: github/docs-internal
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: 'package.json'
cache: npm
- name: Install dependencies
run: npm ci
- name: Set AUTHOR_LOGIN
run: |
if [[ "${IS_DOCS_BOT_ASSIGNEE}" == "true" ]]; then
echo "AUTHOR_LOGIN=${ASSIGNEE_LOGIN}" >> $GITHUB_ENV
else
echo "AUTHOR_LOGIN=${USER_LOGIN}" >> $GITHUB_ENV
fi
env:
IS_DOCS_BOT_ASSIGNEE: ${{ github.event.pull_request.assignee.login && github.event.pull_request.user.login == 'docs-bot' }}
ASSIGNEE_LOGIN: ${{ github.event.pull_request.assignee.login }}
USER_LOGIN: ${{ github.event.pull_request.user.login }}
- name: Run script
run: |
npm run ready-for-docs-review
env:
TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
PROJECT_NUMBER: 2936
ORGANIZATION: 'github'
ITEM_NODE_ID: ${{ github.event.pull_request.node_id }}
REPO: ${{ github.event.pull_request.base.repo.full_name }}