Skip to content

Repo sync

Repo sync #9511

name: Hubber contribution help
# **What it does**: When a PR is opened by a non-Docs team Hubber, adds a bot comment with helpful links
# **Why we have it**: To help non–Docs Hubbers navigate how to get a PR reviewed by the Docs team
# **Who does it impact**: docs-internal contributors
on:
pull_request:
types:
- opened
paths:
- .github/workflows/hubber-contribution-help.yml
- 'content/**'
- 'data/**'
permissions:
contents: read
pull-requests: write
jobs:
check-team-membership:
if: github.repository == 'github/docs-internal' && github.actor != 'github-openapi-bot' && github.actor != 'docs-bot'
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: membership_check
uses: actions/github-script@e69ef5462fd455e02edcaf4dd7708eda96b9eda0
with:
github-token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW_READORG }}
script: |
try {
await github.rest.teams.getMembershipForUserInOrg({
org: 'github',
team_slug: 'docs',
username: context.payload.sender.login,
});
return true
} catch(err) {
return false
}
- name: Comment on the PR
if: steps.membership_check.outputs.result == 'false'
run: |
gh pr comment $PR --body "### Next: add the review label
**🛎️ Is this PR ready for review?** A PR is ready for a docs review _after_ the self-review checklist is complete.
When this is ready for review, add the **\`ready-for-doc-review\`** label to this PR. The PR will then be automatically added to the [Docs Content review board](https://github.com/orgs/github/projects/2936). _Please allow at least 3 working days for a review, and longer if this is a substantial change._
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.pull_request.html_url }}