Skip to content

Commit

Permalink
fix: Fix temp env only being included for the labeled event
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jun 27, 2024
1 parent c497bc1 commit cc4bd84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ try {
const prEvent = github.context.payload;
const targetLabel = value.label || prEvent.label?.name;
if (
prEvent.action === "labeled" &&
prEvent.label.name === targetLabel
(prEvent.action === "labeled" &&
prEvent.label.name === targetLabel) ||
prEvent.pull_request.labels.some(
(label) => label.name === targetLabel,
)
) {
patterns = ref;
value.name = `${value.name || toTitleCase(env)} #${prEvent.number}`;
Expand Down

0 comments on commit cc4bd84

Please sign in to comment.