Skip to content

Commit

Permalink
Merge pull request #40 from ss14Starlight/eye-implants
Browse files Browse the repository at this point in the history
update auto-changelog

(cherry picked from commit 4c2edad)
  • Loading branch information
ss14-Starlight authored and starlight committed Nov 15, 2024
1 parent 79399bd commit e7c430e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/auto-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
- name: Get Pull Request Number
id: get_pr
run: |
# Получаем сообщение коммита
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
echo "Commit message: $COMMIT_MESSAGE"
# Извлекаем номер PR из сообщения коммита
PR_NUMBER=$(echo "$COMMIT_MESSAGE" | grep -oP '(?<=Merge pull request #)\d+')

if [ -z "$PR_NUMBER" ]; then
Expand Down Expand Up @@ -67,10 +69,13 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add "Resources/Changelog/ChangelogStarlight.yml"
if git diff --cached --quiet; then
echo "No changes to commit."
else
git com
git commit -m "Update changelog for PR #${{ steps.get_pr.outputs.PR_NUMBER }} [skip ci]"
git push origin HEAD:Starlight
fi

0 comments on commit e7c430e

Please sign in to comment.