Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo sync #24849

Merged
merged 3 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/reusables/actions/schedule-delay.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% note %}

Note: The `schedule` event can be delayed during periods of high loads of {% data variables.product.prodname_actions %} workflow runs. High load times include the start of every hour. To decrease the chance of delay, schedule your workflow to run at a different time of the hour.
Note: The `schedule` event can be delayed during periods of high loads of {% data variables.product.prodname_actions %} workflow runs. High load times include the start of every hour. If the load is sufficiently high enough, some queued jobs may be dropped. To decrease the chance of delay, schedule your workflow to run at a different time of the hour.

{% endnote %}
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
"make-promises-safe": "^5.1.0",
"mdast-util-gfm-table": "^1.0.7",
"micromark-extension-gfm-table": "^1.0.5",
"minimatch": "^7.0.0",
"mkdirp": "^2.1.3",
"mockdate": "^3.0.5",
"nock": "^13.2.7",
Expand Down
29 changes: 3 additions & 26 deletions tests/meta/repository-references.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import fs from 'fs'

import walkSync from 'walk-sync'
import minimatch from 'minimatch'

/*
This test exists to make sure we don't reference private GitHub owned repositories
Expand All @@ -10,9 +9,7 @@ in our open-source repository.
If this test is failing...
(1) edit the file to remove the reference; or
(2) the repository is public,
add the repository name to PUBLIC_REPOS; or
(3) the file references a docs repository,
add the file name to ALLOW_DOCS_PATHS.
add the repository name to PUBLIC_REPOS.
*/

// These are a list of known public repositories in the GitHub organization.
Expand Down Expand Up @@ -72,21 +69,6 @@ const PUBLIC_REPOS = new Set([
'gh-migration-analyzer',
])

const ALLOW_DOCS_PATHS = [
'.github/actions-scripts/enterprise-server-issue-templates/*.md',
'.github/review-template.md',
'.github/workflows/hubber-contribution-help.yml',
'.github/workflows/sync-search-indices.yml',
'.github/workflows/site-policy-reminder.yml',
'contributing/search.md',
'docs/index.yaml',
'lib/excluded-links.js',
'ownership.yaml',
'script/README.md',
'script/toggle-ghae-feature-flags.js',
'script/i18n/clone-translations.sh',
]

// This regexp will capture the last segment of a GitHub repo name.
// E.g., it will capture `backup-utils.git` from `https://github.com/github/backup-utils.git`.
const REPO_REGEXP = /\/\/github\.com\/github\/([\w\-.]+)/gi
Expand Down Expand Up @@ -139,11 +121,7 @@ describe('check if a GitHub-owned private repository is referenced', () => {
// The referenced repo may or may not end with '.git', so ignore that extension.
.map(([, repoName]) => repoName.replace(/\.git$/, ''))
.filter((repoName) => !PUBLIC_REPOS.has(repoName))
.filter((repoName) => {
return !(
repoName.startsWith('docs') && ALLOW_DOCS_PATHS.some((path) => minimatch(filename, path))
)
})
.filter((repoName) => !repoName.startsWith('docs'))
expect(
matches,
`This test exists to make sure we don't reference private GitHub owned repositories in our open-source repository.
Expand All @@ -153,8 +131,7 @@ describe('check if a GitHub-owned private repository is referenced', () => {
You can:

(1) edit the file to remove the repository reference; or
(2) if the repository is public, add the repository name to the 'PUBLIC_REPOS' variable in this test file; or
(3) if the file references a docs repository, add the file name to the 'ALLOW_DOCS_PATHS' variable in this test file.`
(2) if the repository is public, add the repository name to the 'PUBLIC_REPOS' variable in this test file.`
).toHaveLength(0)
})
})