Plots2: Danger: Add wip label for PRs that doesn't comply

Created on 4 Feb 2017  路  14Comments  路  Source: publiclab/plots2

I think it's a great idea for danger to add a wip label for PRs that doesn't comply with the guideline and won't check it unless the wip label is removed. If it complies with the guideline, add a pending review label.

help wanted

Most helpful comment

I tried to implement the functionality using https://github.com/marketplace/actions/add-remove-label, and it seems to work. (I tried and can be checked here: https://github.com/anirudhprabhakaran3/test-danger/pulls. Forgive me for the excessive pull requests)

What this does is basically adds the "WIP" label in to every PR before running tests. After all the tests, there is a section which removes the "WIP" label and adds the "Review" label.

When all tests pass, the final block of code will also run, changing the label to Review.

(The only issue is that it doesn't seem to have colors for the labels)

All 14 comments

+1!

I looked into Danger's documentation, and don't know if there's a possible way to add/remove labels. However, its fairly easy to check for labels, so the part where Danger does not check PRs labelled "WIP" could be easily achieved. The job of adding labels could, however, be performed by the bot. @jywarren What do you say?

Sure, that sounds good!

It seems as though we have stopped using DANGER. Nevertheless, this is still a very useful feature that should be included. I'll try searching for other ways to achieve it

I tried to implement the functionality using https://github.com/marketplace/actions/add-remove-label, and it seems to work. (I tried and can be checked here: https://github.com/anirudhprabhakaran3/test-danger/pulls. Forgive me for the excessive pull requests)

What this does is basically adds the "WIP" label in to every PR before running tests. After all the tests, there is a section which removes the "WIP" label and adds the "Review" label.

When all tests pass, the final block of code will also run, changing the label to Review.

(The only issue is that it doesn't seem to have colors for the labels)

Should I make a PR using this approach @jywarren @cesswairimu ?

Hi @anirudhprabhakaran3, oh wow...it is looking great is it possible to change the review label to ready-for-review ?
otherwise this looks good to me. I would like to hear what @jywarren and @RuthNjeri think. Thanks for looking into this @anirudhprabhakaran3

Yeah, changing the name of the label shouldn't be a problem. The only issue is that I can't test this locally, so the only way to test the new GitHub Actions workflow would be after merging it...

Hi @anirudhprabhakaran3, it looks great,I think you should create a PR for it. My only concern at the moment is the Codeclimate checks, sometimes, they are ignored even if the PR shows that the CodeClimate checks have failed. Will that affect the test labels?

Oh yeah, I'll look into the order of actions in the workflow. I might be able to adjust the location of the labelling process.

The issue that I'm facing is that all the different jobs are being run in parallel. This is affecting the labelling system that I had thought of. Let me see what other approach I can use

cool, thanks a lot @anirudhprabhakaran3

Got it. If someone could review that would be great https://github.com/publiclab/plots2/pull/9735

The labelling is not working it seems.
The logs show the error Resource not accessible by integration.

According to the GitHub docs, we're getting this error because the GITHUB_TOKEN has only read permissions, which means that it can't be used by forks, and that's not allowing us to add labelling.

I'll try to find a fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grvsachdeva picture grvsachdeva  路  3Comments

shapironick picture shapironick  路  3Comments

divyabaid16 picture divyabaid16  路  3Comments

grvsachdeva picture grvsachdeva  路  3Comments

grvsachdeva picture grvsachdeva  路  3Comments