Skip to content

Commit 8976b53

Browse files
authored
Merge branch 'main' into update-billing-topics
2 parents 7f487f7 + 705ae14 commit 8976b53

169 files changed

Lines changed: 8638 additions & 4770 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ Thanks again!
2525
- [ ] I have reviewed my changes in staging. (look for the **deploy-to-heroku** link in your pull request, then click **View deployment**)
2626
- [ ] For content changes, I have reviewed the [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md)
2727
- [ ] For content changes, I have reviewed the [Content style guide for GitHub Docs](https://github.com/github/docs/blob/main/contributing/content-style-guide.md).
28+
29+
### Writer impact (This section is for GitHub staff members only):
30+
31+
- [ ] This pull request impacts the contribution experience
32+
- [ ] I have added the 'writer impact' label
33+
- [ ] I have added a description and/or a video demo of the changes below (eg. a "before and after video")
34+
35+
<!-- Description of the writer impact here -->
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Copy to REST API issue to docs-content
2+
3+
# **What it does**: Copies an issue in the open source repo to the docs-content repo, comments on and closes the original issue
4+
# **Why we have it**: REST API updates cannot be made in the open source repo. Instead, we copy the issue to an internal issue (we do not transfer so that the issue does not disappear for the contributor) and close the original issue.
5+
# **Who does it impact**: Open source and docs-content maintainers
6+
7+
on:
8+
issues:
9+
types:
10+
- labeled
11+
12+
jobs:
13+
transfer-issue:
14+
name: Transfer issue
15+
runs-on: ubuntu-latest
16+
if: github.event.label.name == 'rest-description' && github.repository == 'github/docs'
17+
steps:
18+
- name: Check if this run was triggered by a member of the docs team
19+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
20+
id: triggered-by-member
21+
with:
22+
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
23+
result-encoding: string
24+
script: |
25+
const triggerer_login = context.payload.sender.login
26+
const teamMembers = await github.request(
27+
`/orgs/github/teams/docs/members?per_page=100`
28+
)
29+
const logins = teamMembers.data.map(member => member.login)
30+
if (logins.includes(triggerer_login)) {
31+
console.log(`This workflow was triggered by ${triggerer_login} (on the docs team).`)
32+
return 'true'
33+
}
34+
console.log(`This workflow was triggered by ${triggerer_login} (not on the docs team), so no action will be taken.`)
35+
return 'false'
36+
37+
- name: Exit if not triggered by a docs team member
38+
if: steps.triggered-by-member.outputs.result == 'false'
39+
run: |
40+
echo Aborting. This workflow must be triggered by a member of the docs team.
41+
exit 1
42+
43+
- name: Create an issue in the docs-content repo
44+
run: |
45+
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/docs-content)"
46+
echo 'NEW_ISSUE='$new_issue_url >> $GITHUB_ENV
47+
env:
48+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
49+
ISSUE_TITLE: ${{ github.event.issue.title }}
50+
ISSUE_BODY: ${{ github.event.issue.body }}
51+
52+
- name: Comment on the new issue
53+
run: gh issue comment $NEW_ISSUE --body "This issue was originally opened in the open source repo as $OLD_ISSUE"
54+
env:
55+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
56+
NEW_ISSUE: ${{ env.NEW_ISSUE }}
57+
OLD_ISSUE: ${{ github.event.issue.html_url }}
58+
59+
- name: Comment on the old issue
60+
run: gh issue comment $OLD_ISSUE --body "Thank you for opening this issue! Updates to the REST API description must be made internally. I have copied your issue to an internal issue, so I will close this issue."
61+
env:
62+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
63+
OLD_ISSUE: ${{ github.event.issue.html_url }}
64+
65+
- name: Close the old issue
66+
run: gh issue close $OLD_ISSUE
67+
env:
68+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
69+
OLD_ISSUE: ${{ github.event.issue.html_url }}
115 KB
Loading
-39.3 KB
Loading
-31.8 KB
Loading
30.7 KB
Loading
42.4 KB
Loading
42.4 KB
Loading

content/actions/guides/adding-labels-to-issues.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ In the tutorial, you will first make a workflow file that uses the [`andymckay/l
4646
uses: andymckay/labeler@1.0.2
4747
with:
4848
add-labels: "triage"
49+
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
4950
```
5051
5152
4. Customize the parameters in your workflow file:

content/actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ In the tutorial, you will first make a workflow file that uses the [`andymckay/l
4848
uses: andymckay/labeler@master
4949
with:
5050
remove-labels: "needs review"
51+
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
5152
```
5253
5354
5. Customize the parameters in your workflow file:

0 commit comments

Comments
 (0)