Re: Project hygiene on old PRs

2025-04-15 Thread Štefan Miklošovič
On Mon, Apr 14, 2025 at 3:22 PM Josh McKenzie wrote: > Funny that people don't forget to create a PR when trying to make a change > but as soon as it is delivered the respective PR is "memory holed". > > We use the PR mechanisms for review but don't use the PR mechanism for > merge. Makes sense t

Re: Project hygiene on old PRs

2025-04-15 Thread Josh McKenzie
> I think that there might be legitimate cases when a PR is up just for > extended periods of time because it depends on other functionality or it is > just worked on for such a long time, If something has 0 discussion, movement, or code changes for 6 months I think it's probably safe to close i

Re: Project hygiene on old PRs

2025-04-15 Thread Paulo Motta
> 3) having e.g. a GitHub trigger which would scan commit message when it is merged, extracting JIRA ticket number and then go to GitHub and close respective PRs. This is implementation detail, but I don't think that scanning the commit message on merge would be needed. When a PR is opened with a

Re: Project hygiene on old PRs

2025-04-15 Thread Paulo Motta
Just to clarify option 3), I'm not sure ASF INFRA currently provides the ability of auto-closing PRs associated with a JIRA, this would be a feature request that would obviously need to be triaged and prioritized at their pace. Assuming this is a feasible and reasonable request, then I'd suggest w

Re: Project hygiene on old PRs

2025-04-14 Thread Štefan Miklošovič
Thanks Paulo, I have not known that one. Jordan, yes I agree. I think that unless we automate it it is more about discipline than anything else. If I briefly enumerate the options: 1) put here "closes" as Paulo suggested - that needs manual intervention for a committer to put there such message (

Re: Project hygiene on old PRs

2025-04-14 Thread Josh McKenzie
> Funny that people don't forget to create a PR when trying to make a change > but as soon as it is delivered the respective PR is "memory holed". We use the PR mechanisms for review but don't use the PR mechanism for merge. Makes sense that we open them since they're part of our workflow and for

Re: Project hygiene on old PRs

2025-04-14 Thread Bernardo Botella
+1 on Paulo’s proposal. That will definitely help things up. I will give one or two more days in case someone missed the thread, and if there is no voices against it, I’ll just close the stale PRs and raise the ticket to INFRA to close PRs when a Jira ticket is resolved. Bernardo > On Apr 14,

Re: Project hygiene on old PRs

2025-04-14 Thread Jordan West
If we want something to happen repeatably we should automate it not add more manual tasks to the list. Paulo’s suggestion seems to be in line with that so +1 to something in that direction. We continually are swimming upstream making up our own process. The ask to put the ticket number in the PR

Re: Project hygiene on old PRs

2025-04-14 Thread Paulo Motta
*committers (and not reviewers) On Mon, Apr 14, 2025 at 12:13 PM Paulo Motta wrote: > > I am not sure why it is so hard for people to not forget to close a PR > when their branch is merged. > > I wonder if reviewers* know they need to append the message "Closes > #PR_ID" to the end of the commi

Re: Project hygiene on old PRs

2025-04-14 Thread Paulo Motta
> I am not sure why it is so hard for people to not forget to close a PR when their branch is merged. I wonder if reviewers know they need to append the message "Closes #PR_ID" to the end of the commit message to have the PR be closed, this does not seem very obvious, but it's also a bit inconven

Re: Project hygiene on old PRs

2025-04-14 Thread Bernardo Botella
Just for reference, I ran a script I wrote using Stefan’s as inspiration, and there are 413 PRs without any activity for the past 6 months. Bernardo > On Apr 14, 2025, at 6:39 AM, Štefan Miklošovič wrote: > > > > On Mon, Apr 14, 2025 at 3:22 PM Josh McKenzie > w

Re: Project hygiene on old PRs

2025-04-14 Thread Mick Semb Wever
On Mon, 14 Apr 2025 at 10:23, Štefan Miklošovič wrote: > BTW If you still do not want to take care of closing it, that is also > fine, because we have a script at least. > >> >>> Relying on the PR name seems a bit brittle. Maybe it wouldn't take much to improve it. e.g. would it be possible to

Re: Project hygiene on old PRs

2025-04-14 Thread Štefan Miklošovič
BTW If you still do not want to take care of closing it, that is also fine, because we have a script at least. But in that case, please do the absolute minimum and just be sure that you name your PRs correctly (starting with a JIRA ticket number) so the script will detect it. The worse combination

Re: Project hygiene on old PRs

2025-04-14 Thread Štefan Miklošovič
I am not sure why it is so hard for people to not forget to close a PR when their branch is merged. I stopped "fighting" this and I just run a script every few weeks. Funny that people don't forget to create a PR when trying to make a change but as soon as it is delivered the respective PR is "memo

Re: Project hygiene on old PRs

2025-04-13 Thread Bernardo Botella
Thanks Josh and Stefan for the comments! Such a script can definitely be helpful for this purpose of keeping our house tidy. It seems that the thread hasn’t gotten much steam yet. As this is, by no means, any urgent matter, let’s give some more time for people to pitch in. I’ll wait some more d

Re: Project hygiene on old PRs

2025-04-11 Thread Štefan Miklošovič
I have a small script which scans GH pull requests (their titles) and looks into JIRA to see what is their status. When it is "resolved" it prints it to the console. Then I go over the links of PRs and close them one by one. This relies on the title of the PR to be in exact format (CASSANDRA-123 a

Re: Project hygiene on old PRs

2025-04-11 Thread Josh McKenzie
+1 from me. My intuition is that this is a logical consequence of us not using github to merge PR's so they don't auto-close. Which seems like it's a logical consequence of us using merge commits instead of per-branch commits of patches. The band-aid of at least having a human-in-the-loop to cl