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

version: take into account current PR labels #2252

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

laughedelic
Copy link
Contributor

@laughedelic laughedelic commented Sep 8, 2022

When running auto version from a PR, take into account its labels (not only for the next branch PRs).

What Changed

I removed the if (isPrerelease) condition.

Why

When I run auto version from CI on a PR, it doesn't take into account this PR labels:

  • I'm working on a breaking change in a PR and add the major label
  • run auto version from CI, expecting major in the output
  • it returns default patch because it only looks at the commits on the branch and not the labels on the PR

TODO

  • Add tests
  • Add docs

Change Type

Indicate the type of change your pull request is:

  • documentation
  • patch
  • minor
  • major

🐤 Download canary assets:

auto-linux--canary.2252.26551.gz
auto-macos--canary.2252.26551.gz
auto-win.exe--canary.2252.26551.gz

📦 Published PR as canary version: under canary scope @auto-canary@10.37.6--canary.2252.26551.0

✨ Test out this PR locally via:

npm install @auto-canary/bot-list@10.37.6--canary.2252.26551.0
npm install @auto-canary/auto@10.37.6--canary.2252.26551.0
npm install @auto-canary/core@10.37.6--canary.2252.26551.0
npm install @auto-canary/package-json-utils@10.37.6--canary.2252.26551.0
npm install @auto-canary/all-contributors@10.37.6--canary.2252.26551.0
npm install @auto-canary/brew@10.37.6--canary.2252.26551.0
npm install @auto-canary/chrome@10.37.6--canary.2252.26551.0
npm install @auto-canary/cocoapods@10.37.6--canary.2252.26551.0
npm install @auto-canary/conventional-commits@10.37.6--canary.2252.26551.0
npm install @auto-canary/crates@10.37.6--canary.2252.26551.0
npm install @auto-canary/docker@10.37.6--canary.2252.26551.0
npm install @auto-canary/exec@10.37.6--canary.2252.26551.0
npm install @auto-canary/first-time-contributor@10.37.6--canary.2252.26551.0
npm install @auto-canary/gem@10.37.6--canary.2252.26551.0
npm install @auto-canary/gh-pages@10.37.6--canary.2252.26551.0
npm install @auto-canary/git-tag@10.37.6--canary.2252.26551.0
npm install @auto-canary/gradle@10.37.6--canary.2252.26551.0
npm install @auto-canary/jira@10.37.6--canary.2252.26551.0
npm install @auto-canary/magic-zero@10.37.6--canary.2252.26551.0
npm install @auto-canary/maven@10.37.6--canary.2252.26551.0
npm install @auto-canary/microsoft-teams@10.37.6--canary.2252.26551.0
npm install @auto-canary/npm@10.37.6--canary.2252.26551.0
npm install @auto-canary/omit-commits@10.37.6--canary.2252.26551.0
npm install @auto-canary/omit-release-notes@10.37.6--canary.2252.26551.0
npm install @auto-canary/pr-body-labels@10.37.6--canary.2252.26551.0
npm install @auto-canary/released@10.37.6--canary.2252.26551.0
npm install @auto-canary/s3@10.37.6--canary.2252.26551.0
npm install @auto-canary/sbt@10.37.6--canary.2252.26551.0
npm install @auto-canary/slack@10.37.6--canary.2252.26551.0
npm install @auto-canary/twitter@10.37.6--canary.2252.26551.0
npm install @auto-canary/upload-assets@10.37.6--canary.2252.26551.0
npm install @auto-canary/version-file@10.37.6--canary.2252.26551.0
npm install @auto-canary/vscode@10.37.6--canary.2252.26551.0
# or 
yarn add @auto-canary/bot-list@10.37.6--canary.2252.26551.0
yarn add @auto-canary/auto@10.37.6--canary.2252.26551.0
yarn add @auto-canary/core@10.37.6--canary.2252.26551.0
yarn add @auto-canary/package-json-utils@10.37.6--canary.2252.26551.0
yarn add @auto-canary/all-contributors@10.37.6--canary.2252.26551.0
yarn add @auto-canary/brew@10.37.6--canary.2252.26551.0
yarn add @auto-canary/chrome@10.37.6--canary.2252.26551.0
yarn add @auto-canary/cocoapods@10.37.6--canary.2252.26551.0
yarn add @auto-canary/conventional-commits@10.37.6--canary.2252.26551.0
yarn add @auto-canary/crates@10.37.6--canary.2252.26551.0
yarn add @auto-canary/docker@10.37.6--canary.2252.26551.0
yarn add @auto-canary/exec@10.37.6--canary.2252.26551.0
yarn add @auto-canary/first-time-contributor@10.37.6--canary.2252.26551.0
yarn add @auto-canary/gem@10.37.6--canary.2252.26551.0
yarn add @auto-canary/gh-pages@10.37.6--canary.2252.26551.0
yarn add @auto-canary/git-tag@10.37.6--canary.2252.26551.0
yarn add @auto-canary/gradle@10.37.6--canary.2252.26551.0
yarn add @auto-canary/jira@10.37.6--canary.2252.26551.0
yarn add @auto-canary/magic-zero@10.37.6--canary.2252.26551.0
yarn add @auto-canary/maven@10.37.6--canary.2252.26551.0
yarn add @auto-canary/microsoft-teams@10.37.6--canary.2252.26551.0
yarn add @auto-canary/npm@10.37.6--canary.2252.26551.0
yarn add @auto-canary/omit-commits@10.37.6--canary.2252.26551.0
yarn add @auto-canary/omit-release-notes@10.37.6--canary.2252.26551.0
yarn add @auto-canary/pr-body-labels@10.37.6--canary.2252.26551.0
yarn add @auto-canary/released@10.37.6--canary.2252.26551.0
yarn add @auto-canary/s3@10.37.6--canary.2252.26551.0
yarn add @auto-canary/sbt@10.37.6--canary.2252.26551.0
yarn add @auto-canary/slack@10.37.6--canary.2252.26551.0
yarn add @auto-canary/twitter@10.37.6--canary.2252.26551.0
yarn add @auto-canary/upload-assets@10.37.6--canary.2252.26551.0
yarn add @auto-canary/version-file@10.37.6--canary.2252.26551.0
yarn add @auto-canary/vscode@10.37.6--canary.2252.26551.0

When running `auto version` from a PR, take into account its labels (not only for the next branch PRs)
@laughedelic
Copy link
Contributor Author

I think CI failed because GitHub token is not available for external contributor

@hipstersmoothie hipstersmoothie added the patch Increment the patch version when merged label Sep 13, 2022
@hipstersmoothie hipstersmoothie merged commit a0137eb into intuit:main Sep 13, 2022
@hipstersmoothie
Copy link
Collaborator

🚀 PR was released in v10.37.6 🚀

@hipstersmoothie hipstersmoothie added the released This issue/pull request has been released. label Sep 13, 2022
@laughedelic laughedelic deleted the patch-1 branch October 13, 2022 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants