-
Notifications
You must be signed in to change notification settings - Fork 5
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
New workflow for synchronization of labels #187
Conversation
I still think so.
It seems he set the criterion to merge as "s: positive review" label. It would be convenient that the script removes the status label after merge. |
Humans can be mistaken (even mathematicians). If we agree that a script is needed which is triggered on
Regarding the set of type labels, I agree. But the name
Yes, if it is guaranteed that there is not a
I think labels would be more useful if there are clear rules and more reliable if they are supervised. |
Of course, it doesn't hurt. I do not object.
It indicates the type (kind?) of a PR. It's already baked into the label prefix
Okay. I agree with that.
Yes if the rules are not overly prohibitive. For that, the set of rules should be small. For |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This already looks very nice! I've a couple of minor suggestions.
Should this PR maybe go directly to the sagemath/sage repo?
.github/sync_labels.py
Outdated
item = sel_list(label) | ||
if sel_list is State and self._pr: | ||
if item in [State.positive_review, State.needs_work]: | ||
self.add_comment('Label *%s* can not be removed. Please use the corresponding functionality of GitHub' % label) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still allow people to actively overwrite the label. For example, if the PR creator realizes she still needs to fix something small, then she can simply add a "needs work" label (but you cannot "request changes" on your own PR). Similarly, not every positive review means that it can directly be merged (e.g. second pairs of eyes needed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Perhaps we should not think "positive review" == "approval". Adding "positive review" label is one person's opinion. She may be another person who gives approval to the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still allow people to actively overwrite the label. For example, if the PR creator realizes she still needs to fix something small, then she can simply add a "needs work" label (but you cannot "request changes" on your own PR). Similarly, not every positive review means that it can directly be merged (e.g. second pairs of eyes needed).
I agree with respect to needs work
. Your second point I don't understand: How has second pairs of eyes needed be realized in Trac other than selecting positive review
at the end by the second pairs of eyes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Perhaps we should not think "positive review" == "approval". Adding "positive review" label is one person's opinion. She may be another person who gives approval to the PR.
As I said above: I think the meaning of positive review
should be as closed to the meaning we are used to from Trac. If we leave the meaning to one person's opinion then the meaning is unknown and the label is not only useless but confusing. Then, as suggested before, we better should remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On trac, you can add yourself as reviewer and comment that you agree with the changes, but don't set the ticket to "positive review". Something like this should still be possible on github, i.e. you review a PR positively but don't add the "positive review" label (or remove it if it has been automatically added).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always allow to add the needs_work
label. This adds a review of github-action
requesting changes. Adding positive_review
I allow in the following cases (not sure if they are strong enought and cover what you meant by second pairs of eyes):
- There must be at least one review of a member
- There should not be changes requested by some one else
- If in addition the actor is different from the author it is allowed
- Elsewise, more checks are needed:
a. There must be at least one review of someone else
b. There must be at least one commit of someone else
If all conditions are satisfied the PR will be approved by github-action
. Else the label is removed and a comment: Label can not be added. Please use the corresponding functionality of GitHub is posted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds very reasonable! Concerning "There should not be changes requested by some one else" not sure what happens in the case someone is against the changes but multiple other people give their positive review. But maybe this situation is rare enough to not need special treatment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should be possible is: after giving a positive review, remove the label "s: positive review" and add instead the "needs review" label (meaning "I agree with the changes, but someone else should also have a look at this PR").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds very reasonable! Concerning "There should not be changes requested by some one else" not sure what happens in the case someone is against the changes but multiple other people give their positive review. But maybe this situation is rare enough to not need special treatment?
I think such a conflict should be resolved using the GitHub review functionality, since comments on the respective review that request changes are needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should be possible is: after giving a positive review, remove the label "s: positive review" and add instead the "needs review" label (meaning "I agree with the changes, but someone else should also have a look at this PR").
You can always add s: needs review
and s: needs info
. In both cases the s: positive review
will be removed by the bot.
@sagemath/core We may consider automatic merging and closing a PR that passes all checks and received one approving review. This would reduce the release manager's work dramatically. Would this be possible by the script? |
Maybe. Perhaps it may be problematic as well that automatic merging makes the "develop" target move too fast. |
Unmarking draft may also trigger adding "needs review" label by the script. |
The goal is that the rules are exactly what we are used to from Trac. In Trac you could not have
I've summarized them in the second paragraph of the PR header. |
I think that would make sense. How can we test it there? Must the |
Of course! Good point! I haven't figured out how this is triggered, right now. |
I am not sure about that. I think we are passing through the period in which people test somewhat varied workflows in the new environment. I wish that the script helps them conveniently work with the new workflow they would settle on.
I already agreed that there should be at most one of status labels and priority labels, respectively.
Thanks. |
It has to be in the default branch of your fork. So simply push this PR to a branch in your sage fork and can change the default branch to it at https://github.com/soehms/sage/settings/branches. |
I mean ideally. Of course that is not achievable.
I agree! My concern is to keep the priority and state labels reliable. |
Thanks! I hope I can find time next week to do the suggested changes and move it to the sage repository. |
I think status labels seems right, according to ChatGPT:
though I am still not sure. |
Indeed, first I used status, since this is the term used in Trac and in German the Latin version is also preferred against Zustand (translation of state) in such a context. But than I noted that Github uses state for it. In the migration the translation happens here: |
I still think so.
It seems he set the criterion to merge as "s: positive review" label. It would be convenient that the script removes the status label after merge. |
I still push my suggestions concerning your review here, I will open a corresponding PR on the sage repository later on with identical branch. Please make your further reviews there. I will comment on the current changes in the according reviews. |
See my comments in the according reviews. This is still just a base of discussion. |
This is sagemath/sage#35172 |
I close this since it is replaced by sagemath/sage#35172. |
This PR is continued in the sage repository as sagemath/sage#35172.
This is a first draft to synchronize the labels migrated from Trac selections list (according to issue #117). These are the priority, type and state labels.
At the moment the script takes care that there is just one item present from each list and it sets defaults on issue and PR opening. Furthermore, it reacts on review approval and change request setting according labels automatically. Setting these labels manually is rejected with a warning comment. If needed that can be changed easily to automatically approving or change requesting.
Open problems and questions:
needs info
.refactoring
,performance
,...) so that on some migrated tickets it is non unique any more. Shall we drop uniqueness for these in general?To be able to run some tests I've developed the draft in the master branch of my trac-to-github fork and created all the labels needed there. I don't know what is the best option for others to test it. Maybe merging it into the upstream repo and create the needed labels there?
Some hints for testing:
Add or remove labels to issues and PRs, or open, close, reopen them and watch out for reactions of the github-actions bot:
If this gives unexpected behavior then look at the log-file of the workflow:
I'm not sure if I will have enough time in the next days and weeks. Therefore, any help and continuation on this PR is welcome!