Skip to content

Commit

Permalink
Merge branch 'repo-sync' of https://github.com/github/docs-internal i…
Browse files Browse the repository at this point in the history
…nto repo-sync
  • Loading branch information
rachmari committed Sep 14, 2021
2 parents ced6456 + 8de7d03 commit 73cc877
Show file tree
Hide file tree
Showing 1,196 changed files with 1,510,958 additions and 941,654 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/improve-existing-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Improve existing content.
name: Improve existing content
description: Make a suggestion to improve the content in an existing article.
labels:
- content
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Partner-owned product documentation.
name: Partner-owned product documentation
description: Initiate a set of tasks to be completed by a GitHub partner wishing to document how their product works with GitHub.
labels:
- partner
Expand Down
5 changes: 2 additions & 3 deletions .github/actions-scripts/create-enterprise-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ async function run() {
),
'utf8'
)
const issueLabels = milestone === 'release'
? ['enterprise release']
: ['enteprise deprecation', 'priority-3']
const issueLabels =
milestone === 'release' ? ['enterprise release'] : ['enterprise deprecation', 'priority-3']
const issueTitle = `[${nextMilestoneDate}] Enterprise Server ${versionNumber} ${milestone} (technical steps)`

const issueBody = `GHES ${versionNumber} ${milestone} occurs on ${nextMilestoneDate}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ The day after a GHES version's [deprecation date](https://github.com/github/docs

**Note**: Do each step below in a separate PR. Only move on to the next step when the previous PR has been merged.

## Step 0: Remove deprecated version numbers from docs-content issue forms

**Note**: This step can be performed independently of all other steps, and can be done several days before or along with the other steps.

- [ ] In the `docs-content` repo, remove the deprecated GHES version number from the "Specific GHES version(s)" section in the following files (in the `.github/ISSUE_TEMPLATE/` directory): [`release-tier-1-or-2-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml) and [`release-tier-3-or-tier-4.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml).
- [ ] When the PR is approved, merge it in. This can be merged independently from all other steps.

## Step 1: Scrape the docs and archive the files

- [ ] In your checkout of the [repo with archived GHES content](https://github.com/github/help-docs-archived-enterprise-versions), create a new branch: `git checkout -b deprecate-<version>`
Expand Down Expand Up @@ -58,3 +65,4 @@ In your `docs-internal` checkout:
- [ ] Open a PR with the results. The diff may be large and complex, so make sure to get a review from `@github/docs-content`.
- [ ] Debug any test failures or unexpected results.
- [ ] When the PR is approved, merge it in to complete the deprecation. This can be merged independently from step 5.
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,8 @@ This file should be automatically updated, but you can also run `script/update-e
- [ ] Remove `[DO NOT MERGE]` and other meta information from the PR title 😜.
- [ ] The `github/docs-internal` repo is frozen, and the `Repo Freeze Check / Prevent merging during deployment freezes (pull_request_target)` test is expected to fail. Use admin permissions to ship the release branch with this failure.
- [ ] Do any required smoke tests.
- [ ] Push the search index LFS objects for the public `github/docs` repo. The LFS objects were already being pushed for the internal repo after the `sync-english-index-for-<PLAN@RELEASE>` was added to the megabranch. To push the LFS objects, run the [search sync workflow](https://github.com/github/docs-internal/actions/workflows/sync-search-indices.yml) with the following inputs:
version: `enterprise-server@<RELEASE>`
language: `en`
- [ ] Once smoke tests have passed, you can [unfreeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) and post an announcement in Slack.
- [ ] After the release, in the `docs-content` repo, add the now live version number to the "Specific GHES version(s)" section in the following files: [`.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml) and [`.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml). When the PR is approved, merge it in.
4 changes: 3 additions & 1 deletion .github/actions-scripts/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ export function generateUpdateProjectNextItemFieldMutation({
function generateMutationToUpdateField({ item, fieldID, value, literal = false }) {
const parsedValue = literal ? `value: "${value}"` : `value: ${value}`

// Strip "=" out of the item ID when creating the mutation ID to avoid a GraphQL parsing error
// (statistically, this should still give us a unique mutation ID)
return `
set_${fieldID.substr(1)}_item_${item}: updateProjectNextItemField(input: {
set_${fieldID.substr(1)}_item_${item.replaceAll('=', '')}: updateProjectNextItemField(input: {
projectId: $project
itemId: "${item}"
fieldId: ${fieldID}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/add-review-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ jobs:
if: github.event.label.name == 'add-review-template' && github.repository == 'github/docs-internal'

steps:
- name: check out repo content
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Download the template file
uses: Bhacaz/checkout-files@c8f01756bfd894ba746d5bf48205e19000b0742b
with:
files: .github/review-template.md
token: ${{ secrets.GITHUB_TOKEN }}

# Jump through some hoops to work with a multi-line file
- name: Store review template in variable
Expand All @@ -31,6 +34,6 @@ jobs:
run: |
gh pr comment $PR --body "$TEMPLATE"
env:
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
GITHUB_TOKEN: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
PR: ${{ github.event.pull_request.html_url }}
TEMPLATE: ${{ env.TEMPLATE }}
2 changes: 1 addition & 1 deletion .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/check-all-english-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
FIRST_RESPONDER_PROJECT: Docs content first responder
REPORT_AUTHOR: docubot
REPORT_LABEL: broken link report
REPORT_REPOSITORY: github/docs-content
Expand All @@ -25,7 +26,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm
- name: npm ci
run: npm ci
Expand Down Expand Up @@ -80,26 +81,28 @@ jobs:
gh issue comment ${{ env.NEW_REPORT_URL }} --body "⬅️ [Previous report]($previous_report_url)"
# Link to the newer report from any older report that is still open,
# then close the older report.
# If an old report is open and assigned to someone, link to the newer
# report without closing the old report.
for issue_url in $(gh list-reports \
--search 'no:assignee' \
--json url \
--jq '.[].url'); do
--json assignees,url \
--jq '.[] | select (.assignees != []) | .url'); do
if [ "$issue_url" != "${{ env.NEW_REPORT_URL }}" ]; then
gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})"
gh issue close $issue_url
fi
done
# If an old report is open and assigned to someone, link to the newer
# report without closing the old report.
# Link to the newer report from any older report that is still open,
# then close the older report and remove it from the first responder's
# project board.
for issue_url in $(gh list-reports \
--json assignees,url \
--jq '.[] | select (.assignees != []) | .url'); do
--search 'no:assignee' \
--json url \
--jq '.[].url'); do
if [ "$issue_url" != "${{ env.NEW_REPORT_URL }}" ]; then
gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})"
gh issue close $issue_url
gh issue edit $issue_url --remove-project "${{ env.FIRST_RESPONDER_PROJECT }}"
fi
done
29 changes: 29 additions & 0 deletions .github/workflows/close-on-invalid-label.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Close issue/PR on adding invalid label

on:
issues:
types: [labeled]
pull_request_target:
types: [labeled]

permissions:
issues: write
pull-requests: write

jobs:
close-on-adding-invalid-label:
if: github.repository == 'github/docs' && github.event.label.name == 'invalid'
runs-on: ubuntu-latest

steps:
- name: Close issue
if: ${{ github.event_name == 'issues' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh issue close ${{ github.event.issue.html_url }}

- name: Close PR
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr close ${{ github.event.pull_request.html_url }}
40 changes: 24 additions & 16 deletions .github/workflows/content-changes-table-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down Expand Up @@ -71,18 +71,25 @@ jobs:
head: context.payload.pull_request.head.sha
})
let changedFiles = response.data.files
.map(e => e.filename)
.filter(file => file.startsWith('content/') && !file.includes('index'))
let markdownTable = '| **Article in Staging** | **Live Article** | **Source** | **Changes** |\n| ----------- | ----------- | ----------- | ----------- |\n'
for (let file of changedFiles) {
file = file.split('content')[1]
const fileURL = file.substring(0, file.length-3)
const stagingLink = `https://${stagingPrefix}.herokuapp.com${fileURL}`
let fileTitle = file.split('/').pop()
fileTitle = fileTitle.substring(0, fileTitle.length - 3)
const markdownLine = '| [' + fileTitle + '](' + stagingLink + ') | [' + fileTitle + '](https://docs.github.com' + fileURL + ') | | |\n'
const files = response.data.files
let markdownTable = '| **Source** | **Staging** | **Production** | **What Changed** |\n|:----------- |:----------- |:----------- |:----------- |\n'
const pathPrefix = 'content/'
const articleFiles = files.filter(({ filename }) => filename.startsWith(pathPrefix) && !filename.endsWith('/index.md'))
for (const file of articleFiles) {
const sourceUrl = file.blob_url
const fileName = file.filename.slice(pathPrefix.length)
const fileUrl = fileName.slice(0, fileName.lastIndexOf('.'))
const stagingLink = `https://${stagingPrefix}.herokuapp.com/${fileUrl}`
const productionLink = `https://docs.github.com/${fileUrl}`
let markdownLine = ''
if (file.status === 'modified') {
markdownLine = `| [content/${fileName}](${sourceUrl}) | [Modified](${stagingLink}) | [Original](${productionLink}) | |\n`
} else if (file.status === 'added') {
markdownLine = `| New file: [content/${fileName}](${sourceUrl}) | [Modified](${stagingLink}) | | |\n`
}
markdownTable += markdownLine
}
Expand All @@ -102,16 +109,17 @@ jobs:
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '## ⚠️ Automatically generated comment ⚠️'
body-includes: '<!-- MODIFIED_CONTENT_LINKING_COMMENT -->'

- name: Update comment
uses: peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## ⚠️ Automatically generated comment ⚠️
**This comment is automatically generated and will be overwritten the every time changes are committed to this branch.**
<!-- MODIFIED_CONTENT_LINKING_COMMENT -->
## Automatically generated comment ℹ️
**This comment is automatically generated and will be overwritten every time changes are committed to this branch.**
The table contains an overview of files in the `content` directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the `data` directory will not show up in this table.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/docs-review-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ name: Add docs-reviewers request to the docs-content review board
on:
workflow_dispatch:
schedule:
- cron: '25 4 * * *'
- cron: '50 */6 * * *'

permissions:
contents: read

jobs:
add-requests-to-board:
name: Add requests to board
if: ${{ github.repository == 'github/docs-internal' }}
runs-on: ubuntu-latest

steps:
Expand All @@ -21,7 +25,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enterprise-dates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install Node.js dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enterprise-release-sync-search-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/js-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check-dotcom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check-ghae.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check-ghes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/open-enterprise-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openapi-decorate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openapi-schema-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pa11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ping-staging-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm
- name: npm ci
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ready-for-doc-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
node-version: 16.8.x
cache: npm

- name: Install dependencies
Expand Down
Loading

0 comments on commit 73cc877

Please sign in to comment.