Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Panayil <[email protected]>
  • Loading branch information
sachin-panayil committed Dec 23, 2024
1 parent b166ad1 commit 716ebb5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,9 @@ function run(disableRetry) {
if (!/[0-9a-fA-F]{6}/.test(ISSUE_LABEL_COLOR))
throw new Error(`Invalid label color ${ISSUE_LABEL_COLOR}`);
// verify pull request labels are valid
if (PULL_REQUEST_LABELS && !/^[a-zA-Z0-9\-_. ,]+$/.test(PULL_REQUEST_LABELS))
if (PULL_REQUEST_LABELS && !/^[a-zA-Z0-9\-_. ,]+$/.test(PULL_REQUEST_LABELS)) {
throw new Error(`Invalid pull request labels. For label standards, see: https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels`);
}
// override GITHUB_TOKEN and INPUT_GITHUB_TOKEN if INPUT_TOKEN is present
if (TOKEN) {
delete process.env['INPUT_TOKEN'];
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ export default async function run(disableRetry?: boolean): Promise<void> {
if (!/[0-9a-fA-F]{6}/.test(ISSUE_LABEL_COLOR))
throw new Error(`Invalid label color ${ISSUE_LABEL_COLOR}`)
// verify pull request labels are valid
if (PULL_REQUEST_LABELS && !/^[a-zA-Z0-9\-_. ,]+$/.test(PULL_REQUEST_LABELS))
if (PULL_REQUEST_LABELS && !/^[a-zA-Z0-9\-_. ,]+$/.test(PULL_REQUEST_LABELS)) {
throw new Error(`Invalid pull request labels. For label standards, see: https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels`)
}
// override GITHUB_TOKEN and INPUT_GITHUB_TOKEN if INPUT_TOKEN is present
if (TOKEN) {
delete process.env['INPUT_TOKEN']
Expand Down

0 comments on commit 716ebb5

Please sign in to comment.