Open ChillerDragon opened 9 months ago
But not sure if that feature is worth the complexity it adds to the mirror script. So it is low priority.
This is also annoying to test. If the upstream gets active again the plan is to shutdown teeworlds community anyways (including this bot).
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.
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.