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

feat: a flag to skip CI #443

Merged
merged 3 commits into from
May 20, 2020
Merged

feat: a flag to skip CI #443

merged 3 commits into from
May 20, 2020

Conversation

alexander-fenster
Copy link
Contributor

Instead of making assumptions such as "let's run / let's not run CI for the first / the last / whatever file", let's just make it configurable. I'm only using this flag in the simple releaser but any other releaser can be upgraded if needed. The default behavior is skipCi: true so nothing is changed for other releasers.

@alexander-fenster alexander-fenster requested a review from bcoe May 20, 2020 01:33
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 20, 2020
@codecov
Copy link

codecov bot commented May 20, 2020

Codecov Report

Merging #443 into master will increase coverage by 0.26%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #443      +/-   ##
==========================================
+ Coverage   79.61%   79.88%   +0.26%     
==========================================
  Files          40       40              
  Lines        4519     4578      +59     
  Branches      374      384      +10     
==========================================
+ Hits         3598     3657      +59     
  Misses        920      920              
  Partials        1        1              
Impacted Files Coverage Δ
src/github.ts 75.81% <100.00%> (+0.52%) ⬆️
src/releasers/simple.ts 92.85% <100.00%> (+0.07%) ⬆️
src/updaters/changelog.ts 100.00% <100.00%> (ø)
src/updaters/java/google-utils.ts 100.00% <100.00%> (ø)
src/updaters/java/java_update.ts 96.34% <100.00%> (+0.18%) ⬆️
src/updaters/package-json.ts 100.00% <100.00%> (ø)
src/updaters/php-client-version.ts 88.88% <100.00%> (+0.79%) ⬆️
src/updaters/php-manifest.ts 89.18% <100.00%> (+0.45%) ⬆️
src/updaters/python/setup-cfg.ts 100.00% <100.00%> (ø)
src/updaters/python/setup-py.ts 100.00% <100.00%> (ø)
... and 6 more

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 fccfc51...fe571ee. Read the comment docs.

Copy link
Contributor

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea, but how do you feel about combining it with your initial idea of skipping all but the last commit if you don't do have CI turned on.

I think if we took this approach, I'd then feel safe turning this setting on by default in our cloud function that runs release-please.

@alexander-fenster
Copy link
Contributor Author

@bcoe OK, so now:

  • if skipCi is unset for all updates (default behavior), we disable CI (set skipCI = true) for all files except the last one - this case covers all the existing releasers used by Yoshi;
  • if skipCi is set at least for one update (to true or false), we think that this releaser cares about it, and skip CI for all updates where it is unset.

@bcoe bcoe merged commit 17e0636 into master May 20, 2020
@bcoe bcoe deleted the ci-no-skip branch May 20, 2020 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants