intuit/auto

Allow skipped releases to be treated as success

gingermusketeer opened this issue · 2 comments

Is your feature request related to a problem? Please describe.

When merging multiple PRs in quick succession and pushing new version commits back to GitHub I have run into the error message:
Current commit is behind, skipping the release to avoid collisions.

In addition to the error message the exit code of 1 is returned which causes the build to be marked as a failure triggering notifications of failure.

Describe the solution you'd like

A configuration option which determines if skipped releases like this should trigger an exit code of 0 or not. The option could be called exitOnBuildSkipped: 'success' | 'failure'

Describe alternatives you've considered

  1. Ignoring all auto shipit errors (Don't want all errors to be lumped together)
  2. Ignore all auto shipit errors returning status 1 (Not very explicit)
  3. Returning a custom status code for only this error (Could allow for folks to opt into ignoring, failing or succeeding with notification but this would require bash scripting).

Additional context

When there is a skipped release the following build will publish the latest version so it is not an issue.

This has been introduced on purpose to distinguish normal skip from skip because commit is behind:

When release is skipped because of trivial changes (labels with releaseType: none), Auto finishes with exit code 0. But being behind in history is not a healthy situation, so I think it's reasonable to expect Auto to finish with exit code 1.

That makes sense. I will see if I can solve this another way. The CI provider is buildkite so I think I can lock the main branch to prevent the conflicts.