Repo sync #11391
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - id: membership_check | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd | |
| 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 "## Requesting a review from the Docs team | |
| ### 🚧 Draft PRs | |
| To add the PR to the Docs Content review board, click **Ready for review** in the merge box. | |
| ### 🚀 Non-draft PRs | |
| The PR is **ready** and has automatically been added to the Docs Content review board. The docs team will review it as soon as possible. | |
| ### Lead time for review | |
| Please allow at least 3 business days for a Docs Content review. | |
| ### Need help? | |
| Reach out in [#docs-content](https://github-grid.enterprise.slack.com/archives/C0E9DK082) on Slack. | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR: ${{ github.event.pull_request.html_url }} |