Generator-jhipster: Add Support for Skip CI for Dependabot Upgrades

Created on 20 Jun 2020  路  8Comments  路  Source: jhipster/generator-jhipster

Overview of the issue

This is with regard to the following comment; https://github.com/jhipster/generator-jhipster/pull/11915#issuecomment-646718030

Related to: https://github.com/jhipster/generator-jhipster/issues/11914

Motivation for or Use Case

Skip CI for dependabot PRs.

Suggest a Fix

PR given below.

  • [x] Checking this box is mandatory (this is just to show you read everything)
area dependencies

Most helpful comment

@SudharakaP
Every PR is built 2 times, one at personal repository and another at jhipster repository, to reduce build triggers at jhipster repository makes sense to use skip-ci for drafts PRs, maybe by default.
So when I set the skip-ci label to draft only I was thinking about making it temporary and don't duplicate builds.

When the PR is not draft (meaning the PR is not ready to be reviewed) I don't think the label is useful, the reviewer should have the CI result every time, and the temporary skip-ci can falsely show that the PR built successfully by pushing the branch with skip-ci label and then removing it. Not a big problem since the label removal will be shown at the timeline.
So I would prefer [skip-ci] at commit message for non temporary skip-ci.

I don't disagree to make skip-ci non draft.
It is just less intrusive, and it's really easy to convert to draft.

All 8 comments

@pascalgrimaud : In the above pull request, we will be adding a label for add dependabot created PRs (it's called theme: dependabot-dependencies). Then each GitHub action except the generator action will skip PR's with that label. I've also simplified some logic in that was introduced in https://github.com/jhipster/generator-jhipster/pull/11800. I don't think we need to check for drafts specifically. Correct me if I am wrong. :thinking:

cc: @mshima

@pascalgrimaud : Also, for Azure pipelines; the easiest way is to handle this is to add a exclude trigger for dependabot/* branches.

Reference: https://docs.microsoft.com/en-us/azure/devops/pipelines/release/triggers?view=azure-devops

@SudharakaP
Every PR is built 2 times, one at personal repository and another at jhipster repository, to reduce build triggers at jhipster repository makes sense to use skip-ci for drafts PRs, maybe by default.
So when I set the skip-ci label to draft only I was thinking about making it temporary and don't duplicate builds.

When the PR is not draft (meaning the PR is not ready to be reviewed) I don't think the label is useful, the reviewer should have the CI result every time, and the temporary skip-ci can falsely show that the PR built successfully by pushing the branch with skip-ci label and then removing it. Not a big problem since the label removal will be shown at the timeline.
So I would prefer [skip-ci] at commit message for non temporary skip-ci.

I don't disagree to make skip-ci non draft.
It is just less intrusive, and it's really easy to convert to draft.

@mshima : Thanks much for the information, I understand your intention of doing it that way. I've reverted that code to its original state so that it skips ci for draft PRs.

@pascalgrimaud : Just to be clear, I've just created a new label called; theme: dependabot-dependencies since otherwise this will not work; as noticed here; https://github.com/jhipster/generator-jhipster/pull/11964#issuecomment-646945098.

Also if you want me to do the Azure trigger addition; let me know. I can do that if given the appropriate access to the generator pipelines.

Azure builds should be ignore when there is PR from dependabot
Just an idea, maybe we can ignore it when the author is dependabot ?

Azure builds should be ignore when there is PR from dependabot
Just an idea, maybe we can ignore it when the author is dependabot ?

This will ignore when merged to master too.
Maybe we don鈥檛 want that.

@pascalgrimaud @mshima : I have overlooked a simple way of doing it through configuration; PR submitted at, https://github.com/jhipster/generator-jhipster/pull/11966

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chegola picture chegola  路  4Comments

pascalgrimaud picture pascalgrimaud  路  3Comments

kaidohallik picture kaidohallik  路  3Comments

frantzynicolas picture frantzynicolas  路  3Comments

RizziCR picture RizziCR  路  3Comments