Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ae20c82
Create small_comment.yml
SteveBurkert May 3, 2023
fd5e103
Update small_comment.yml
SteveBurkert May 3, 2023
a04dfd2
Update small_comment.yml
SteveBurkert May 3, 2023
9ebc18f
Update small_comment.yml
SteveBurkert May 3, 2023
64cbb1e
Update small_comment.yml
SteveBurkert May 3, 2023
ceaf966
Update small_comment.yml
SteveBurkert May 3, 2023
3cc010f
Update small_comment.yml
SteveBurkert May 4, 2023
8286db0
Update small_comment.yml
SteveBurkert May 4, 2023
c156366
Update small_comment.yml
SteveBurkert May 4, 2023
4598b67
Update small_comment.yml
SteveBurkert May 4, 2023
18615f7
Update small_comment.yml
SteveBurkert May 4, 2023
6833302
Add another file
SteveBurkert May 4, 2023
ecb8b0d
Update small_comment.yml
SteveBurkert May 4, 2023
4fc44b5
Update small_comment.yml
SteveBurkert May 4, 2023
5b69b8e
Update again small_comment.yml
SteveBurkert May 4, 2023
c7af0d2
Create ReviewBot.yml
SteveBurkert May 4, 2023
a191ed5
Remove outdated workflows
SteveBurkert May 4, 2023
7337cb9
Update ReviewBot.yml
SteveBurkert May 4, 2023
2c37d66
Update ReviewBot.yml
SteveBurkert May 4, 2023
845e50d
Merge pull request #8 from SteveBurkert/main
SteveBurkert May 4, 2023
1e987c7
Update ReviewBot.yml
SteveBurkert May 4, 2023
352e565
Merge pull request #9 from SteveBurkert/main
SteveBurkert May 4, 2023
8307182
Update ReviewBot.yml
SteveBurkert May 4, 2023
ee51cb1
Merge pull request #10 from SteveBurkert/main
SteveBurkert May 4, 2023
669bfa5
Update ReviewBot.yml
SteveBurkert May 4, 2023
4afadb9
Merge pull request #12 from SteveBurkert/main
SteveBurkert May 4, 2023
d12901c
Update ReviewBot.yml
SteveBurkert May 4, 2023
d9b980c
Merge pull request #13 from SteveBurkert/main
SteveBurkert May 4, 2023
faa8422
Update ReviewBot.yml
SteveBurkert May 4, 2023
2c5e15d
Merge pull request #14 from SteveBurkert/main
SteveBurkert May 4, 2023
1fa5cd2
Update ReviewBot.yml
SteveBurkert May 4, 2023
39976d9
Merge pull request #15 from SteveBurkert/main
SteveBurkert May 4, 2023
41864db
Update ReviewBot.yml
SteveBurkert May 4, 2023
57f483f
Merge pull request #16 from SteveBurkert/main
SteveBurkert May 4, 2023
ebf065f
Update ReviewBot.yml
SteveBurkert May 4, 2023
bc81db3
Merge pull request #17 from SteveBurkert/main
SteveBurkert May 4, 2023
6390c02
Update ReviewBot.yml
SteveBurkert May 4, 2023
6a6dfdd
Merge pull request #18 from SteveBurkert/main
SteveBurkert May 4, 2023
6c97a9d
Reanable drafting
SteveBurkert May 5, 2023
a04994b
Merge pull request #19 from SteveBurkert/main
SteveBurkert May 5, 2023
a4b7b57
Update ReviewBot.yml
SteveBurkert May 9, 2023
dd86548
Merge pull request #20 from SteveBurkert/main
SteveBurkert May 9, 2023
3159c2e
Update ReviewBot.yml
SteveBurkert May 9, 2023
013e3b8
Merge pull request #21 from SteveBurkert/main
SteveBurkert May 9, 2023
b8a9911
Update ReviewBot.yml
SteveBurkert May 9, 2023
f62e299
Update ReviewBot.yml
SteveBurkert May 9, 2023
d8c04d7
Merge pull request #22 from SteveBurkert/main
SteveBurkert May 9, 2023
6925fa1
Update ReviewBot.yml
SteveBurkert May 9, 2023
e8eed1c
Update ReviewBot.yml
SteveBurkert May 9, 2023
8547300
Merge pull request #23 from SteveBurkert/main
SteveBurkert May 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ReviewBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ReviewBot
run-name: ReviewBot is linking stacked child pull-requests
on:
pull_request:
types:
- opened
- reopened
- edited
jobs:
comment:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAIN_BRANCH_NAME: 'main'
BASE_PR_REF: ${{ github.base_ref }}
MY_PR_ID: ${{ github.event.number }}
MY_PR_URL: 'https://github.com/SteveBurkert/github_reviewee/pull/${{ github.event.number }}'
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- 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 }} --body "➡️ This pull request seems to be child of: [$base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id)."
if [ ${{ env.MAIN_BRANCH_NAME }} == $( gh pr view $base_pr_id --json baseRefName --jq '.baseRefName') ]; then
gh pr comment ${{ env.MY_PR_ID }} --body "➡️ This seems to be the first child Pull-Request of [the base PR $base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id). Merge this PR and continue with the base afterwards."
gh pr comment $base_pr_id --body "➡️ [New child Pull-Request added](${{ env.MY_PR_URL }}). Please merge all children first."
gh pr comment $base_pr_id --body "💡 This seems to be the root pull-request with open children. I will convert this PR to a draft now."
gh pr ready $base_pr_id --undo
else
gh pr comment ${{ env.MY_PR_ID }} --body "➡️ This seems to be a child Pull-Request, but not the first. Please merge [the base PR $base_pr_id](https://github.com/SteveBurkert/github_reviewee/pull/$base_pr_id) before this PR."
gh pr comment $base_pr_id --body "➡️ [New child Pull-Request added](${{ env.MY_PR_URL }})."
fi
done
22 changes: 0 additions & 22 deletions .github/workflows/test_label_workflow.yml

This file was deleted.

1 change: 1 addition & 0 deletions Another_file
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Another file