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

Close prs when they got rejected upstream #4

Open
ChillerDragon opened this issue Feb 25, 2024 · 3 comments
Open

Close prs when they got rejected upstream #4

ChillerDragon opened this issue Feb 25, 2024 · 3 comments

Comments

@ChillerDragon
Copy link
Member

If a pr upstream was closed AND NOT MERGED. It is officially declined by teeworlds. In that case I would say the mirror bot should close the corresponding pr in teeworlds-community. Because we do not want to differ from upstream. Even if the majority would like to have seen the pr merged. In such case maintainers with write access could reopen it anyways.

If the pr was MERGED then the bot could respond with a comment to that pr. Saying "this was merged upstream". Indicating that it should probably be approved.

@ChillerDragon ChillerDragon changed the title Close prs when they got closed upstream Close prs when they got rejected upstream Feb 25, 2024
@ChillerDragon
Copy link
Member Author

But not sure if that feature is worth the complexity it adds to the mirror script. So it is low priority.

@ChillerDragon
Copy link
Member Author

This is also annoying to test. If the upstream gets active again the plan is to shutdown teeworlds community anyways (including this bot).

@ChillerDragon
Copy link
Member Author

There is now get_closed_upstream_prs so a pr can easily be checked for its state like this:

if get_closed_upstream_prs | grep '/2567 CLOSED'
then
	printf '2567 is closed\n'
elif get_closed_upstream_prs | grep '/2567 MERGED'
then
	printf '2567 is merged\n'
else
	printf '2567 is unknown (still open or not loaded try get_closed_upstream_prs 99999)\n'
fi

This could be done in a loop for all downstream open prs on a regular run or only in the --update action.
But if we start sending comments we also need to check if the comments already exist in the pr to avoid spamming duplicated comments. And when it auto closes there should also be a way to deactivate that if it is unwanted.

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

No branches or pull requests

1 participant