Skip to content

Add a command to allow rejecting a pull request as a duplicate#10018

Open
gparyani wants to merge 13 commits into
Charcoal-SE:masterfrom
gparyani:patch-2
Open

Add a command to allow rejecting a pull request as a duplicate#10018
gparyani wants to merge 13 commits into
Charcoal-SE:masterfrom
gparyani:patch-2

Conversation

@gparyani

@gparyani gparyani commented Feb 7, 2024

Copy link
Copy Markdown
Contributor

Often, pull requests have to be closed as duplicates (such as if a privileged user watches or blacklists a keyword that has a pending PR by a non-privileged user, so that PR has to be procedurally rejected). Per policy, these are labeled with the "type: duplicate" label so that users searching through one's PR history can tell between PRs that are procedurally rejected for this reason and those that are actually rejected.

This code change adds the !!/reject-duplicate command, so that users who procedurally reject duplicate PRs don't have to go to the issue after the fact and apply the label manually: it can be done with one command.

Comment thread chatcommands.py Outdated
@makyen

makyen commented Feb 9, 2024

Copy link
Copy Markdown
Contributor

Has this code been tested by running it on a test SD instance in a chat room against a fork of the repository? If so, please provide a link to the chat room/start of test messages.

@gparyani

Copy link
Copy Markdown
Contributor Author

@makyen No, I haven't done that. Is doing so required for this to be merged?

@makyen

makyen commented Feb 23, 2024

Copy link
Copy Markdown
Contributor

Given that this is doing something on GitHub, which isn't necessarily easy to recover from something going drastically wrong and/or possibly causing permanent loss of some data, yes, there needs to be testing prior to merging/deploying. That doesn't mean that you have to do it, just that it needs to be done.

@Spevacus

Copy link
Copy Markdown
Contributor

I've tested this locally and was able to get it to work with some minor adjustments (left as review comments). See: https://chat.stackexchange.com/transcript/message/65714701#65714701

Comment thread gitmanager.py Outdated
Comment thread gitmanager.py Outdated
@Spevacus

Spevacus commented Aug 1, 2024

Copy link
Copy Markdown
Contributor

Tested this again: https://chat.stackexchange.com/rooms/154419/conversation/testing-pr10018

This checks out. Though I would recommend that you re-merge with master to keep this PR on the most up-to-date version.

@gparyani

gparyani commented Aug 1, 2024

Copy link
Copy Markdown
Contributor Author

@Spevacus Merged with master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants