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

"pr-check" behavior differs from "version" when no labels defined #2443

Open
larrywest opened this issue Mar 5, 2024 · 0 comments
Open

"pr-check" behavior differs from "version" when no labels defined #2443

larrywest opened this issue Mar 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@larrywest
Copy link

larrywest commented Mar 5, 2024

All of our projects start off suffering from "No semver label!" failures in their PRs (and a GitHub "Detail" link that just points to the (Jenkins) build).

The "auto version" documentation, however, says:

If a PR does not have a label associated with it, it will default to patch or whatever you configure the default label to.

And that is the behavior I observe: without patch (or major or minor) being defined in the repo, auto version says:

Semantic versioning label for release is patch

The "auto pr-check" documentation says its function is to:

Check that a pull request has a SemVer label...

but doesn't warn that it doesn't follow the same logic as auto version.

Side effect of current behavior

We are unintentionally training developers to ignore "errors" from the "pr-check".

To reproduce

  1. New repo, no SemVer labels defined
  2. Make a PR
  3. Run auto version in the pipeline
  4. Run auto pr-check in the pipeline

Expected behavior

IMHO the auto version behavior is correct: auto pr-check should NOT consider it an error to lack a SemVer label.

After all, why cause breakage when the default of assuming patch is essentially zero risk, and demonstrates useful behavior of auto.

When users have worked long enough on a repo that they want to make a major or minor release, that's when they'll care.

An informative, non-error, message from auto pr-check would still be valuable, but should be something like:

Note: No SemVer label was found; default is "patch". See https://intuit.github.io/auto/docs

Postscript

For external readers, the relevant code section (for prCheck) is in core/src/auto.ts, but I don't know enough Typescript to propose a usable PR.

@larrywest larrywest added the bug Something isn't working label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant