forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New workflow to aid internal contributions in PRs (github#21612)
Co-authored-by: Sarah Edwards <[email protected]>
- Loading branch information
1 parent
87e346a
commit 2a10e30
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
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: | ||
- 'content/**' | ||
- 'data/**' | ||
|
||
jobs: | ||
check-team-membership: | ||
if: github.repository == 'github/docs-internal' && github.actor != 'github-openapi-bot' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- id: membership_check | ||
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d | ||
with: | ||
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }} | ||
script: | | ||
try { | ||
await github.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 "Thanks so much for opening this PR and contributing to GitHub Docs! | ||
- When you're ready for the Docs team to review this PR, apply the **ready-for-doc-review** label and your PR will be added to the [Docs Content review board](https://github.com/orgs/github/memexes/901?layout=table&groupedBy%5BcolumnId%5D=11024). **Please factor in at least 72 hours for a review, even longer if this is a substantial change.** | ||
- If this is a major update to the docs, you might want to go back and open an [issue](https://github.com/github/docs-content/issues/new/choose) to ensure we've covered all areas of the docs in these updates. Not doing so may result in delays or inaccurate documentation." | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR: ${{ github.event.pull_request.html_url }} |
This file contains 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