From a4751c647215dc0b49bb6cd58ae76e9e06247174 Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Fri, 18 Oct 2024 18:17:14 +0800 Subject: [PATCH 1/3] 21321 --- hello.go | 1 - 1 file changed, 1 deletion(-) diff --git a/hello.go b/hello.go index 8e2f6c4..67520dc 100644 --- a/hello.go +++ b/hello.go @@ -3,7 +3,6 @@ package main import "fmt" func main() { - // 你好 fmt.Println("hello") } From ab201b3c5438546456cdc9e3f7bfd18e95dbde1e Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Fri, 18 Oct 2024 18:30:50 +0800 Subject: [PATCH 2/3] 12312 --- .github/workflows/merge-from-milestone.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge-from-milestone.yml b/.github/workflows/merge-from-milestone.yml index 88ddaac..c4d6dfc 100644 --- a/.github/workflows/merge-from-milestone.yml +++ b/.github/workflows/merge-from-milestone.yml @@ -166,13 +166,24 @@ jobs: echo "Prepared PR body:" echo "$pr_body" - # Create the Pull Request with the label 'milestone-merge' - curl -s -X POST -H "Authorization: token $BOT_TOKEN" \ + # Create the Pull Request (without the label for now) + response=$(curl -s -X POST -H "Authorization: token $BOT_TOKEN" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/repos/${{ github.repository }}/pulls \ -d "$(jq -n --arg title "$pr_title" \ --arg head "$CHERRY_PICK_BRANCH" \ --arg base "$TARGET_BRANCH" \ --arg body "$pr_body" \ - --argjson labels '["milestone-merge"]' \ - '{title: $title, head: $head, base: $base, body: $body, labels: $labels}')" + '{title: $title, head: $head, base: $base, body: $body}')") + + # Extract the PR number from the response + pr_number=$(echo "$response" | jq -r '.number') + + echo "Created PR #$pr_number" + + - name: Add Label to Created Pull Request + run: | + curl -s -X POST -H "Authorization: token $BOT_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/${{ github.repository }}/issues/$pr_number/labels \ + -d "$(jq -n --arg label "milestone-merge" '{labels: [$label]}')" From 72a2a6e8dcf2607572026cdd711e0969f6470721 Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Sat, 19 Oct 2024 11:13:50 +0800 Subject: [PATCH 3/3] 123213 --- .github/workflows/merge-from-milestone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-from-milestone.yml b/.github/workflows/merge-from-milestone.yml index c4d6dfc..3adb106 100644 --- a/.github/workflows/merge-from-milestone.yml +++ b/.github/workflows/merge-from-milestone.yml @@ -183,7 +183,7 @@ jobs: - name: Add Label to Created Pull Request run: | - curl -s -X POST -H "Authorization: token $BOT_TOKEN" \ + curl -s -X POST -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/repos/${{ github.repository }}/issues/$pr_number/labels \ -d "$(jq -n --arg label "milestone-merge" '{labels: [$label]}')"