File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ BRANCH_NAME="backport/${SHORT_SHA}-to-${TARGET_BRANCH}"
8989
9090echo -e " ${YELLOW} Generated branch name: ${BRANCH_NAME}${NC} "
9191
92- SEARCH_QUERY=" ${COMMIT_URL} in:body"
93- EXISTING_PR=" $( gh pr list --state all --search " $SEARCH_QUERY " --json url --jq ' .[0].url' 2> /dev/null || true) "
92+ EXISTING_PR=" $( gh pr list --state all --head " $BRANCH_NAME " --json url --jq ' .[0].url' 2> /dev/null || true) "
9493if [[ -n " $EXISTING_PR " ]]; then
9594 echo -e " ${GREEN} PR already exists: ${EXISTING_PR} . Skipping duplicate.${NC} "
9695 exit 0
@@ -144,6 +143,8 @@ echo -e "${YELLOW}Creating pull request...${NC}"
144143if [[ " $HAS_CONFLICTS " == " true" ]]; then
145144 PR_TITLE=" conflict: ${COMMIT_TITLE}${TITLE_SUFFIX} "
146145 PR_BODY=$( cat << EOF
146+ <!-- backport:${COMMIT_SHA} -->
147+
147148## ⚠️ Backport With Conflicts
148149
149150- Upstream commit: ${COMMIT_URL}
164165else
165166 PR_TITLE=" ${COMMIT_TITLE}${TITLE_SUFFIX} "
166167 PR_BODY=$( cat << EOF
168+ <!-- backport:${COMMIT_SHA} -->
169+
167170## 🔄 Automated Backport
168171
169172- Upstream commit: ${COMMIT_URL}
You can’t perform that action at this time.
0 commit comments