Unibeautify / unibeautify

One Beautifier to rule them all, One Beautifier to clean them, One Beautifier to bring them all and in the darkness sheen them
https://unibeautify.com/
MIT License
544 stars 41 forks source link

Evaluate usage of Unibeautify CI #205

Closed stevenzeck closed 6 years ago

stevenzeck commented 6 years ago

Unibeautify CI is great, however if left unchecked it can cause a TON of backlogs in Travis. I forget which repo it was, but Unibeautify was not correct on master. Whenever Renovate created a new branch for a dependency update, Unibeautify CI also created a branch to fix the branch that Renovate created. Scenario example:

  1. master, UB CI is failing and has a unibeautify/master branch to fix it
  2. Renovate creates a branch for typescript dependency update: renovate/typescript3.x. Travis CI build starts for this branch
  3. renovate/typescript3.x also fails UB CI, so UB CI creates a branch to fix it: unibeautify/renovate/typescript3.x. Another Travis CI build starts for this branch
  4. Open a PR to merge unibeautify/renovate/typescript3.x to renovate/typescript3.x. Travis CI build starts
  5. Merge PR, another Travis CI build starts for renovate/typescript3.x

That's 4 Travis CI builds when it only needs 1.

Glavin001 commented 6 years ago

@stevenzeck Great observation! Do you think disabling branches with glob patterns would be a good solution? For example, exclude renovate/* branch names from being processed.

Also I think this should be moved to https://github.com/Unibeautify/unibeautify-ci-issues However, it appears https://github-issue-mover.appspot.com is currently down with 503 Server Error.

lassik commented 6 years ago

Unibeautify CI is the cloud-based job that prints style errors on Travis, right? It's really cool!

Would it work to only enable it for PRs? If our workflow is that humans only commit via PR, and Renovate only commits changes to package.json

Glavin001 commented 6 years ago

Unibeautify CI is the cloud-based job that prints style errors on Travis, right? It's really cool!

No, it is completely separate solution from Travis CI or other CIs. Unibeautify CI creates a branch with fixes, if applicable, and generates a report to show in GitHub Checks tab: https://blog.github.com/2018-05-07-introducing-checks-api/

Check out https://github.com/apps/unibeautify-ci 🎉 !

If our workflow is that humans only commit via PR...

I wonder if I can detect which PRs are opened by humans or not 🤔 .

stevenzeck commented 6 years ago

https://docs.travis-ci.com/user/customizing-the-build/#safelisting-or-blocklisting-branches

# blocklist
branches:
  except:
  - /^renovate\/.*$/
Glavin001 commented 6 years ago

Good point, @stevenzeck . Learn from the best. Travis CI, tried and true.

Glavin001 commented 6 years ago

This issue was moved to Unibeautify/unibeautify-ci-issues#2