Skip to content

Commit 238f597

Browse files
authored
Merge pull request #11690 from github/repo-sync
repo sync
2 parents bf304fb + 116df3a commit 238f597

File tree

7 files changed

+402
-5
lines changed

7 files changed

+402
-5
lines changed

content/actions/learn-github-actions/contexts.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Contexts are a way to access information about workflow runs, runner environment
4141
| `strategy` | `object` | Enables access to the configured strategy parameters and information about the current job. Strategy parameters include `fail-fast`, `job-index`, `job-total`, and `max-parallel`. |
4242
| `matrix` | `object` | Enables access to the matrix parameters you configured for the current job. For example, if you configure a matrix build with the `os` and `node` versions, the `matrix` context object includes the `os` and `node` versions of the current job. |
4343
| `needs` | `object` | Enables access to the outputs of all jobs that are defined as a dependency of the current job. For more information, see [`needs` context](#needs-context). |
44-
| `inputs` | `object` | Enables access to the inputs of reusable workflow. For more information, see [`inputs` context](#inputs-context). |
44+
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-4757 %}| `inputs` | `object` | Enables access to the inputs of reusable workflow. For more information, see [`inputs` context](#inputs-context). |{% endif %}
4545

4646
As part of an expression, you may access context information using one of two syntaxes.
4747
- Index syntax: `github['sha']`
@@ -149,6 +149,7 @@ The `needs` context contains outputs from all jobs that are defined as a depende
149149
| `needs.<job id>.outputs.<output name>` | `string` | The value of a specific output for a job that the current job depends on. |
150150
| `needs.<job id>.result` | `string` | The result of a job that the current job depends on. Possible values are `success`, `failure`, `cancelled`, or `skipped`. |
151151

152+
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-4757 %}
152153
### `inputs` context
153154

154155
The `inputs` context contains information about the inputs of reusable workflow. The inputs are defined in [`workflow_call` event configuration](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events). These inputs are passed from [`jobs.<job_id>.with`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idwith) in an external workflow.
@@ -159,6 +160,7 @@ For more information, see "[Reusing workflows](/actions/learn-github-actions/reu
159160
|---------------|------|-------------|
160161
| `inputs` | `object` | This context is only available when it is [a reusable workflow](/actions/learn-github-actions/reusing-workflows). |
161162
| `inputs.<name>` | `string` or `number` or `boolean` | Each input value passed from an external workflow. |
163+
{% endif %}
162164

163165
#### Example printing context information to the log file
164166

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
date: '2021-11-04'
2+
sections:
3+
bugs:
4+
- 'The {% data variables.product.prodname_github_connect %} configuration of the source instance was always restored to new instances even when the `--config` option for `ghe-restore` was not used. This would lead to a conflict with the {% data variables.product.prodname_github_connect %} connection and license synchronization if both the source and destination instances were online at the same time. {% comment %} https://github.com/github/github/pull/192247, https://github.com/github/github/pull/191951, https://github.com/github/enterprise2/pull/26870, https://github.com/github/backup-utils/pull/770, https://github.com/github/connected-enterprise/issues/208 {% endcomment %}'
5+
- 'Fixes {% data variables.product.prodname_pages %} builds so they take into account the NO_PROXY setting of the appliance. This is relevant to appliances configured with an HTTP proxy only. {% comment %} https://github.com/github/github/pull/192380 {% endcomment %}'
6+
known_issues:
7+
- After saving a new release on a repository, the `/releases` page shows 500 error. A fix for this issue is expected to ship in 3.2.3.
8+
- On a freshly set up {% data variables.product.prodname_ghe_server %} without any users, an attacker could create the first admin user.
9+
- Custom firewall rules are removed during the upgrade process.
10+
- Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository.
11+
- Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters.
12+
- When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in GitHub.com search results.
13+
- When a replica node is offline in a high availability configuration, {% data variables.product.product_name %} may still route {% data variables.product.prodname_pages %} requests to the offline node, reducing the availability of {% data variables.product.prodname_pages %} for users.

package-lock.json

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"accept-language-parser": "^1.5.0",
1919
"ajv": "^8.6.3",
2020
"ajv-formats": "^2.1.1",
21+
"bottleneck": "^2.19.5",
2122
"browser-date-formatter": "^3.0.3",
2223
"change-case": "^4.1.2",
2324
"cheerio": "^1.0.0-rc.10",
@@ -219,6 +220,9 @@
219220
"sync-search-ghes-release": "cross-env GHES_RELEASE=1 start-server-and-test sync-search-server 4002 sync-search-indices",
220221
"sync-search-indices": "script/sync-search-indices.js",
221222
"sync-search-server": "cross-env NODE_ENV=production WEB_CONCURRENCY=1 PORT=4002 node server.mjs",
223+
"translation-check": "start-server-and-test translation-check-server 4002 translation-check-test",
224+
"translation-check-server": "cross-env NODE_ENV=test PORT=4002 node server.mjs",
225+
"translation-check-test": "script/i18n/test-html-pages.js",
222226
"test": "cross-env NODE_OPTIONS='--max_old_space_size=8192 --experimental-vm-modules' jest",
223227
"test-watch": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch --notify --notifyMode=change --coverage"
224228
},

