feat(tools): Add a PR labeler action to the repo (#41458)
parent
f1c8a9825b
commit
50369edd12
|
@ -2,7 +2,7 @@
|
||||||
name: 'Bug Report: Issues with Coding challenges'
|
name: 'Bug Report: Issues with Coding challenges'
|
||||||
about: Report issue with a specific challenge, like broken tests, unclear instructions.
|
about: Report issue with a specific challenge, like broken tests, unclear instructions.
|
||||||
title: ''
|
title: ''
|
||||||
labels: 'scope: learn, status: needs help for triage'
|
labels: 'scope: curriculum, status: needs help for triage'
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
@ -27,4 +27,4 @@ updates:
|
||||||
open-pull-requests-limit: 20
|
open-pull-requests-limit: 20
|
||||||
labels:
|
labels:
|
||||||
- 'dependabot'
|
- 'dependabot'
|
||||||
- 'scope: learn'
|
- 'scope: curriculum'
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
"scope: docs":
|
||||||
|
- docs/**/*
|
||||||
|
|
||||||
|
"scope: curriculum":
|
||||||
|
- curriculum/challenges/**/*
|
||||||
|
|
||||||
|
"platform: client":
|
||||||
|
- client/**/*
|
||||||
|
|
||||||
|
"platform: api":
|
||||||
|
- api-server/**/*
|
||||||
|
|
||||||
|
"scope: tools/scripts":
|
||||||
|
- cypress/**/*
|
||||||
|
- tools/**/*
|
||||||
|
- .github/**/*
|
||||||
|
- utils/**/*
|
||||||
|
|
||||||
|
"scope: i18n":
|
||||||
|
- any: ['curriculum/challenges/**/*', '!curriculum/challenges/english/**/*']
|
||||||
|
- docs/i18n/**/*
|
||||||
|
- client/i18n/**/*
|
||||||
|
- config/crowdin/**/*
|
||||||
|
- config/i18n/**/*
|
||||||
|
- tools/crowdin/**/*
|
|
@ -100,5 +100,5 @@ jobs:
|
||||||
base: 'main'
|
base: 'main'
|
||||||
title: 'chore(i18n,client): processed translations'
|
title: 'chore(i18n,client): processed translations'
|
||||||
body: 'This PR was opened auto-magically by Crowdin.'
|
body: 'This PR was opened auto-magically by Crowdin.'
|
||||||
labels: 'crowdin-sync, scope: i18n, scope: UI'
|
labels: 'crowdin-sync, scope: UI'
|
||||||
reviewers: 'RandellDawson, nhcarrigan'
|
reviewers: 'RandellDawson, nhcarrigan'
|
||||||
|
|
|
@ -7,7 +7,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
i18n-download-curriculum-translations:
|
i18n-download-curriculum-translations:
|
||||||
name: Learn
|
name: Curriculum
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -66,8 +66,8 @@ jobs:
|
||||||
export_only_approved: true
|
export_only_approved: true
|
||||||
|
|
||||||
|
|
||||||
commit_message: 'chore(i8n,learn): processed translations'
|
commit_message: 'chore(i8n,curriculum): processed translations'
|
||||||
localization_branch_name: i18n-sync-learn
|
localization_branch_name: i18n-sync-curriculum
|
||||||
push_translations: true
|
push_translations: true
|
||||||
|
|
||||||
# pull-request
|
# pull-request
|
||||||
|
@ -96,10 +96,10 @@ jobs:
|
||||||
uses: ./tools/crowdin/actions/pr-creator
|
uses: ./tools/crowdin/actions/pr-creator
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
github-token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
||||||
branch: 'i18n-sync-learn'
|
branch: 'i18n-sync-curriculum'
|
||||||
owner-repo: 'freeCodeCamp/freeCodeCamp'
|
owner-repo: 'freeCodeCamp/freeCodeCamp'
|
||||||
base: 'main'
|
base: 'main'
|
||||||
title: 'chore(i18n,learn): processed translations'
|
title: 'chore(i18n,curiculum): processed translations'
|
||||||
body: 'This PR was opened auto-magically by Crowdin.'
|
body: 'This PR was opened auto-magically by Crowdin.'
|
||||||
labels: 'crowdin-sync, scope: i18n, scope: learn'
|
labels: 'crowdin-sync'
|
||||||
reviewers: 'RandellDawson, nhcarrigan'
|
reviewers: 'RandellDawson, nhcarrigan'
|
||||||
|
|
|
@ -134,5 +134,5 @@ jobs:
|
||||||
base: 'main'
|
base: 'main'
|
||||||
title: 'chore(i18n,docs): processed translations'
|
title: 'chore(i18n,docs): processed translations'
|
||||||
body: 'This PR was opened auto-magically by Crowdin.'
|
body: 'This PR was opened auto-magically by Crowdin.'
|
||||||
labels: 'crowdin-sync, scope: i18n, scope: docs'
|
labels: 'crowdin-sync'
|
||||||
reviewers: 'RandellDawson, nhcarrigan'
|
reviewers: 'RandellDawson, nhcarrigan'
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
name: "Pull Request Labeler"
|
||||||
|
on:
|
||||||
|
- pull_request_target
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
triage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/labeler@v3
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
sync-labels: true
|
|
@ -5,7 +5,7 @@ const validLabels = {
|
||||||
portuguese: 'language: Portuguese',
|
portuguese: 'language: Portuguese',
|
||||||
russian: 'language: Russian',
|
russian: 'language: Russian',
|
||||||
spanish: 'language: Spanish',
|
spanish: 'language: Spanish',
|
||||||
curriculum: 'scope: learn',
|
curriculum: 'scope: curriculum',
|
||||||
docs: 'scope: docs',
|
docs: 'scope: docs',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
This is a one-off script to run on all open PRs to add the
|
This is a one-off script to run on all open PRs to add the
|
||||||
"status: need to test locally" label to any PR with an existing
|
"status: need to test locally" label to any PR with an existing
|
||||||
"scope: learn" label on it.
|
"scope: curriculum" label on it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -38,7 +38,7 @@ const log = new ProcessingLog('all-locally-tested-labels');
|
||||||
// holds potential labels to add based on file path
|
// holds potential labels to add based on file path
|
||||||
const labelsToAdd = {};
|
const labelsToAdd = {};
|
||||||
const existingLabels = labels.map(({ name }) => name);
|
const existingLabels = labels.map(({ name }) => name);
|
||||||
if (existingLabels.includes('scope: learn')) {
|
if (existingLabels.includes('scope: curriculum')) {
|
||||||
labelsToAdd['status: need to test locally'] = 1;
|
labelsToAdd['status: need to test locally'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue