Conversation
| pr_number = os.environ.get("PR_NUMBER", "") | ||
| output_path = os.environ.get("GITHUB_OUTPUT", os.devnull) | ||
|
|
||
| if event_name not in ("pull_request", "merge_group"): |
There was a problem hiding this comment.
Having merge_group here is quite risky. What if one of the PRs is not merged to the target branch?GitHub does not merge what you check out in the merge queue. It only merges the PR of the event.
This would break the target branch. Please remove the merge_group.
| pr_number = os.environ.get("PR_NUMBER", "") | ||
| output_path = os.environ.get("GITHUB_OUTPUT", os.devnull) | ||
|
|
||
| if event_name not in ("pull_request", "merge_group"): |
There was a problem hiding this comment.
Please add pull_request_target to also support our QNX workflows.
And we might want to consider workflow_run events as well.
|
|
||
| def test_surrounding_text(self): | ||
| self.assertEqual( | ||
| parse_depends_on("Please merge Depends-On: #1111 first before this one"), ["1111"] |
There was a problem hiding this comment.
I would prefer if we enforce that there may be no other text in the same line before the Depends-On.
Text after is a nice feature for commenting the dependencies.
|
|
||
| def test_merge_group_event_runs(self): | ||
| code, output = self._run_main( | ||
| {"EVENT_NAME": "merge_group", "PR_NUMBER": "123"}, |
There was a problem hiding this comment.
We need an additional workflow that verifies that all dependencies are merged before we put a PR in the merge queue. E.g. the Check is only green when all dependencies are merged.
| DEPENDENCY_PRS: ${{ steps.find-dependency.outputs.dependency_prs }} | ||
| DEPENDENCY_COUNT: ${{ steps.find-dependency.outputs.dependency_count }} | ||
| REBASED: ${{ steps.rebase.outputs.rebased }} | ||
| REBASED_COUNT: ${{ steps.rebase.outputs.rebased_count }} | ||
| SKIPPED_PRS: ${{ steps.rebase.outputs.skipped_prs }} | ||
| FAILED_PRS: ${{ steps.rebase.outputs.failed_prs }} |
There was a problem hiding this comment.
Needs default values if you have the always flag. Some of these outputs might not be there.
With this we enable, that Pull-Requests will be build upon each other with a rebase.
With this we enable, that Pull-Requests will be build upon each other with a rebase.
Depends-On-NOT: #203