1
0
mirror of synced 2025-12-26 14:02:45 -05:00
Files
docs/.github/workflows/hubber-contribution-help.yml
2025-04-30 18:58:01 +00:00

56 lines
2.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 nonDocs 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_BASE }}
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 }}