Skip to content

Commit f2fbe10

Browse files
committed
feat: print incoming PR urls
1 parent cfce586 commit f2fbe10

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/k8s_edit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ jobs:
7070
-t "$PR_TITLE" \
7171
-o "${{ github.repository_owner }}" \
7272
-r "${{ github.event.repository.name }}" \
73-
-p "$KUBERNETES_POD_NEW_IMAGE" \
73+
-n "${{ github.event.pull_request.number }}" \
7474
-k "${{ env.KUBERNETES_CLUSTER_REPO_NAME }}" \

gh/pr_create.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ HEAD_REF="automated-release-dev"
66
PR_TITLE="ci: automated-release-dev"
77
REPOSITORY_OWNER="code-kern-ai"
88
REPOSITORY_NAME=""
9-
POD_IMAGE_NAME=""
9+
REPOSITORY_PR_NUMBER=""
1010
KUBERNETES_CLUSTER_REPO_NAME=""
1111

12-
while getopts b:h:t:o:r:p:k: flag
12+
while getopts b:h:t:o:r:n:k: flag
1313
do
1414
case "${flag}" in
1515
b) BASE_REF=${OPTARG};;
1616
h) HEAD_REF=${OPTARG};;
1717
t) PR_TITLE=${OPTARG};;
1818
o) REPOSITORY_OWNER=${OPTARG};;
1919
r) REPOSITORY_NAME=${OPTARG};;
20-
p) POD_IMAGE_NAME=${OPTARG};;
20+
n) REPOSITORY_PR_NUMBER=${OPTARG};;
2121
k) KUBERNETES_CLUSTER_REPO_NAME=${OPTARG};;
2222
esac
2323
done
@@ -27,8 +27,8 @@ EXISTING_PR_BODY=$(gh pr list --base $BASE_REF --head $HEAD_REF --json body --jq
2727

2828
if [ -z "$EXISTING_PR_BODY" ]; then
2929
PR_BODY=$(cat <<EOF
30-
Automated $BASE_REF release:
31-
- $POD_IMAGE_NAME
30+
Automated $BASE_REF release for:
31+
- https://github.com/$REPOSITORY_OWNER/$REPOSITORY_NAME/pull/$REPOSITORY_PR_NUMBER
3232
EOF
3333
)
3434
gh pr create \
@@ -48,7 +48,7 @@ else
4848
--json number --jq '.[].number')
4949
PR_BODY=$(cat <<EOF
5050
$EXISTING_PR_BODY
51-
- $POD_IMAGE_NAME
51+
- https://github.com/$REPOSITORY_OWNER/$REPOSITORY_NAME/pull/$REPOSITORY_PR_NUMBER
5252
EOF
5353
)
5454
gh pr edit $EXISTING_PR_NUMBER \

0 commit comments

Comments
 (0)