Skip to content

Commit e12b832

Browse files
authored
repo sync
2 parents c56bee2 + 8f2d3d1 commit e12b832

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

.github/workflows/triage-unallowed-contributions.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,25 +78,23 @@ jobs:
7878
with:
7979
github-token: ${{secrets.GITHUB_TOKEN}}
8080
script: |
81-
const changedFiles = ${{steps.filter.outputs.notAllowed_files}}
82-
const restFiles = ${{steps.filter.outputs.openapi_files}}
83-
const translationFiles = ${{steps.filter.outputs.translation_files}}
84-
const markdownFiles = changedFiles.map(file => `- \`${file}\`\n`).join('')
81+
constFilesArr = [
82+
'translations/**',
83+
'lib/rest/static/**',
84+
'.github/workflows/**',
85+
'.github/CODEOWNERS',
86+
'translations/**',
87+
'assets/fonts/**',
88+
'data/graphql/**',
89+
'lib/graphql/**',
90+
'lib/redirects/**',
91+
'lib/rest/**',
92+
'lib/webhooks/**'
93+
]
8594
86-
let reviewMessage = `👋 Hey there spelunker. It looks like you've modified some files that we can't accept as contributions.\n${markdownFiles}\n\nYou'll need to revert all of these ☝️ files using [GitHub Desktop](https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/reverting-a-commit) or \`git checkout origin/main <file name>\`. Once you get those files reverted, we can continue with the review process. :octocat:`
95+
const badFiles = badFilesArr.join('\n')
8796
88-
if (restFiles.length > 0) {
89-
reviewMessage += "\n\nIt looks like you've modified the OpenAPI schema (`lib/rest/static/**`). While we aren't accepting changes to the schema directly, you can open an issue for any updates to the REST API docs. Head on over to the [`github/rest-api-description`](https://github.com/github/rest-api-description/issues/new?assignees=&labels=Inaccuracy&template=schema-inaccuracy.md&title=%5BSchema+Inaccuracy%5D+%3CDescribe+Problem%3E) repository to open an issue. ⚡"
90-
}
91-
92-
if (translationFiles.length > 0) {
93-
await github.issues.addLabels({
94-
...context.repo,
95-
issue_number: context.payload.number,
96-
labels: ['localization']
97-
})
98-
reviewMessage += "\n\nIt looks like you've modified translated content. Unfortunately, we are not able to accept pull requests for translated content. Our translation process involves an integration with an external service at crowdin.com, where all translation activity happens. We hope to eventually open up the translation process to the open source community, but we're not there yet. See https://github.com/github/docs/blob/main/CONTRIBUTING.md#earth_asia-translations for more details."
99-
}
97+
let reviewMessage = `👋 Hey there spelunker. It looks like you've modified some files that we can't accept as contributions. The complete list of files we can't accept are:\n${badFiles}\n\nYou'll need to revert all of the files you changed in that list using [GitHub Desktop](https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/reverting-a-commit) or \`git checkout origin/main <file name>\`. Once you get those files reverted, we can continue with the review process. :octocat:`
10098
10199
await github.pulls.createReview({
102100
...context.repo,

0 commit comments

Comments
 (0)