-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into benelan/9255-add-icons…
…-to-monorepo * origin/dev: ci: add type checking to github scripts (#9851) chore: release next fix(carousel): Prevent duplicate animation when navigating via keyboard (#9848) chore: release next fix(tabs): Update tab title indicator display (#9666)
- Loading branch information
Showing
32 changed files
with
959 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
// @ts-check | ||
// If the "new component" label is added to an issue, generates a notification to the Calcite designer lead(s) | ||
// The secret is formatted like so: designer1, designer2, designer3 | ||
// Note the script automatically adds the "@" character in to notify the designer lead(s) | ||
|
||
/** @param {import('github-script').AsyncFunctionArguments} AsyncFunctionArguments */ | ||
module.exports = async ({ github, context }) => { | ||
const { designers } = process.env; | ||
const { repo, owner } = context.repo; | ||
|
||
const payload = /** @type {import('@octokit/webhooks-types').IssuesLabeledEvent} */ (context.payload); | ||
const { | ||
issue: { number }, | ||
} = payload; | ||
|
||
const { DESIGNERS } = process.env; | ||
|
||
// Add a "@" character to notify the user | ||
const calcite_designers = designers.split(",").map((v) => " @" + v.trim()); | ||
const calcite_designers = DESIGNERS?.split(",").map((v) => " @" + v.trim()); | ||
|
||
if (!calcite_designers?.length) { | ||
console.error("unable to determine designers"); | ||
process.exit(1); | ||
} | ||
|
||
// Add a comment to issues with the 'new component' label to notify the designer(s) | ||
await github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
owner, | ||
repo, | ||
issue_number: number, | ||
body: `cc ${calcite_designers}`, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.