Skip to content
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

Disable Self Assigns #13

Conversation

jordan-ae
Copy link
Contributor

Resolves #2

@0x4007
Copy link
Member

0x4007 commented Jul 22, 2024

Code looks good. Can you prove it works as expected with a QA test?

Also I would've expected some unit tests although I'm not sure if we have been enforcing them for plugins. @gentlementlegen rfc

@gentlementlegen
Copy link
Member

I would like to see associated tests and a QA run somewhere. Also, maybe this should be configurable through the plugin configuration if we want users to be able to assign themselves again or not.

issue_number: issueNumber.id,
});

return issueEvents.data.some((event) => event.event === "unassigned" && event.event === senderLogin);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sceptical that event.event can be both unassigned and senderLogin, QA would be ideal

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed that this fails on the test CI. I suppose I should be more cautious of reviews from mobile as it is not easy to see these details sometimes.

export async function wasPreviouslyUnassigned(
context: Context,
senderLogin: Context["payload"]["sender"],
issueNumber: Context["payload"]["issue"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming convention for these args is off slightly so it's being used in error in the return statement below I think

@jordan-ae
Copy link
Contributor Author

@gentlementlegen & @Keyrxng this isn't ready for reviews yet. I sent it in so I can save my progress that's why I left it on draft. @0x4007 you should probably revert your approval 😅😅

@Keyrxng
Copy link
Contributor

Keyrxng commented Jul 23, 2024

Normally I wouldn't have reviewed but it was because there was an approval on it I checked it too, I assumed you were waiting till you get the other one through first

issue_number: issueNumber.id,
});

return issueEvents.data.some((event) => event.event === "unassigned" && event.event === senderLogin);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed that this fails on the test CI. I suppose I should be more cautious of reviews from mobile as it is not easy to see these details sometimes.

@gentlementlegen gentlementlegen self-requested a review July 28, 2024 07:06
@ubiquibot ubiquibot bot closed this Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check For Unassigns; Disable Self Assigns
4 participants