From b8a99111fcffea7d5db7f06c78ce97213f4991a9 Mon Sep 17 00:00:00 2001 From: Steve Burkert <5735305+SteveBurkert@users.noreply.github.com> Date: Tue, 9 May 2023 12:23:57 +0200 Subject: [PATCH 1/2] Update ReviewBot.yml --- .github/workflows/ReviewBot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ReviewBot.yml b/.github/workflows/ReviewBot.yml index 7f2a229..4a741ce 100644 --- a/.github/workflows/ReviewBot.yml +++ b/.github/workflows/ReviewBot.yml @@ -27,7 +27,7 @@ jobs: # gh pr comment ${{ env.MY_PR_ID }} "➡️ This pull request seems to be child of: [$base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id)." gh pr comment $base_pr_id --body "➡️ [New child Pull-Request added](${{ env.MY_PR_URL }}). Please merge this first." if [ ${{ env.MAIN_BRANCH_NAME }} != $( gh pr view $base_pr_id --json baseRefName --jq '.baseRefName') ]; then - gh pr comment $base_pr_id --body "💡 This seems to be the root pull-request with open childs. I suggest you change the status to draft." + gh pr comment $base_pr_id --body "💡 This seems to be the root pull-request with open childs. I will convert this PR to a draft now." gh pr ready $base_pr_id --undo fi From f62e299c5573687ef0fbba8b2bc0a09c2d502a76 Mon Sep 17 00:00:00 2001 From: Steve Burkert <5735305+SteveBurkert@users.noreply.github.com> Date: Tue, 9 May 2023 12:33:51 +0200 Subject: [PATCH 2/2] Update ReviewBot.yml --- .github/workflows/ReviewBot.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ReviewBot.yml b/.github/workflows/ReviewBot.yml index 4a741ce..a9a7d70 100644 --- a/.github/workflows/ReviewBot.yml +++ b/.github/workflows/ReviewBot.yml @@ -24,11 +24,10 @@ jobs: - run: echo "🖥️ The workflow is now ready." - run: | for base_pr_id in $(gh pr list --search "head:${{ env.BASE_PR_REF }}" --json number --jq '.[].number'); do - # gh pr comment ${{ env.MY_PR_ID }} "➡️ This pull request seems to be child of: [$base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id)." + gh pr comment ${{ env.MY_PR_ID }} --body "➡️ This pull request seems to be child of: [$base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id)." gh pr comment $base_pr_id --body "➡️ [New child Pull-Request added](${{ env.MY_PR_URL }}). Please merge this first." - if [ ${{ env.MAIN_BRANCH_NAME }} != $( gh pr view $base_pr_id --json baseRefName --jq '.baseRefName') ]; then + if [ ${{ env.MAIN_BRANCH_NAME }} == $( gh pr view $base_pr_id --json baseRefName --jq '.baseRefName') ]; then gh pr comment $base_pr_id --body "💡 This seems to be the root pull-request with open childs. I will convert this PR to a draft now." gh pr ready $base_pr_id --undo fi - done