From d4ca7b4d6ea7e5f9f6049f4070b288494e6df2fe Mon Sep 17 00:00:00 2001 From: Samir Kamal <1954121+skamril@users.noreply.github.com> Date: Tue, 5 Mar 2024 15:43:52 +0100 Subject: [PATCH] qwf --- .github/workflows/release-changelog.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-changelog.yml b/.github/workflows/release-changelog.yml index be55b45a04..12dca43d24 100644 --- a/.github/workflows/release-changelog.yml +++ b/.github/workflows/release-changelog.yml @@ -11,25 +11,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v2 with: - fetch-depth: 0 # Important pour s'assurer que tous les commits sont récupérés + ref: ${{ github.event.pull_request.base.ref }} - name: Generate changelog id: generate_changelog run: | - # Utilisez git pour extraire les messages de commit entre cette branche et master - CHANGELOG=$(git log origin/master.. --oneline --no-merges) - # Formatage pour Markdown (commentaire GitHub) - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" - echo "::set-output name=changelog::$CHANGELOG" + npm install -g conventional-changelog-cli + conventional-changelog -p angular -i CHANGELOG.md -s -r 0 + cat CHANGELOG.md > changelog.txt + echo "CHANGELOG_CONTENT=$(cat changelog.txt)" >> $GITHUB_ENV - name: Comment on PR uses: thollander/actions-comment-pull-request@v1 with: message: | ## Changelog - ${{ steps.generate_changelog.outputs.changelog }} + ${{ env.CHANGELOG_CONTENT }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file