Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
55 lines
2.3 KiB
YAML
55 lines
2.3 KiB
YAML
name: Ready for docs-content review
|
|
|
|
# **What it does**: Adds pull requests in the docs-internal repository to the docs-content review board when the "ready-for-doc-review" label is added or when a review by docs-content or docs-reviewers is requested. This workflow is also called as a reusable workflow from other repos including docs-content, docs-strategy, docs-early-access, and github.
|
|
# **Why we have it**: So that other GitHub teams can easily request reviews from the docs-content team, and so that writers can see when a PR is ready for review
|
|
# **Who does it impact**: Writers who need to review docs-related PRs
|
|
|
|
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
with:
|
|
repository: github/docs-internal
|
|
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
|
with:
|
|
node-version-file: 'package.json'
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm install @octokit/graphql
|
|
|
|
- name: Set AUTHOR_LOGIN
|
|
run: |
|
|
if [[ "${{ github.event.pull_request.assignee.login && github.event.pull_request.user.login == 'docs-bot' }}" ]]; then
|
|
echo "AUTHOR_LOGIN=${{ github.event.pull_request.assignee.login }}" >> $GITHUB_ENV
|
|
else
|
|
echo "AUTHOR_LOGIN=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
|
|
fi
|
|
|
|
- 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 }}
|