Skip to content

Commit

Permalink
Merge branch 'ko3n1g/ci/improve-cherry-pick-workflow' into 'main'
Browse files Browse the repository at this point in the history
ci: Improve cherry pick MR description

See merge request ADLR/megatron-lm!2130
  • Loading branch information
ko3n1g committed Sep 22, 2024
2 parents e79808c + e10a9f4 commit 8e69382
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .gitlab/stages/00.pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ maybe_cherry_pick_commit:
MR=$(curl --header "PRIVATE-TOKEN: ${PROJECT_ACCESS_TOKEN_MCORE}" --url "https://${GITLAB_ENDPOINT}/api/v4/projects/${CI_PROJECT_ID}/merge_requests/${MR_ID}")
LABELS=$(echo -E $MR | jq '.labels | join(",")' | tr -d '"')
AUTHOR=$(echo -E $MR | jq '.assignee.id')
AUTHOR_ID=$(echo -E $MR | jq '.assignee.id')
AUTHOR_NAME=$(echo -E $MR | jq '.assignee.username')
TITLE=$(echo -E $MR | jq '.title')
TARGET_BRANCHES=$(echo "$LABELS" | grep -o 'core_[^,]*')
Expand Down Expand Up @@ -139,7 +140,8 @@ maybe_cherry_pick_commit:
-d "target_branch=$RELEASE_BRANCH" \
-d "title=Cherry pick \`$TITLE ($MR_ID)\` into \`$RELEASE_BRANCH\`" \
-d "labels=cherry-pick" \
-d "assignee_id=$AUTHOR_ID"
-d "reviewer_ids=$AUTHOR_ID" \
-d "description=[🤖]: Hi @$AUTHOR_NAME 👋,<br><br>we've cherry picked \`$TITLE ($MR_ID)\` into \`$RELEASE_BRANCH\` for you! 🚀<br><br>Please review and approve this cherry pick by your convenience\!"
else
URL=https://${GITLAB_ENDPOINT}/ADLR/megatron-lm/-/merge_requests/$MR_ID
Expand Down
1 change: 1 addition & 0 deletions .gitlab/stages/02.functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jet-generate:
jet-trigger:
stage: functional_tests
needs: [jet-generate]
extends: [.jet_common]
trigger:
include:
- artifact: jet-trigger-job.yaml
Expand Down

0 comments on commit 8e69382

Please sign in to comment.