script/i18n/test-html-pages.js

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/usr/bin/env node
2+
import dotenv from 'dotenv'
3+
import got from 'got'
4+
import Bottleneck from 'bottleneck'
5+
import { loadPages } from '../../lib/page-data.js'
6+
import { allVersions } from '../../lib/all-versions.js'
7+
import languages from '../../lib/languages.js'
8+
const port = 4002
9+
10+
dotenv.config()
11+
/*
12+
Good local testing values are MAX_CONCURRENT=30, MIN_TIME=20
13+
*/
14+
const MAX_CONCURRENT = parseInt(process.env.BUILD_RECORDS_MAX_CONCURRENT || '200', 10)
15+
const MIN_TIME = parseInt(process.env.BUILD_RECORDS_MIN_TIME || '5', 10)
16+
const languageCode = process.env.LANGUAGE
17+
const singleVersion = process.env.VERSION
18+
19+
main()
20+
21+
async function main() {
22+
const start = process.hrtime.bigint()
23+
const opts = {
24+
maxConcurrent: MAX_CONCURRENT,
25+
minTime: MIN_TIME,
26+
}
27+
const limiter = new Bottleneck(opts)
28+
const allPages = await loadPages()
29+
const languageCodes =
30+
[languageCode] ||
31+
Object.keys(languages)
32+
.filter((language) => !language.wip && language !== 'en')
33+
.map((language) => languages[language].code)
34+
const versions = singleVersion ? [singleVersion] : Object.keys(allVersions)
35+
36+
const allPermalinks = []
37+
for (const language of languageCodes) {
38+
for (const version of versions) {
39+
const pages = allPages.filter(
40+
(page) => page.languageCode === language && page.applicableVersions.includes(version)
41+
)
42+
43+
const permalinks = pages
44+
.map((page) => {
45+
return page.permalinks.find((permalink) => {
46+
return permalink.languageCode === language && permalink.pageVersion === version
47+
})
48+
})
49+
.map((permalink) => {
50+
permalink.url = `http://localhost:${port}${permalink.href}`
51+
return permalink
52+
})
53+
allPermalinks.push(...permalinks)
54+
}
55+
}
56+
allPermalinks.forEach((page) => {
57+
limiter.schedule(getPage, page)
58+
})
59+
60+
limiter
61+
.on('idle', () => {
62+
const end = process.hrtime.bigint()
63+
console.log(`Took ${Number(end - start) / 1000000000}s`)
64+
console.log('All done!')
65+
})
66+
.on('error', (err) => {
67+
console.log('error', err)
68+
})
69+
}
70+
71+
async function getPage(page) {
72+
try {
73+
const response = await got.get(page.url, { throwHttpErrors: false })
74+
if (response.statusCode !== 200) {
75+
console.log('Status Code:', response.statusCode, 'Page: ', page.url)
76+
}
77+
} catch (err) {
78+
console.error(err)
79+
}
80+
}

