Skip to content

Commit

Permalink
#29618: making secure fallback option when no issue is provided (#29892
Browse files Browse the repository at this point in the history
)
  • Loading branch information
victoralfaro-dotcms authored Sep 5, 2024
1 parent 96bc278 commit c72f6d4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/issue_comp_next-release-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,20 @@ jobs:
});
}
let issueNumber = ('${{ inputs.issue_number }}'.trim() && parseInt('${{ inputs.issue_number }}')) || -1;
const issue = context.payload.issue || await getIssue(issueNumber);
let issue = context.payload.issue;
if (!issue) {
if (!!'${{ inputs.issue_number }}') {
issue = await getIssue(${{ inputs.issue_number }});
}
if (!issue) {
console.log('Issue [${{ inputs.issue_number }}] not found');
process.exit(0);
}
}
console.log(`Issue: ${JSON.stringify(issue, null, 2)}`);
issueNumber = issue.data.number;
const issueNumber = issue.data.number;
const dropAndLearnText = 'Drop Everything & Learn';
if (issue.data.title.includes(dropAndLearnText)) {
Expand Down

0 comments on commit c72f6d4

Please sign in to comment.