From df6469b95ff2ae13b0d8fbc18c570c513364fd9b Mon Sep 17 00:00:00 2001 From: Henry <141167678+henrykie@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:41:36 -0700 Subject: [PATCH] changelog automation (#260) --- .github/workflows/changelog.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index c5425034..4c331d6a 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -42,14 +42,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FILE_TO_COMMIT: CHANGELOG.md - DESTINATION_BRANCH: changelog-update-${{ github.run_id }} + DESTINATION_BRANCH: changelog-${{ github.run_id }} run: | export TODAY=$( date -u '+%Y-%m-%d' ) export MESSAGE="chore: regenerate $FILE_TO_COMMIT for $TODAY" export SHA=$( git rev-parse $DESTINATION_BRANCH:$FILE_TO_COMMIT ) export CONTENT=$( base64 -i $FILE_TO_COMMIT ) gh api --method POST /repos/:owner/:repo/git/refs \ - --field ref="refs/head/changelog-update-${{ github.run_id }}" \ + --field ref="refs/head/changelog-${{ github.run_id }}" \ --field sha="$SHA" gh api --method PUT /repos/:owner/:repo/contents/$FILE_TO_COMMIT \ --field message="$MESSAGE" \ @@ -57,4 +57,4 @@ jobs: --field encoding="base64" \ --field branch="$DESTINATION_BRANCH" \ --field sha="$SHA" - gh pr create --title "chore: update changelog" --body "This is an auto-generated PR to update the changelog." --base main --head changelog-update-${{ github.run_id }} + gh pr create --title "chore: update changelog" --body "This is an auto-generated PR to update the changelog." --base main --head changelog-${{ github.run_id }}