1
0
mirror of synced 2025-12-19 18:10:59 -05:00

move some rules markdownlint (#43363)

This commit is contained in:
Rachael Sewell
2023-09-27 17:28:14 -07:00
committed by GitHub
parent 8a3fb738c7
commit d228fa3351
8 changed files with 131 additions and 114 deletions

View File

@@ -59,6 +59,14 @@ export const githubDocsConfig = {
severity: 'error',
'partial-markdown-files': true,
},
'hardcoded-data-variable': {
severity: 'error',
'partial-markdown-files': true,
},
'github-owned-action-references': {
severity: 'error',
'partial-markdown-files': true,
},
}
export const searchReplaceConfig = {
@@ -130,47 +138,6 @@ export const searchReplaceConfig = {
severity: 'error',
'partial-markdown-files': true,
},
{
// Catches usage of string personal access token, which should
// be replaced with a reusable data variable.
name: 'personal access token reusable',
message:
'The string "personal access token" can be replaced with a variable. You should use one of the variables from data/variables/product.yml instead of the literal phrase(s):',
searchPattern: '/personal access tokens?/gi',
severity: 'warning',
'partial-markdown-files': true,
},
{
// Catches usage of GitHub-owned actions that don't use a
// resuable.
// GitHub-owned actions (e.g. actions/checkout@v2) should use a
// reusable in examples.
//
// - actions/checkout@v2
// - actions/delete-package-versions@v2
// - actions/download-artifact@v2
// - actions/upload-artifact@v2
// - actions/github-script@v2
// - actions/setup-dotnet@v2
// - actions/setup-go@v2
// - actions/setup-java@v2
// - actions/setup-node@v2
// - actions/setup-python@v2
// - actions/stale@v2
// - actions/cache@v2
// - github/codeql-action/init@v2
// - github/codeql-action/analyze@v2
// - github/codeql-action/autobuild@v2
// - github/codeql-action/upload-sarif@v2
//
name: 'GitHub-owned action references should use a reusable',
message:
'A GitHub-owned action is referenced, but should be replaced with a reusable from data/reusables/actions.',
searchPattern:
'/(actions\\/(checkout|delete-package-versions|download-artifact|upload-artifact|github-script|setup-dotnet|setup-go|setup-java|setup-node|setup-python|stale|cache)|github\\/codeql-action[/a-zA-Z-]*)/g',
severity: 'warning',
'partial-markdown-files': true,
},
],
},
}