Skip to content

Commit 58abfda

Browse files
committed
fix(nx-fly-deployment-action): do not expect issue for non-pull requests
1 parent b8c555f commit 58abfda

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

scripts/github/analyze-fly-deployment-conditions.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,6 @@ async function analyzeFlyDeploymentConditions({
7777
- Provided preview label: ${label || 'N/A'}
7878
- Blocked branch name prefixes: ${blockedPrefixes.join(', ')}`);
7979

80-
// Ensure we are in the context of an issue or pull request
81-
const issueOrPrNumber = issueNumber || prNumber;
82-
if (!issueOrPrNumber) {
83-
const error =
84-
'analyzeFlyDeploymentConditions must be run in the context of an issue or pull request';
85-
core.setFailed(error);
86-
return;
87-
}
88-
8980
// Skip blocked branche prefixes
9081
if (
9182
branchName &&
@@ -101,6 +92,15 @@ async function analyzeFlyDeploymentConditions({
10192
return setSkip(false);
10293
}
10394

95+
// Ensure we are in the context of an issue or pull request for PR events
96+
const issueOrPrNumber = issueNumber || prNumber;
97+
if (!issueOrPrNumber) {
98+
const error =
99+
'analyzeFlyDeploymentConditions must be run in the context of an issue or pull request';
100+
core.setFailed(error);
101+
return;
102+
}
103+
104104
// Handle PR events that should continue workflow
105105
if (action === 'closed' || action === 'opened' || action === 'reopened') {
106106
core.info(`Pull request ${action} -> continue`);

0 commit comments

Comments
 (0)