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

Add --exists $LABEL to label command #1383

Merged
merged 1 commit into from
Jul 16, 2020

Conversation

stabbylambda
Copy link
Contributor

@stabbylambda stabbylambda commented Jul 16, 2020

What Changed

This allows CI builds to check for existence of a label without
grepping for text in the label output.

Why

Most of our CI pipelines follow the same format, which is "run this command if it's a patch release". Those checks usually follow the form of auto label | grep patch. This just simplifies that to checking for label existence and setting the exit code to 1 if the label doesn't exist.

Todo:

  • Add tests
  • Add docs
📦 Published PR as canary version: under canary scope @[email protected]

✨ Test out this PR locally via:

npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
npm install @auto-canary/[email protected]
# or 
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]
yarn add @auto-canary/[email protected]

This allows CI builds to check for existence of a label without
grepping for text in the label output.
@hipstersmoothie hipstersmoothie added the minor Increment the minor version when merged label Jul 16, 2020
@codecov
Copy link

codecov bot commented Jul 16, 2020

Codecov Report

Merging #1383 into master will increase coverage by 0.01%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1383      +/-   ##
==========================================
+ Coverage   81.06%   81.08%   +0.01%     
==========================================
  Files          56       56              
  Lines        4194     4203       +9     
  Branches      919      875      -44     
==========================================
+ Hits         3400     3408       +8     
  Misses        556      556              
- Partials      238      239       +1     
Impacted Files Coverage Δ
packages/cli/src/parse-args.ts 97.29% <ø> (ø)
packages/cli/src/run.ts 25.80% <0.00%> (-0.43%) ⬇️
packages/core/src/auto.ts 77.38% <100.00%> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 16ef1a7...ed25e74. Read the comment docs.

@hipstersmoothie hipstersmoothie merged commit 44c0653 into intuit:master Jul 16, 2020
@stabbylambda stabbylambda deleted the label-exists branch July 16, 2020 20:22
@adierkens
Copy link
Collaborator

🚀 PR was released in v9.47.0 🚀

@adierkens adierkens added the released This issue/pull request has been released. label Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants