Skip to content

Commit

Permalink
Exit if not called on "push" event
Browse files Browse the repository at this point in the history
Temporary solution for #9
  • Loading branch information
samuelmeuli committed Jan 6, 2020
1 parent 8fccb6c commit fd5ea01
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ async function runAction() {
const autoFix = getInput("auto_fix") === "true";
const commitMsg = getInput("commit_message", true);

if (github.eventName !== "push") {
throw Error(
`${actionName} currently only supports "push" events, but was called on a "${github.eventName}" event`,
);
}

setGitUserInfo(GIT_NAME, GIT_EMAIL);

const checks = [];
Expand Down

0 comments on commit fd5ea01

Please sign in to comment.