Open jlangy opened 3 years ago
I made a pr to the original repo. https://github.com/bcgov/repomountie/pull/136
We will propose to update the current behaviour of the repomountie to consider all edge cases and proceed once the feature is signed off.
If a dormant issue goes ignored for 180 days, repomountie should create a comment on the existing open dormant issue in order to notify the repository owners and should not create a duplicate issue to avoid future issue spam.
Similar logic is already implemented and for consistency I'd like to rely on this logic. See handlers.ts
line 157:
requestUpdateForMyIssues(context, owner, repo),
EDIT: If we would like to change when it asks for an update on an open issue then we should be consistent (unless we have good reason not to be) and update all the bots issues accordingly. If we do want this issue to be a special snowflake then lets adapt existing logic to be more flexible ratter that write custom logic for this feature.
Scenario: Close all dormant issues for archived repositories Given a repository is archived And it has open dormant issues When when the repository information gets analyzed Then repomountie closes all dormant issues
Can this be done? Maybe using the API makes this possible but when you archive a repository you can not update Issues or Pull Requests via the Web. I think GitHub advising this housekeeping prior to archiving a repo.
If a dormant issue goes ignored for 180 days, repomountie should create a comment on the existing open dormant issue in order to notify the repository owners and should not create a duplicate issue to avoid future issue spam.
Similar logic is already implemented and for consistency I'd like to rely on this logic. See
handlers.ts
line 157:requestUpdateForMyIssues(context, owner, repo),
EDIT: If we would like to change when it asks for an update on an open issue then we should be consistent (unless we have good reason not to be) and update all the bots issues accordingly. If we do want this issue to be a special snowflake then lets adapt existing logic to be more flexible ratter that write custom logic for this feature.
@jleach yes, I see repomountie checks stale issues for 90 days and creates a comment on it.
"staleIssueMaxDaysOld": 90
I believe that we can delegate the scenario Comment on dormant issues for inactive repositories
to the existing requestUpdateForMyIssues
?
@wenzowski do you have any opinion of this?
Scenario: Close duplicate dormant issues Given a repository has two or more duplicate open dormant issues When when the repository information gets analyzed Then repomountie closes all dormant issues except the oldest dormant issue open
I think this might make a great independent feature to be applied to all issues. If not already there will probably be other features in the future that create duplicates - would be nice to have one features that deals with duplicate open issues.
also, it seems not possible to close open issues on already archived repositories as they are read-only..
We might need to drop the scenario Close all dormant issues for archived repositories
.
Scenario: Close duplicate dormant issues Given a repository has two or more duplicate open dormant issues When when the repository information gets analyzed Then repomountie closes all dormant issues except the oldest dormant issue open
I think this might make a great independent feature to be applied to all issues. If not already there will probably be other features in the future that create duplicates - would be nice to have one feature that deals with duplicate open issues.
very good point! I am a little afraid that this might be out of scope this feature though. @wenzowski do you have any other insights into this?
@jlangy I think you have one other scenario to consider. What happens when a repos has a closed dormant issue but the repo has not been archived?
i.e:
A repo is dormant for 181 days, someone closes the "dormant issue" but does not address the problem leaving the repo un-archived?
You can: a) Re-open the closed issue immediately or give it a grace period; b) Do nothing, no more "dormant issues" are created.
ProTip: I'd fix the existing issue first and add this as another independent feature.
@jlangy I think you have one other scenario to consider. What happens when a repos has a closed dormant issue but the repo has not been archived?
i.e:
A repo is dormant for 181 days, someone closes the "dormant issue" but does not address the problem leaving the repo un-archived?
You can: a) Re-open the closed issue immediately or give it a grace period; b) Do nothing, no more "dormant issues" are created.
ProTip: I'd fix the existing issue first and add this as another independent feature.
@jleach Thank you for considering other edge cases!
The first scenario Notification for inactive repositories
actually catch that case.
see the example:
| Days | Archived | Has_open_dormant_issue | Has_closed_dormant_issue_created_within_180_days | Result |
| 181 | False | False | False | Creates |
so, it will simply create another one rather than re-opening closed one as the content will be different.
@jlangy I think you have one other scenario to consider. What happens when a repos has a closed dormant issue but the repo has not been archived?
i.e:
A repo is dormant for 181 days, someone closes the "dormant issue" but does not address the problem leaving the repo un-archived?
You can: a) Re-open the closed issue immediately or give it a grace period; b) Do nothing, no more "dormant issues" are created.
ProTip: I'd fix the existing issue first and add this as another independent feature.
Hey Jason, The first scenario will create a 'new issue' given a not updated repo at least +180 days has not an open dormant issue created at least 180 days ago. Thinking in an example, given a repo with 361 days not updated and one closed dormant issue created 181 days ago, another issue will be created when repomountie executes the feature.
@junminahn I believe the original intent for when a repo has a closed dormant issue but the repo has not been archived would create a new issue in order to act like a heartbeat, yes? Should the story be updated to capture that intent? The number of repos that are maintained but change infrequently is quite low, and the risk of non-maintenance in production services was identified as significant, yes? I imagine the other option would be to reopen the existing closed issue. I also imagine that a future feature might read the lifecycle tags or a similar mechanic for something like a maintainer-declared neverdormant
exemption? An example of a repo that might want this is future feature is https://github.com/bcgov/bc-sans
As far as splitting independent features go, I'm a firm believer that in order to empower our product owners to make efficient decisions on effective technical recommendations we should split things out wherever we identify isolatable functionality, as Jason has identified above.
@wenzowski
the original intent for when a repo has a closed dormant issue but the repo has not been archived would create a new issue
Yes, the first scenario covers that up already. I don't think we need to update the case.
other option would be to reopen the existing closed issue
As the first scenario simply creates a new one, no need to re-open the closed one and also the content will be different.
feature might read the lifecycle tags or a similar mechanic for something like a maintainer-declared neverdormant exemption
This is a very good feature we can recommend in another feature request.
we should split things out wherever we identify isolatable functionality
I totally agree with this point. I believe we can separate the scenario Close duplicate dormant issues
as an independent feature so that it will go through all issues to close duplicates. Should we drop this scenario from this feature and create another feature then?
@jleach @wenzowski @eazeredo I dropped and updated the scenarios to describe better. Let me know if there is still unclear statement.
@junminahn Are we good to go with fixing the existing feature? Any more discussion needed?
@jleach based on your feedback of scenario Close duplicate dormant issues
, we created a separate feature Close Duplicate Repomountie Issues
https://github.com/bcgov/github-optimization/issues/93
Once we decide to have card #93 as a separate feature, we will re-iterate this feature to update.
@wenzowski am I following the process correctly?
Related links on repomountie