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

Bump fails when run on the very first commit in a repository #27

Open
siggimoo opened this issue Jan 1, 2022 · 3 comments
Open

Bump fails when run on the very first commit in a repository #27

siggimoo opened this issue Jan 1, 2022 · 3 comments
Assignees
Labels

Comments

@siggimoo
Copy link
Collaborator

siggimoo commented Jan 1, 2022

If a new repository is based on a template containing a workflow with this action, it may end up being run on the very first commit. However, since that commit is not based on a PR it causes the action to fail. It would be nice if it could instead emit a default version number or at least have the option of doing so. Perhaps it could be configurable: some option that does nothing if unset or emits the specified value if run on the first commit.

@siggimoo siggimoo self-assigned this Jan 2, 2022
@jefflinse
Copy link
Owner

The intended behavior of the action is to ignore anything that doesn't look like a pull request merger. Can you provide an example of the error(s) you're seeing in the scenario you described?

@siggimoo
Copy link
Collaborator Author

siggimoo commented Feb 9, 2022

I suppose as a general rule it's understandable that no version is assigned without a PR since it would be impossible to know whether it should be a major, minor, or patch bump. However, the original problem still stands: new repositories created from templates that include this action fail on their initial commits when they otherwise would succeed. Perhaps the appropriate behavior under these conditions would be a no-op.

@jefflinse
Copy link
Owner

Thanks for linking to an example. This is likely a bug then. The action should effectively be a no-op when not running in the context of a merged pull request.

I will investigate and resolve this over the weekend.

@jefflinse jefflinse added the bug label Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants