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

✨ Support Workflows Triggered By "Push" Event #24

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

gilday
Copy link
Contributor

@gilday gilday commented Jun 5, 2024

Adds support for workflows triggered by a "push" event.

This is necessary when integrating with tools that scan on pushes to the default branch, because it allows this action to be appended at the end of the workflow, to share the results of the scan with Pixeebot.

/closes #work

@gilday gilday requested a review from JesusCotlamee June 5, 2024 01:32
Comment on lines +10 to +21
jest.resetModules();
jest.clearAllMocks();
});

it("creates GitHubContext from push event", () => {
jest.doMock("@actions/github", () => ({
context: {
...fakeContext,
eventName: "push",
},
}));
const github = require("../src/github");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only way I could figure out to stub the context property on the @actions/github module without angering the build, because context` is a read-only property of a specific type.

@gilday gilday merged commit b1b7bd7 into main Jun 5, 2024
2 checks passed
@gilday gilday deleted the iss-1333/handle-push-event branch June 5, 2024 13:21
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.

3 participants