Unibeautify / ci-issues

Public Issues for Unibeautify CI
0 stars 1 forks source link

Branch filtering #2

Open Glavin001 opened 5 years ago

Glavin001 commented 5 years ago

From @stevenzeck on October 12, 2018 15:40

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.

Copied from original issue: Unibeautify/unibeautify#205

Glavin001 commented 5 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.

Glavin001 commented 5 years ago

From @lassik on October 17, 2018 13:8

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 5 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 🤔 .

Glavin001 commented 5 years ago

From @stevenzeck on October 17, 2018 17:45

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

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

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