-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
[WIP] Fix #191 - remove common attributes when not in PR title #269
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request and interest in making D better, @berni44! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. |
I'm not familiar enough with the bot to understand, what's going wrong here. Maybe, someone can help me? |
From what I can tell:
Line 112 in 52d814c
Lines 221 to 231 in 52d814c
Lines 18 to 26 in 52d814c
You need to update one or more unit tests. Even if the CI was not failing, I'd say that you still need to add a test coverage for the new behavior. Edit: See where the PR number |
Meanwhile I updated some. Yet it's still failing. Will check this the other day...
Yes, I'll do. But first I'd like to get the existing unittests running... |
This is now a completely different approach: Instead of automatically removing labels, that are not present in the title, the bot removes labels, when they are preceded by a minus in the title, like [-wip]. This has the advantage, that no unittests need to be changed. Unfortunately I did not manage to write a unittest, that tests the new features. My knowledge about all this is too limited to guess, what I need to do. Maybe it's possible to hijack the "label-via-title" test and remove "trivial" there. I don't know how to do this, because it's not another opening of the same test, but this time a edited event. I don't know how the corresponding json file should look like. Alternatively one could use a separate test. In that case, a label must be set somehow before the test is run. Again I don't know how to do this. So all in all: I have to give up at this stage. :-( |
What problem is this attempting to solve? |
People, who have no write access can add WIP label but not remove them, which renders the ability of adding them quite useless. Once added, people do not look at the PR anymore and so no one cares about the PR and you can't remove that label. All in all, the "feature" to add the WIP label turns out to be a trap (without this). |
Why would you want to use WIP labels instead of draft pull requests? |
Then: Why does the WIP label exist and why can users without write access set it? |
It predates the GitHub draft pull request feature by a few years.
Before the GitHub feature was added, many people used the convention of prefixing the pull request title with "[WIP] " or such. @dlang-bot picked up on this convention and added the label to allow easily filtering such PRs, I guess. |
I did not find a way to compare the old title with the new one, so I choose a simple approach to remove all labels, that are not listed in the title, whenever the title is changed.
Drawback of this solution is, when someone with write access adds one of the labels manually and changes the title later, the label will be removed - that means, people with write access should also use the title to add and remove WIP and trivial. (But people with write access can just add the label again, while people without write access can't do anything to remove the wrong label.)