diff --git a/.github/ISSUE_TEMPLATE/a11y_investigation.md b/.github/ISSUE_TEMPLATE/a11y_investigation.md index 41cc7cc4b9..a4db09fab8 100644 --- a/.github/ISSUE_TEMPLATE/a11y_investigation.md +++ b/.github/ISSUE_TEMPLATE/a11y_investigation.md @@ -1,7 +1,6 @@ --- name: A11y Investigation -about: Details an accessibility investigation that needs to be done -title: '(A11y) - ' +about: Details an accessibility investigation that needs to be done labels: ["a11y", "triage"] assignees: '' diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 93c841a2c3..1fb2d7d1c7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,6 @@ --- name: Bug report about: Create a report to help us improve -title: '(Bug) - ' labels: ["bug", "triage"] assignees: '' diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 60079188ab..0361d36395 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,6 @@ --- name: Feature request about: Suggest a feature/enhancement for NewsKit - External teams should use this instead of story,task,spike etc. -title: '' labels: ["request", "triage"] assignees: '' diff --git a/.github/ISSUE_TEMPLATE/spike.md b/.github/ISSUE_TEMPLATE/spike.md index ff905ed1cb..0a5889e0c5 100644 --- a/.github/ISSUE_TEMPLATE/spike.md +++ b/.github/ISSUE_TEMPLATE/spike.md @@ -1,7 +1,6 @@ --- name: Technical Spike about: Details a piece of technical research or an investigation that needs to be conducted -title: '(Spike) - ' labels: ["spike", "triage"] assignees: '' diff --git a/.github/ISSUE_TEMPLATE/story.md b/.github/ISSUE_TEMPLATE/story.md index d2e79f2ba2..9b054ce7b4 100644 --- a/.github/ISSUE_TEMPLATE/story.md +++ b/.github/ISSUE_TEMPLATE/story.md @@ -1,7 +1,6 @@ --- name: User Story -about: Details a specific user facing feature -title: '(Story) - ' +about: Details a specific user facing feature labels: ["story", "triage"] assignees: '' diff --git a/.github/ISSUE_TEMPLATE/task.md b/.github/ISSUE_TEMPLATE/task.md index 28cae8c0bc..de9b4370e7 100644 --- a/.github/ISSUE_TEMPLATE/task.md +++ b/.github/ISSUE_TEMPLATE/task.md @@ -1,7 +1,6 @@ --- name: Task about: Details a task -title: '(Task) - ' labels: ["task", "triage"] assignees: '' diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3bc92f8894..540c150ef7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,5 @@ -PPDSC-XXXX + +#000 **What** diff --git a/.github/release.yml b/.github/release.yml index c1394a974b..5a7d154bde 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -16,7 +16,7 @@ changelog: - fix - title: Documentation 📝 labels: - - doc + - docs - title: Other Changes 🧱 labels: - "*" \ No newline at end of file diff --git a/githooks/commitmsg.js b/githooks/commitmsg.js index a83e039ec6..4ac7f448a0 100644 --- a/githooks/commitmsg.js +++ b/githooks/commitmsg.js @@ -6,7 +6,7 @@ const read = require('@commitlint/read'); const customMessages = { 'scope-enum': { - level2: 'The scope should be a Jira ticket number', + level2: 'The scope should be a GitHub issue number', }, }; diff --git a/githooks/constants.js b/githooks/constants.js index cb5aa511c6..c007ad4770 100644 --- a/githooks/constants.js +++ b/githooks/constants.js @@ -1,9 +1,9 @@ const chalk = require('chalk'); const TYPES = ['docs', 'feat', 'fix', 'refactor', 'revert', 'upkeep', 'spike']; -const SCOPE_REGEX = /^[A-Z]{2,5}-\d{1,5}$/; +const SCOPE_REGEX = /^[A-Z]{2,5}-\d{1,5}|\d{1,5}$/; const PLAIN_PREFIX_ERROR_MSG = - "The commit message should be in the format 'type - fix/feat/etc(ticket-number): message'"; + "The commit message should be in the format 'type - fix/feat/etc(issue-number): message'"; const FORMATTED_PREFIX_ERROR_MSG = `The commit message should be in the format ${chalk.bold( "'type", )}${chalk.reset.dim(' - fix/feat/etc')}${chalk.bold( diff --git a/githooks/preparecommitmsg.js b/githooks/preparecommitmsg.js index dd50952212..46d3a770c2 100644 --- a/githooks/preparecommitmsg.js +++ b/githooks/preparecommitmsg.js @@ -40,12 +40,11 @@ const createPrompts = ({type, scope}) => { SEM_VER_COMMIT_TYPES[SEM_VER_COMMIT_TYPES.length - 1], }, { - message: 'Enter the Jira ticket number for this commit', + message: 'Enter the github issue number for this commit', name: 'scope', transformer: input => input.toUpperCase(), type: 'input', - validate: input => - SCOPE_REGEX.test(input.toUpperCase()) || 'e.g. PPDSC-1608', + validate: input => SCOPE_REGEX.test(input.toUpperCase()) || 'e.g. 1608', when: !scope, }, ]; @@ -69,7 +68,7 @@ const createPrompts = ({type, scope}) => { const getBranchData = ({type, scope}) => new Promise((resolve, reject) => { - const branchNameRegex = /^(?:(\w*)\/)?([a-z]{2,5}-\d{1,5})?/i; + const branchNameRegex = /^(?:(\w*)\/)?([a-z]{2,5}-\d{1,5}|\d{1,5})?/i; exec('git rev-parse --abbrev-ref HEAD', (err, stdout, stderr) => { if (stdout && typeof stdout === 'string') { const matches = stdout.trim().match(branchNameRegex); @@ -102,6 +101,7 @@ if (msgFilePath) { ) .then(({scope, type, ...parsed}) => { // remove any already defined type and scope info + const message = parsed.raw .replace(type, '') .replace(`(${scope})`, '')