script/search/search-qa-data.json

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
[
2+
{
3+
"query": "interactions",
4+
"href": "/rest/reference/interactions"
5+
},
6+
{
7+
"query": "repositories",
8+
"href": "/rest/reference/repos"
9+
},
10+
{
11+
"query": "workflow_run",
12+
"href": "/developers/webhooks-and-events/webhooks/webhook-events-and-payloads"
13+
},
14+
{
15+
"query": "workflow_dispatch",
16+
"href": "/developers/webhooks-and-events/webhooks/webhook-events-and-payloads"
17+
},
18+
{
19+
"query": "pull_request",
20+
"href": "/developers/webhooks-and-events/webhooks/webhook-events-and-payloads"
21+
},
22+
{
23+
"query": "workflow_run",
24+
"href": "/actions/learn-github-actions/events-that-trigger-workflows"
25+
},
26+
{
27+
"query": "workflow_dispatch",
28+
"href": "/actions/learn-github-actions/events-that-trigger-workflows"
29+
},
30+
{
31+
"query": "register for an account",
32+
"href": "/get-started/signing-up-for-github/signing-up-for-a-new-github-account"
33+
},
34+
{
35+
"query": "registering on GitHub",
36+
"href": "/get-started/signing-up-for-github/signing-up-for-a-new-github-account"
37+
},
38+
{
39+
"query": "signing up for a GitHub account",
40+
"href": "/get-started/signing-up-for-github/signing-up-for-a-new-github-account"
41+
},
42+
{
43+
"query": "new account",
44+
"href": "/get-started/signing-up-for-github/signing-up-for-a-new-github-account"
45+
},
46+
{
47+
"query": "create a GitHub account",
48+
"href": "/get-started/signing-up-for-github/signing-up-for-a-new-github-account"
49+
},
50+
{
51+
"query": "apis",
52+
"href": "/graphql"
53+
},
54+
{
55+
"query": "apis",
56+
"href": "/rest"
57+
},
58+
{
59+
"query": "api",
60+
"href": "/graphql"
61+
},
62+
{
63+
"query": "api",
64+
"href": "/rest"
65+
},
66+
{
67+
"query": "create a new branch",
68+
"href": "/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository"
69+
},
70+
{
71+
"query": "fix merge conflict",
72+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line"
73+
},
74+
{
75+
"query": "conflicts",
76+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line"
77+
},
78+
{
79+
"query": "merge conflict",
80+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line"
81+
},
82+
{
83+
"query": "branch conflicts",
84+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line"
85+
},
86+
{
87+
"query": "conflicting files",
88+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line"
89+
},
90+
{
91+
"query": "resolve conflicts",
92+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line"
93+
},
94+
{
95+
"query": "fix merge conflict",
96+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github"
97+
},
98+
{
99+
"query": "conflicts",
100+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github"
101+
},
102+
{
103+
"query": "merge conflict",
104+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github"
105+
},
106+
{
107+
"query": "branch conflicts",
108+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github"
109+
},
110+
{
111+
"query": "conflicting files",
112+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github"
113+
},
114+
{
115+
"query": "resolve conflicts",
116+
"href": "/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github"
117+
},
118+
{
119+
"query": "actions billable minutes",
120+
"href": "/billing/managing-billing-for-github-actions/about-billing-for-github-actions"
121+
},
122+
{
123+
"query": "actions trigger pull requests",
124+
"href": "/actions/learn-github-actions/events-that-trigger-workflows"
125+
},
126+
{
127+
"query": "about teams",
128+
"href": "/organizations/organizing-members-into-teams/about-teams"
129+
},
130+
{
131+
"query": "about organizations",
132+
"href": "/organizations/collaborating-with-groups-in-organizations/about-organizations"
133+
},
134+
{
135+
"query": "create pages site",
136+
"href": "/pages/getting-started-with-github-pages/creating-a-github-pages-site"
137+
},
138+
{
139+
"query": "create pages site",
140+
"href": "/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll"
141+
},
142+
{
143+
"query": "make a team",
144+
"href": "/organizations/organizing-members-into-teams/creating-a-team"
145+
},
146+
{
147+
"query": "new team",
148+
"href": "/organizations/organizing-members-into-teams/creating-a-team"
149+
},
150+
{
151+
"query": "team",
152+
"href": "/organizations/organizing-members-into-teams/about-teams"
153+
},
154+
{
155+
"query": "rest create issue",
156+
"href": "/rest/reference/issues"
157+
},
158+
{
159+
"query": "fork",
160+
"href": "/rest/reference/repos"
161+
},
162+
{
163+
"query": "commit email",
164+
"href": "/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address"
165+
},
166+
{
167+
"query": "graphql organization",
168+
"href": "/graphql/reference/objects"
169+
},
170+
{
171+
"query": "device flow",
172+
"href": "/developers/apps/building-oauth-apps/authorizing-oauth-apps"
173+
},
174+
{
175+
"query": "convert user",
176+
"href": "/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization"
177+
},
178+
{
179+
"query": "add email",
180+
"href": "/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/adding-an-email-address-to-your-github-account"
181+
},
182+
{
183+
"query": "transfer ownership",
184+
"href": "/organizations/managing-organization-settings/transferring-organization-ownership"
185+
},
186+
{
187+
"query": "merge accounts",
188+
"href": "/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts"
189+
},
190+
{
191+
"query": "search syntax",
192+
"href": "/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax"
193+
},
194+
{
195+
"query": "scim okta",
196+
"href": "/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta"
197+
},
198+
{
199+
"query": "keeping your account and data secure",
200+
"href": "/authentication/keeping-your-account-and-data-secure"
201+
},
202+
{
203+
"query": "ssh troubleshoot",
204+
"href": "/authentication/troubleshooting-ssh"
205+
}
206+
]

0 commit comments

Comments
 (0)