Skip to content

Commit

Permalink
chore: Change label field to be required for temp envs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jun 27, 2024
1 parent cc4bd84 commit a79fb3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/index.js

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

6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ try {
// Temp environments enabled
if (github.context.eventName === "pull_request") {
const prEvent = github.context.payload;
const targetLabel = value.label || prEvent.label?.name;
if (!value.label) continue;
if (
(prEvent.action === "labeled" &&
prEvent.label.name === targetLabel) ||
prEvent.label.name === value.label) ||
prEvent.pull_request.labels.some(
(label) => label.name === targetLabel,
(label) => label.name === value.label,
)
) {
patterns = ref;
Expand Down

0 comments on commit a79fb3f

Please sign in to comment.