Skip to content

Commit 4b746d0

Browse files
authored
Merge branch 'main' into prerender-gql-input-objects
2 parents 70c1f1f + bc0a7ff commit 4b746d0

44 files changed

Lines changed: 105 additions & 124 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/actions-scripts/enterprise-server-issue-templates/release-issue.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,21 @@
3434
```
3535
☝️ This will run a workflow **on every push to the PR** that will sync **only** the English index for the new version to Algolia. This will make the GHES content searchable on staging throughout content creation, and will ensure the search updates go live at the same time the content is published. See [`contributing/search.md`](https://github.com/github/docs-internal/blob/main/contributing/search.md) for details.
3636
37-
- [ ] Create an OpenAPI topic branch
38-
39-
This branch is used to avoid propagating the OpenAPI dev mode check CI test failure in all of the branches. All changes that affect the OpenAPI schema should branch off of this topic branch. The tests should all be passing before the OpenAPI topic branch is merged into the megabranch.
40-
41-
For more information about how OpenAPI changes are published to docs.github.com, see [Publishing REST API changes to docs.github.com](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/publishing-documentation/publishing-REST-api-docs.md#publishing-rest-api-changes-to-docsgithubcom).
42-
4337
- [ ] In `github/github`, to create a new GHES release follow these steps:
4438
- [ ] Copy the previous release's root document to a new root document for this release `cp app/api/description/ghes-<LATEST RELEASE NUMBER>.yaml app/api/description/ghes-<NEXT RELEASE NUMBER>.yaml`.
4539
- [ ] Update the `externalDocs.url` property in that file to use the new GHES release number.
4640
- [ ] Copy the previous release's configuration file to a new configuration file for this release `cp app/api/description/config/releases/ghes-<LATEST RELEASE NUMBER>.yaml app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml`.
4741
- [ ] Update the `variables.externalDocsUrl`, `variables.ghesVersion`, and `patch.[].value.url` in that file to use the new GHES release number.
4842
- [ ] Update `published` in that file to `false`. **Note:** This is important to ensure that 3.1 OpenAPI changes are not made public until 3.1 is released.
4943
44+
#### Troubleshooting
45+
46+
If the `OpenAPI dev mode check / check-schema-versions` check fails on the release branch, in your local checkout of the mega branch:
47+
48+
- run `git checkout origin/main lib/rest/static/*`
49+
- run `script/rest/update-files.js --decorate-only`
50+
- push the resulting changes
51+
5052
### Before shipping the release branch
5153
5254
- [ ] Add the GHES release notes to `data/release-notes/` and update the versioning frontmatter in `content/admin/release-notes.md` to `enterprise-server: '<=<RELEASE>'`

.github/workflows/open-enterprise-issue.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Open Enterprise release or deprecation issue
22

3+
# **What it does**: Checks if there is an Enterprise release or deprecation upcoming, and if so, opens an issue with the tasks to be completed.
4+
# **Why we have it**: GHES releases and deprecations run on a predictable schedule, so we can automate some of the project management aspects.
5+
# **Who does it impact**: Docs engineering, docs content.
6+
37
on:
48
schedule:
59
- cron: '49 14 * * *' # At 14:49 UTC daily

.github/workflows/repo-sync.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
destination_branch: main
116116
pr_title: 'repo sync'
117117
pr_body: "This is an automated pull request to sync changes between the public and private repos.\n\n:robot: This pull request should be merged (not squashed) to preserve continuity across repos, so please let a bot do the merging!"
118-
pr_label: automerge,autoupdate,automated-reposync-pr
118+
pr_label: autoupdate,automated-reposync-pr
119119
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
120120

121121
- name: Find pull request
@@ -139,7 +139,7 @@ jobs:
139139
if: ${{ steps.find-pull-request.outputs.number }}
140140
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
141141
with:
142-
github-token: ${{ secrets.GITHUB_TOKEN }}
142+
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
143143
script: |
144144
const mainHeadSha = await github.git.getRef({
145145
...context.repo,
@@ -163,6 +163,41 @@ jobs:
163163
console.log(`Branch is already up-to-date`)
164164
}
165165
166+
- name: Enable GitHub auto-merge
167+
if: ${{ steps.find-pull-request.outputs.number }}
168+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
169+
with:
170+
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
171+
script: |
172+
const pull = await github.pulls.get({
173+
...context.repo,
174+
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
175+
})
176+
177+
const pullNodeId = pull.data.node_id
178+
console.log(`Pull request GraphQL Node ID: ${pullNodeId}`)
179+
180+
const mutation = `mutation ($id: ID!) {
181+
enablePullRequestAutoMerge(input: {
182+
pullRequestId: $id,
183+
mergeMethod: MERGE
184+
}) {
185+
clientMutationId
186+
}
187+
}`
188+
const variables = {
189+
id: pullNodeId
190+
}
191+
192+
const graph = await github.graphql(mutation, variables)
193+
console.log('GraphQL mutation result:\n' + JSON.stringify(graph))
194+
195+
if (graph.errors && graph.errors.length > 0) {
196+
console.error('ERROR! Failed to enable auto-merge:\n - ' + graph.errors.map(error => error.message).join('\n - '))
197+
} else {
198+
console.log('Auto-merge enabled!')
199+
}
200+
166201
- name: Send Slack notification if workflow fails
167202
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
168203
if: failure()
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Send Crowdin PRs to boards
22

3+
# **What it does**: Sends PRs opened on the crowdin branch to the ready for work column in this board: https://github.com/orgs/github/projects/1269#column-13447153
4+
# **Why we have it**: To make sure the first responder sees crowdin translations that need to be merged as they review the Task board.
5+
# **Who does it impact**: Docs localization and Docs Engineering
6+
37
on:
48
pull_request:
59
types:
@@ -14,7 +18,7 @@ jobs:
1418
with:
1519
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
1620
script: |
17-
var squadBoardColumnId = 13447153; // Add to the team backlog/squad board
21+
var squadBoardColumnId = 13447153; // Add to the team task board
1822
1923
try {
2024
await github.projects.createCard({
@@ -25,14 +29,3 @@ jobs:
2529
} catch (error) {
2630
console.log(error);
2731
}
28-
29-
var prBoardColumnId = 10095775; // Add to the pull requests board
30-
try {
31-
await github.projects.createCard({
32-
column_id: prBoardColumnId,
33-
content_id: context.payload.pull_request.id,
34-
content_type: "PullRequest"
35-
});
36-
} catch (error) {
37-
console.log(error);
38-
}

.github/workflows/send-issues-to-how-how-we-work-boards.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
continue-on-error: true
1818
steps:
19-
- if: contains(github.event.issue.labels.*.name, 'engineering') && !contains(github.event.issue.labels.*.name, 'feature') && !contains(github.event.issue.labels.*.name, 'epic')
19+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && !contains(github.event.issue.labels.*.name, 'feature') && !contains(github.event.issue.labels.*.name, 'epic')
2020
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
2121
with:
2222
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
@@ -31,7 +31,7 @@ jobs:
3131
} catch (error) {
3232
console.log(error);
3333
}
34-
- if: contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'feature')
34+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'feature')
3535
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
3636
with:
3737
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
@@ -46,7 +46,7 @@ jobs:
4646
} catch (error) {
4747
console.log(error);
4848
}
49-
- if: contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'epic')
49+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'epic')
5050
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
5151
with:
5252
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}

.github/workflows/send-prs-to-how-how-we-work-boards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
continue-on-error: true
1818
steps:
19-
- if: (github.repository == 'github/docs-internal' || github.repository == 'github/docs') && contains(github.event.pull_request.labels.*.name, 'feature')
19+
- if: (github.repository == 'github/docs-internal') && contains(github.event.pull_request.labels.*.name, 'feature')
2020
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
2121
with:
2222
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}

content/actions/guides/building-and-testing-nodejs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ We recommend that you have a basic understanding of Node.js, YAML, workflow conf
3737

3838
{% data variables.product.prodname_dotcom %} provides a Node.js workflow template that will work for most Node.js projects. This guide includes npm and Yarn examples that you can use to customize the template. For more information, see the [Node.js workflow template](https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml).
3939

40-
To get started quickly, add the template to the `.github/workflows` directory of your repository.
40+
To get started quickly, add the template to the `.github/workflows` directory of your repository. The workflow shown below assumes that the default branch for your repository is `main`.
4141

4242
{% raw %}
4343
```yaml{:copy}
4444
name: Node.js CI
4545
4646
on:
4747
push:
48-
branches: [ $default-branch ]
48+
branches: [ main ]
4949
pull_request:
50-
branches: [ $default-branch ]
50+
branches: [ main ]
5151
5252
jobs:
5353
build:

content/actions/guides/building-and-testing-ruby.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ We recommend that you have a basic understanding of Ruby, YAML, workflow configu
3131

3232
{% data variables.product.prodname_dotcom %} provides a Ruby workflow template that will work for most Ruby projects. For more information, see the [Ruby workflow template](https://github.com/actions/starter-workflows/blob/master/ci/ruby.yml).
3333

34-
To get started quickly, add the template to the `.github/workflows` directory of your repository.
34+
To get started quickly, add the template to the `.github/workflows` directory of your repository. The workflow shown below assumes that the default branch for your repository is `main`.
3535

3636
{% raw %}
3737
```yaml
3838
name: Ruby
3939

4040
on:
4141
push:
42-
branches: [ $default-branch ]
42+
branches: [ main ]
4343
pull_request:
44-
branches: [ $default-branch ]
44+
branches: [ main ]
4545

4646
jobs:
4747
test:
@@ -105,9 +105,9 @@ name: Ruby CI
105105
106106
on:
107107
push:
108-
branches: [ $default-branch ]
108+
branches: [ main ]
109109
pull_request:
110-
branches: [ $default-branch ]
110+
branches: [ main ]
111111
112112
jobs:
113113
test:
@@ -211,9 +211,9 @@ name: Matrix Testing
211211
212212
on:
213213
push:
214-
branches: [ $default-branch ]
214+
branches: [ main ]
215215
pull_request:
216-
branches: [ $default-branch ]
216+
branches: [ main ]
217217
218218
jobs:
219219
test:
@@ -272,11 +272,11 @@ name: Ruby Gem
272272
on:
273273
# Manually publish
274274
workflow_dispatch:
275-
# Alternatively, publish whenever changes are merged to the default branch.
275+
# Alternatively, publish whenever changes are merged to the `main` branch.
276276
push:
277-
branches: [ $default-branch ]
277+
branches: [ main ]
278278
pull_request:
279-
branches: [ $default-branch ]
279+
branches: [ main ]
280280

281281
jobs:
282282
build:

content/actions/learn-github-actions/sharing-workflows-with-your-organization.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ If you need to share workflows and other {% data variables.product.prodname_acti
2121

2222
### Creating a workflow template
2323

24-
Workflow templates can be created by users with write access to the organization's `.github` repository. The templates can then be used by organization members who have permission to create workflows. Workflow templates can be used to create new workflows in an organizations' public repositories; to use templates to create workflows in private repositories, the organization must be part of an enterprise or GitHub One plan.
24+
Workflow templates can be created by users with write access to the organization's `.github` repository. The templates can then be used by organization members who have permission to create workflows. Workflow templates can be used to create new workflows in an organizations' public repositories; to use templates to create workflows in private repositories, the organization must be part of an enterprise plan.
2525

2626
This procedure demonstrates how to create a workflow template and metadata file. The metadata file describes how the template is presented to users when they are creating a new workflow.
2727

2828
1. If it doesn't already exist, create a new public repository named `.github` in your organization.
29-
1. Create a directory named `workflow-templates`.
30-
1. Create your new workflow file inside the `workflow-templates` directory.
29+
2. Create a directory named `workflow-templates`.
30+
3. Create your new workflow file inside the `workflow-templates` directory.
3131

3232
If you need to refer to a repository's default branch, you can use the `$default-branch` placeholder. When a workflow is created using your template, the placeholder will be automatically replaced with the name of the repository's default branch.
3333

@@ -52,7 +52,7 @@ This procedure demonstrates how to create a workflow template and metadata file.
5252
- name: Run a one-line script
5353
run: echo Hello from Octo Organization
5454
```
55-
1. Create a metadata file inside the `workflow-templates` directory. The metadata file must have the same name as the workflow file, but instead of the `.yml` extension, it must be appended with `.properties.json`. For example, this file named `octo-organization-ci.properties.json` contains the metadata for a workflow file named `octo-organization-ci.yml`:
55+
4. Create a metadata file inside the `workflow-templates` directory. The metadata file must have the same name as the workflow file, but instead of the `.yml` extension, it must be appended with `.properties.json`. For example, this file named `octo-organization-ci.properties.json` contains the metadata for a workflow file named `octo-organization-ci.yml`:
5656
```yaml
5757
{
5858
"name": "Octo Organization Workflow",

content/developers/apps/creating-a-github-app-from-a-manifest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ You must complete this step of the GitHub App Manifest flow within one hour.
179179
{% data reusables.pre-release-program.api-preview-warning %}
180180
{% endif %}
181181

182-
POST /app-manifests/:code/conversions
182+
POST /app-manifests/{code}/conversions
183183

184184
For more information about the endpoint's response, see [Create a GitHub App from a manifest](/rest/reference/apps#create-a-github-app-from-a-manifest).
185185

0 commit comments

Comments
 (0)