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

Add a new command to bot #646

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion requirements.hash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
8eaf3bbf120f883f688e100b9329ce9629a78f2c775239d7483efd937240f942 ./ci_controller.sh
e25fca925ee687bc46f5be6487c48ee977b697d05df97ccaca86d36ee8d213dc ./clean_package.sh
829470da958b5afce3b2023d66eeac9b41d493e9ad8c20fca25109e156312cf0 ./helper.sh
d2bb94dd278db17724bfe41d2cd3794f878a706aabc3a8bda6dec6913a420461 ./merge_procedures.sh
75de2f0f7c4c02dd16baab447492de281e90e8413f276f86d6a5faeec9dc9025 ./merge_procedures.sh
9e0f8478bb6568b6defc647080637b2944d68e8372655031750849aa77686812 ./package_version.sh
ad0a8ec80ac460df49a2643a5ea75c98ebe55e6039515ff3b8fc581c974ba698 ./run_tests.sh
94b462117f4a77f14703c5774a8477dcf6644bfee75bec158c0407e69ba58c73 ./show_info.sh
Expand Down
13 changes: 11 additions & 2 deletions scripts/merge_procedures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,23 @@ echo "reviewDecision: $(gh pr view "$PR_URL" --json reviewDecision)"
echo "mergeStateStatus: $(gh pr view "$PR_URL" --json mergeStateStatus)"
echo "**********************************************************************"

if [[ "$REQUEST" == "bot: MERGE skip" ]]; then
if [[ "$REQUEST" == "bot: MERGE status" || "$SKIP" == "true" ]]; then
test "$REVIEWS_STATUS" == "APPROVED" && MARK_1="✔"
test "$MERGE_STATUS" == "CLEAN" && MARK_2="✔"

if [[ "$MERGE_STATUS" == "CLEAN" ]]; then
MARK_2="✔"
else
MARK_2="❌"
fi
gh pr comment "$PR_URL" --body "
🤖: status
- reviewDecision: $REVIEWS_STATUS $MARK_1
- mergeStateStatus: $MERGE_STATUS $MARK_2
"

if [[ "$REQUEST" == "bot: MERGE status" ]]; then
exit 0
fi
fi
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down