Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflowEventName util function #1238

Merged
merged 4 commits into from
Sep 8, 2022
Merged

Conversation

Daverlo
Copy link
Contributor

@Daverlo Daverlo commented Sep 7, 2022

For the 1 click setup feature of Code Scanning we are planning on use the dynamic workflows internal api. Triggering an action run this way changes the content of GITHUB_EVENT_NAME to dynamic. As we will be triggering this run after a push/pr and the action does some work in those cases, we will be providing the real event name under the env var CODESCANNING_EVENT_NAME.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@Daverlo Daverlo requested a review from a team as a code owner September 7, 2022 20:40
if (value === undefined || value.length === 0) {
return process.env["GITHUB_EVENT_NAME"];
}
return value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: I think the build will fail because of this.

Suggested change
return value
return value;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants