ubiquity-os-marketplace / daemon-merging

Automatically merges pull-requests that do not have activity beyond a certain deadline.
0 stars 7 forks source link

Approved roles #19

Closed Keyrxng closed 1 month ago

Keyrxng commented 1 month ago

Resolves #18

gentlementlegen commented 1 month ago

I think there is a logic issue. Take the following scenario: In the configuration, I set allowedReviewerRoles to ["OWNER"]. When the merge timeout will try to get the deadline requirements, a MEMBER would be considered as a COLLABORATOR instead of CONTRIBUTOR because COLLABORATOR is not in the allowedReviewerRoles.

Example run: https://github.com/Meniole/automated-merging/actions/runs/10748866022/job/29813121322#step:6:68

Keyrxng commented 1 month ago

I think there is a logic issue. Take the following scenario: In the configuration, I set allowedReviewerRoles to ["OWNER"]. When the merge timeout will try to get the deadline requirements, a MEMBER would be considered as a COLLABORATOR instead of CONTRIBUTOR because COLLABORATOR is not in the allowedReviewerRoles.

Example run: https://github.com/Meniole/automated-merging/actions/runs/10748866022/job/29813121322#step:6:68

I'm a little confused by what you are implying. I think you are suggesting that the deadline requirement array should be the same as it was before that way they'd be assigned COLLABORATOR and not the default CONTRIBUTOR in the event that the allowedReviewerRoles does not contain COLLABORATOR, is that right @gentlementlegen?

gentlementlegen commented 1 month ago

With the following configuration

  - uses:
    - plugin: ubiquity/automated-merging@development
      with:
        approvalsRequired:
          collaborator: 1
        mergeTimeout:
          collaborator: "2 minutes"
        repos:
          monitor: [ ]
          ignore: ["conversation-rewards"]
        allowedReviewerRoles: ["OWNER"]

Someone with the COLLABORATOR role would not be able to be considered to be counted within the reviewers, which is ok and intended. However if the collaborator is the one opening the pull-request, its timing for closing would be the ones for contributor instead of collaborator because the array considered to check the merge timeout is only OWNER. Hope it is clear enough.

0x4007 commented 1 month ago

What is an "owner" role? There should only be, basically: admin, assignee, collaborator, contributor.

Is owner the pull request creator?

gentlementlegen commented 1 month ago

OWNER is the creator of the repository. I took this as an arbitrary example, same would apply if I used ADMIN, that would be considered as a CONTRIBUTOR for merging timeout in that example.

Keyrxng commented 1 month ago

With the following configuration

  - uses:
    - plugin: ubiquity/automated-merging@development
      with:
        approvalsRequired:
          collaborator: 1
        mergeTimeout:
          collaborator: "2 minutes"
        repos:
          monitor: [ ]
          ignore: ["conversation-rewards"]
        allowedReviewerRoles: ["OWNER"]

Someone with the COLLABORATOR role would not be able to be considered to be counted within the reviewers, which is ok and intended. However if the collaborator is the one opening the pull-request, its timing for closing would be the ones for contributor instead of collaborator because the array considered to check the merge timeout is only OWNER. Hope it is clear enough.

Not sure how else to address the scenario that you raised apart from retaining your original implementation and hardcoding the timeout roles.

  1. Potential user errors using the same allowedReviewerRoles item and additional unneeded complexity adding a new config item for this array separately.
  2. I figured that specific aspect is author-defined like the way skipBotsEvents should be as oppose to author defined.

Can you fix your yarn I can't find your comment rn but didn't we agree that we'd standardize this? No harm done including it but potential room for error without it. I stated it as an addition in the spec body too.

0x4007 commented 1 month ago

Don't understand your message. What's the problem?

gentlementlegen commented 1 month ago

Seems that it works properly, my last QA: https://github.com/Meniole/automated-merging/actions/runs/10828231151/job/30043117944#step:6:68 Automated merge: https://github.com/Meniole/automated-merging/pull/19

Keyrxng commented 1 month ago

Don't understand your message. What's the problem?

I don't understand your message now lmao.

This feature simplifies two core workflows:

It eases new contributor onboarding, since they won't have to follow system-specific installation processes anymore just to have the package manager you want them to.

It allows you to ensure that everyone in your team will use exactly the package manager version you intend them to, without them having to manually synchronize it each time you need to make an update.

0x4007 commented 1 month ago

@gentlementlegen why did UbiquityOS handle the merge?

Would be funny if it read the conversation and picked up on the vibes to merge.

gentlementlegen commented 1 month ago

@0x4007 I noticed that the configuration was set to 5 minutes for collaborators, probably for testing, I corrected that afterwards so it doesn't happen again. Maybe we could do sentiment analysis and eventually merge lol

0x4007 commented 1 month ago
+ ~ * checking vibes, please wait... * ~ +