From 10c98eb3847355200b52f25c5d1b420953e31722 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sun, 30 Nov 2025 19:08:33 -0800 Subject: [PATCH] Push slash_command changes to correct branch --- .changelog/ecd1c6a8a43c45ceb35e58c112d7ba27.md | 4 ++++ .github/workflows/slash_commands.yml | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changelog/ecd1c6a8a43c45ceb35e58c112d7ba27.md diff --git a/.changelog/ecd1c6a8a43c45ceb35e58c112d7ba27.md b/.changelog/ecd1c6a8a43c45ceb35e58c112d7ba27.md new file mode 100644 index 0000000..10eb7c3 --- /dev/null +++ b/.changelog/ecd1c6a8a43c45ceb35e58c112d7ba27.md @@ -0,0 +1,4 @@ +--- +type: none +--- +Push slash_command changes to correct branch \ No newline at end of file diff --git a/.github/workflows/slash_commands.yml b/.github/workflows/slash_commands.yml index 6bd336d..a1b5145 100644 --- a/.github/workflows/slash_commands.yml +++ b/.github/workflows/slash_commands.yml @@ -53,6 +53,12 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" + # Get the branch name from the PR using GitHub API + branch=$(curl -s -H "Authorization: token ${{ github.token }}" \ + "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}" | \ + jq -r .head.ref) + echo "Branch: $branch" + ./script/changelog create -c -t "${{ steps.parse_command.outputs.changelog_type }}" "${{ steps.parse_command.outputs.message }}" - git push origin HEAD:refs/pull/${{ github.event.issue.number }}/head + git push origin HEAD:"$branch"