Skip to content

Commit 13edfd8

Browse files
committed
Merge branch 'main' into jules-4795
2 parents 0e8ab63 + 1f71206 commit 13edfd8

4,509 files changed

Lines changed: 10141 additions & 113045 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ See our [CONTRIBUTING.md](/main/CONTRIBUTING.md) for information how to contribu
55
66
For changes to content in [site policy](https://github.com/github/docs/tree/main/content/github/site-policy), see the [CONTRIBUTING guide in the site-policy repo](https://github.com/github/site-policy/blob/main/CONTRIBUTING.md).
77
8-
We cannot accept changes to our translated content right now. See the [contributing.md](/main/CONTRIBUTING.md#earth_asia-translations) for more information.
8+
We cannot accept changes to our translated content right now. See the [types-of-contributions.md](/main/contributing/types-of-contributions.md#earth_asia-translations) for more information.
99
1010
Thanks again!
1111
-->

.github/actions-scripts/create-enterprise-issue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async function run() {
8686
'utf8'
8787
)
8888
const issueLabels =
89-
milestone === 'release' ? ['enterprise release'] : ['enterprise deprecation', 'priority-3']
89+
milestone === 'release' ? ['enterprise release'] : ['enterprise deprecation', 'priority-4', 'batch', 'time sensitive']
9090
const issueTitle = `[${nextMilestoneDate}] Enterprise Server ${versionNumber} ${milestone} (technical steps)`
9191

9292
const issueBody = `GHES ${versionNumber} ${milestone} occurs on ${nextMilestoneDate}.

.github/actions-scripts/projects.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,13 @@ export function generateUpdateProjectNextItemFieldMutation({
164164
function generateMutationToUpdateField({ item, fieldID, value, literal = false }) {
165165
const parsedValue = literal ? `value: "${value}"` : `value: ${value}`
166166

167-
// Strip "=" out of the item ID when creating the mutation ID to avoid a GraphQL parsing error
167+
// Strip all non-alphanumeric out of the item ID when creating the mutation ID to avoid a GraphQL parsing error
168168
// (statistically, this should still give us a unique mutation ID)
169169
return `
170-
set_${fieldID.substr(1)}_item_${item.replaceAll('=', '')}: updateProjectNextItemField(input: {
170+
set_${fieldID.substr(1)}_item_${item.replaceAll(
171+
/[^a-z0-9]/g,
172+
''
173+
)}: updateProjectNextItemField(input: {
171174
projectId: $project
172175
itemId: "${item}"
173176
fieldId: ${fieldID}

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ updates:
99
- package-ecosystem: 'github-actions'
1010
directory: '/'
1111
schedule:
12-
interval: weekly
12+
interval: monthly

.github/workflows/crowdin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
- name: Sync
2828
uses: crowdin/github-action@d7f217268068f1244883a993379d62d816f84f25
2929
with:
30+
# This option enables the transfer of existing translations in this project to Crowdin.
31+
# We explicitly set this to `false` since we only want to use the downloaded translations managed by Crowdin.
3032
upload_translations: false
3133
download_translations: true
3234
create_pull_request: true

.github/workflows/move-reopened-issues-to-triage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ jobs:
3737
}
3838
}
3939
} catch(e) {
40-
console.log(error);
40+
console.log(e);
4141
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Notify When Maintainers Cannot Edit
2+
3+
# **What it does**: Notifies the author of a PR when their PR does not allow maintainers to edit it.
4+
# **Why we have it**: To prevent having to do this manually.
5+
# **Who does it impact**: Open-source.
6+
7+
on:
8+
pull_request_target:
9+
types:
10+
- opened
11+
12+
permissions:
13+
pull-requests: write
14+
15+
jobs:
16+
notify-when-maintainers-cannot-edit:
17+
if: github.repository == 'github/docs'
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
21+
with:
22+
script: |
23+
const query = `
24+
query($number: Int!) {
25+
repository(owner: "github", name: "docs") {
26+
pullRequest(number: $number) {
27+
headRepositoryOwner {
28+
login
29+
}
30+
maintainerCanModify
31+
}
32+
}
33+
}
34+
`;
35+
36+
const pullNumber = context.issue.number;
37+
const variables = { number: pullNumber };
38+
39+
try {
40+
console.log(`Check github/docs#${pullNumber} for maintainer edit access ...`);
41+
const result = await github.graphql(query, variables);
42+
43+
console.log(JSON.stringify(result, null, 2));
44+
45+
const pullRequest = result.repository.pullRequest;
46+
47+
if (pullRequest.headRepositoryOwner.login === 'github') {
48+
console.log('PR owned by github');
49+
return;
50+
}
51+
52+
if (!pullRequest.maintainerCanModify) {
53+
console.log('PR not owned by github and does not have maintainer edits enabled');
54+
55+
await github.issues.createComment({
56+
issue_number: pullNumber,
57+
owner: 'github',
58+
repo: 'docs',
59+
body: "Thanks for submitting a PR to the GitHub Docs project!\n\nIn order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. For information on how to do this, [see the documentation](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)."
60+
});
61+
}
62+
} catch(e) {
63+
console.log(e);
64+
}

.github/workflows/staging-deploy-pr.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,18 @@ jobs:
7979
name: prRepoName
8080
}
8181
} = run
82-
const headLabel = `${prRepoOwner}:${headBranch}`
8382
8483
const prIsInternal = owner === prRepoOwner && repo === prRepoName
84+
let headLabel = `${prRepoOwner}:${headBranch}`
85+
86+
// If the PR is external, prefix its head branch name with the
87+
// forked repo owner's login and their fork repo name e.g.
88+
// "octocat/my-fork:docs". We need to include the fork repo
89+
// name as well to account for an API issue (this will work fine
90+
// if they don't have a different fork repo name).
91+
if (!prIsInternal) {
92+
headLabel = `${prRepoOwner}/${prRepoName}:${headBranch}`
93+
}
8594
8695
// If the PR is external, prefix its head branch name with the
8796
// forked repo owner's login, e.g. "octocat:docs"

.github/workflows/triage-issues.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
permissions:
1414
issues: write
15+
repository-projects: write
1516

1617
jobs:
1718
triage_issues:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approacha
66

77
In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.
88

9-
Use the table of contents icon <img src="./assets/images/table-of-contents.png" width="25" height="25" /> on the top left corner of the this document to get to a specific section of this guide quickly.
9+
Use the table of contents icon <img src="./assets/images/table-of-contents.png" width="25" height="25" /> on the top left corner of this document to get to a specific section of this guide quickly.
1010

1111
## New contributor guide
1212

0 commit comments

Comments
 (0)