Conversation
|
I am not sure why the actions launched the |
427cb2b to
5eae06d
Compare
It seems it was just an automatic check of the correctness of the |
4437fe8 to
94a562f
Compare
700c34b to
8b0f413
Compare
|
I will have to add a few diagrams here, hence, switching to draft. |
ed03c87 to
55245e6
Compare
Signed-off-by: Danil Klimuk <[email protected]>
woodpecker-cli Signed-off-by: Danil Klimuk <[email protected]>
Signed-off-by: Danil Klimuk <[email protected]>
This is because it is being used in other TrenchBoot repos as well but on other branches because of: TrenchBoot/grub#32 TrenchBoot/qubes-antievilmaid#15 TrenchBoot/xen#26 IMHO there is no reason to mention every use of this workflow. Signed-off-by: Danil Klimuk <[email protected]>
55245e6 to
0de7bf6
Compare
Moving to "Ready for review" now, I will consider adding the diagrams to TrenchBoot docs instead, as the diagrams will describe an entire CI/CD infrastructure for automatic rebasing in TrenchBoot organization. This seems to be a good place: https://trenchboot.org/dev-docs/ . |
| commits1_num=$(printf '%s' "$commits1" | wc -l) | ||
| commits2_num=$(printf '%s' "$commits2" | wc -l) |
There was a problem hiding this comment.
This will return 0 for both 0 and 1 commit
| if [[ "$BRANCH" != "$CONFLICT_BRANCH" ]]; then | ||
| git branch "$CONFLICT_BRANCH" &> /dev/null | ||
| if [[ "$LOCAL" != "true" && -n "$TOKEN" ]]; then | ||
| push_branch_remote "$TOKEN" "$CONFLICT_BRANCH" "$FIRST_REPO_REMOTE_NAME" || exit 1 |
There was a problem hiding this comment.
I think || exit 1 is unneeded with set -e
|
|
||
| # The remote URL must contain the token for the ref to be modified on the | ||
| # remote via personal access token authentication: | ||
| git remote get-url "$remote" 2> /dev/null | grep -F "$token" &> /dev/null || return 1 |
There was a problem hiding this comment.
If this fails, how do we debug it? I have same issue in other places where you hide logs with &>/dev/null.
|
|
||
| # Download woodpecker-cli and register cleanup on exit: | ||
| download_woodpecker_cli "$WOODPECKER_CLI_VERSION" | ||
| trap cleanup EXIT |
| # versions. | ||
| WOODPECKER_CLI_VERSION="${WOODPECKER_CLI_VERSION:-3.13.0}" | ||
| WP_BIN="" | ||
| WP_TMPDIR="" |
There was a problem hiding this comment.
Maybe keep everything together? E.g. function definitions first, then variables, then code. It's too easy to miss something between functions otherwise, especially in longer scripts
| SUCCESSULL_REBASE_PR_TITLE="Automatic rebase of branch $FIRST_REPO_BRANCH completed successfuly" | ||
| SUCCESSULL_REBASE_MESSAGE=" |
| result="$(python3 -c "import sys, json; print(len(json.load(sys.stdin)))" <<< "$response")" | ||
| fi | ||
|
|
||
| if [ $result -eq 0 ]; then |
There was a problem hiding this comment.
| if [ $result -eq 0 ]; then | |
| if [ "$result" -eq 0 ]; then |
| -w|--workflow) | ||
| WORKFLOW="$2" | ||
| shift 2 | ||
| ;; |
| API_URL="" | ||
| OWNER="" | ||
| REPO="" | ||
| WORKFLOW="" |
| with: | ||
| repository: TrenchBoot/.github | ||
| path: shared | ||
| ref: master |
There was a problem hiding this comment.
Wouldn't you want the same ref as this workflow was called with?
| specified multiple times. | ||
|
|
||
| Environment variables: | ||
| WOODPECKER_CLI_VERSION woodpecker-cli version to download (default: 2.7.0) |
There was a problem hiding this comment.
| WOODPECKER_CLI_VERSION woodpecker-cli version to download (default: 2.7.0) | |
| WOODPECKER_CLI_VERSION woodpecker-cli version to download (default: 3.13.0) |
| @@ -0,0 +1,170 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Is this used by anyone or just for local dev?
No description provided.