From c6228f213fd6b945a62f2e2567183b8e910e22d3 Mon Sep 17 00:00:00 2001 From: Himani1519 Date: Tue, 22 Aug 2023 11:40:38 +0530 Subject: [PATCH 01/11] Automate changelog note Signed-off-by: Himani1519 --- .github/workflows/build-core.yml | 112 ++++++++++++++++++++++--------- 1 file changed, 79 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index e96ea3c9..dbffbbee 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -44,49 +44,95 @@ jobs: github-repo: ${{ github.repository }} github-token: ${{ secrets.GITHUB_TOKEN }} - check_changelog: + update-changelog: runs-on: ubuntu-latest + outputs: + was_updated: ${{ steps.check-change.outputs.change_detected }} + check_commit: ${{ steps.check-changelog.outputs.check_commit }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v2 with: - path: copy-repo - fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }} + ref: ${{ github.head_ref }} + fetch-depth: 0 - - name: Get changed files - id: changed-files + - name: Check for updated CHANGELOG.md using git + id: check-changelog + run: | + if git diff --name-only origin/${{ github.base_ref }} | grep -q "^CHANGELOG.md$"; then + echo "CHANGELOG.md has been updated." + echo "::set-output name=check_commit::true" + else + echo "ERROR: CHANGELOG.md has not been updated." + echo "::set-output name=check_commit::false" + fi + - name: Extract changelog info + if: steps.check-changelog.outputs.check_commit == 'false' + id: extract-changelog + run: | + PR_DESCRIPTION="${{ github.event.pull_request.body }}" + # Check if "changelog:" exists in PR description + if echo "$PR_DESCRIPTION" | grep -q "VERSION:" && echo "$PR_DESCRIPTION" | grep -q "CHANGELOG:"; then + # Extract text after "changelog:" + CHANGELOG_TEXT=$(echo $PR_DESCRIPTION | sed -n 's/.*CHANGELOG: \(.*\)/\1/p') + # Extract VERSION: from PR description + VERSION=$(echo "$PR_DESCRIPTION" | grep -oP 'VERSION:\s*\Kv\d+\.\d+\.\d+') + echo "Extracted changelog: $CHANGELOG_TEXT" + echo "::set-output name=changelog::$CHANGELOG_TEXT" + echo "::set-output name=version::$VERSION" + else + echo -e "No changelog and version information found in PR description please add them.\n Expected Format:\n VERSION:vX.XX.X\n CHANGELOG:This is changelog note.\n + To re-run the action, just pushed/commit the changes along with PR description, it will automatically triggered by sync." + exit 1 + fi + - name: Check PR body against changelog + if: steps.check-changelog.outputs.check_commit == 'false' run: | - cd copy-repo - if ${{ github.event_name == 'pull_request' }}; then - echo "changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT + if ! grep -Fq "${{ steps.extract-changelog.outputs.changelog }}" CHANGELOG.md; then + # Check if version exists in CHANGELOG.md + if grep -q "## ${{ steps.extract-changelog.outputs.version }}" CHANGELOG.md; then + # Append PR description to existing version + sed -i "/## ${{ steps.extract-changelog.outputs.version }}/ a- ${{ steps.extract-changelog.outputs.changelog }} . (#${{ github.event.pull_request.number }})" CHANGELOG.md else - echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT - fi - - - name: List changed files - id: set-flag + # Append new version and PR description + echo "$(awk '/All notable changes to the Zlux App Server package will be documented in this file\./ { + print + print "\n## " "${{ steps.extract-changelog.outputs.version }}" + print "- " "${{ steps.extract-changelog.outputs.changelog }}" " (#${{ github.event.pull_request.number }})" + next + } 1' CHANGELOG.md)" > CHANGELOG.md + fi + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add CHANGELOG.md + git commit -m "Update changelog with PR #${{ github.event.pull_request.number }} description" + git push + fi + - name: check for changes + id: check-change run: | - cd copy-repo - for file in ${{ steps.changed-files.outputs.changed_files }}; do - echo "$file was changed" - if [[ $file == "CHANGELOG.md" ]] - then - echo "file-flag=true" >> $GITHUB_OUTPUT - break; - else - echo "file-flag=false" >> $GITHUB_OUTPUT - fi - done + if git diff --name-only HEAD^ HEAD | grep 'changelog.md'; then + echo "No Changes detected, setting flag to false" + echo "::set-output name=change_detected::false" + else + echo "::set-output name=change_detected::true" + fi - - name: Check if CHANGELOG is Updated and Abort if not updated - if: steps.set-flag.outputs.file-flag != 'true' - run: | - echo "CHANGELOG.md not updated, please update CHANGELOG.md with the changes made in the pull request" - exit 1 + check_changelog: + needs: update-changelog + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 - - name: Remove copy-repo - if: always() - run: rm -r copy-repo + - name: Verify Changelog update + run: | + if [ "${{ needs.update-changelog.outputs.was_updated }}" != "true" ]; then + echo "CHANGELOG.md not updated, please update CHANGELOG.md with the changes made in the pull request" + exit 1 + else + echo "changelog was updated successfully." + fi build: runs-on: ubuntu-latest From 327b609b798b9b19a89e43d0c0f6389835750c5a Mon Sep 17 00:00:00 2001 From: Himani1519 Date: Tue, 22 Aug 2023 12:01:12 +0530 Subject: [PATCH 02/11] Minor change Signed-off-by: Himani1519 --- .github/workflows/build-core.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index dbffbbee..69cc958e 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -76,7 +76,7 @@ jobs: # Extract text after "changelog:" CHANGELOG_TEXT=$(echo $PR_DESCRIPTION | sed -n 's/.*CHANGELOG: \(.*\)/\1/p') # Extract VERSION: from PR description - VERSION=$(echo "$PR_DESCRIPTION" | grep -oP 'VERSION:\s*\Kv\d+\.\d+\.\d+') + VERSION=$(echo "$PR_DESCRIPTION" | grep -oP 'VERSION:\s*\K\d+\.\d+\.\d+') echo "Extracted changelog: $CHANGELOG_TEXT" echo "::set-output name=changelog::$CHANGELOG_TEXT" echo "::set-output name=version::$VERSION" @@ -92,7 +92,7 @@ jobs: # Check if version exists in CHANGELOG.md if grep -q "## ${{ steps.extract-changelog.outputs.version }}" CHANGELOG.md; then # Append PR description to existing version - sed -i "/## ${{ steps.extract-changelog.outputs.version }}/ a- ${{ steps.extract-changelog.outputs.changelog }} . (#${{ github.event.pull_request.number }})" CHANGELOG.md + sed -i "/## ${{ steps.extract-changelog.outputs.version }}/ a- ${{ steps.extract-changelog.outputs.changelog }} (#${{ github.event.pull_request.number }})" CHANGELOG.md else # Append new version and PR description echo "$(awk '/All notable changes to the Zlux App Server package will be documented in this file\./ { From ee11ebdc34b63e58747e202b386515b3c8a3d894 Mon Sep 17 00:00:00 2001 From: Himani1519 Date: Tue, 22 Aug 2023 19:13:45 +0530 Subject: [PATCH 03/11] Update regex for version format Signed-off-by: Himani1519 --- .github/workflows/build-core.yml | 150 ++++++++++++++++--------------- 1 file changed, 77 insertions(+), 73 deletions(-) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index 69cc958e..05891346 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -44,79 +44,82 @@ jobs: github-repo: ${{ github.repository }} github-token: ${{ secrets.GITHUB_TOKEN }} - update-changelog: - runs-on: ubuntu-latest - outputs: - was_updated: ${{ steps.check-change.outputs.change_detected }} - check_commit: ${{ steps.check-changelog.outputs.check_commit }} - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - fetch-depth: 0 + jobs: + update-changelog: + runs-on: ubuntu-latest + outputs: + was_updated: ${{ steps.check-change.outputs.change_detected }} + check_commit: ${{ steps.check-changelog.outputs.check_commit }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + + - name: Check for updated CHANGELOG.md using git + id: check-changelog + run: | + if git diff --name-only origin/${{ github.base_ref }} | grep -q "^CHANGELOG.md$"; then + echo "CHANGELOG.md has been updated." + echo "::set-output name=check_commit::true" + else + echo "ERROR: CHANGELOG.md has not been updated." + echo "::set-output name=check_commit::false" + fi + - name: Extract changelog info + if: steps.check-changelog.outputs.check_commit == 'false' + id: extract-changelog + run: | + PR_DESCRIPTION="${{ github.event.pull_request.body }}" + # Check if "changelog:" exists in PR description + if echo "$PR_DESCRIPTION" | grep -q "VERSION:" && echo "$PR_DESCRIPTION" | grep -q "CHANGELOG:"; then + # Extract text after "changelog:" + CHANGELOG_TEXT=$(echo $PR_DESCRIPTION | sed -n 's/.*CHANGELOG: \(.*\)/\1/p') + # Extract VERSION: from PR description + VERSION=$(echo "$PR_DESCRIPTION" | grep -oP 'VERSION:\s*\K\d+\.\d+\.\d+') + echo "Extracted changelog: $CHANGELOG_TEXT" + echo "::set-output name=changelog::$CHANGELOG_TEXT" + echo "::set-output name=version::$VERSION" + else + echo -e "No changelog and version information found in PR description please add them.\n Expected Format:\n VERSION:vX.XX.X\n CHANGELOG:This is changelog note.\n + To re-run the action, just make a push or commit after updating the PR description or updating the changelog via a manual file changing commit." + exit 1 + fi + - name: Check PR body against changelog + if: steps.check-changelog.outputs.check_commit == 'false' + run: | + ESCAPED_CHANGELOG="${{ steps.extract-changelog.outputs.changelog }}" + ESCAPED_CHANGELOG=$(echo "$ESCAPED_CHANGELOG" | sed "s/'/\\\\'/g") + VERSION="${{ steps.extract-changelog.outputs.version }}" + + if ! grep -Fq "$ESCAPED_CHANGELOG" CHANGELOG.md; then + # Check if version exists in CHANGELOG.md + if grep -q "^## \`$VERSION\`" CHANGELOG.md; then + # Append PR description to existing version + sed -i "/^## \`$VERSION\`/a - $ESCAPED_CHANGELOG (#${{ github.event.pull_request.number }})" CHANGELOG.md + else + # Append new version (with backticks) and PR description below the anchor line + ANCHOR_LINE=$(awk '/All notable changes to the Zlux App Manager will be documented in this file\./ {print NR}' CHANGELOG.md) + sed -i "$ANCHOR_LINE a\\ + \n## \`$VERSION\`\n- $ESCAPED_CHANGELOG (#${{ github.event.pull_request.number }})\n" CHANGELOG.md + fi + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add CHANGELOG.md + git commit -m "Update changelog with PR #${{ github.event.pull_request.number }} description" + git push + fi - - name: Check for updated CHANGELOG.md using git - id: check-changelog - run: | - if git diff --name-only origin/${{ github.base_ref }} | grep -q "^CHANGELOG.md$"; then - echo "CHANGELOG.md has been updated." - echo "::set-output name=check_commit::true" - else - echo "ERROR: CHANGELOG.md has not been updated." - echo "::set-output name=check_commit::false" - fi - - name: Extract changelog info - if: steps.check-changelog.outputs.check_commit == 'false' - id: extract-changelog - run: | - PR_DESCRIPTION="${{ github.event.pull_request.body }}" - # Check if "changelog:" exists in PR description - if echo "$PR_DESCRIPTION" | grep -q "VERSION:" && echo "$PR_DESCRIPTION" | grep -q "CHANGELOG:"; then - # Extract text after "changelog:" - CHANGELOG_TEXT=$(echo $PR_DESCRIPTION | sed -n 's/.*CHANGELOG: \(.*\)/\1/p') - # Extract VERSION: from PR description - VERSION=$(echo "$PR_DESCRIPTION" | grep -oP 'VERSION:\s*\K\d+\.\d+\.\d+') - echo "Extracted changelog: $CHANGELOG_TEXT" - echo "::set-output name=changelog::$CHANGELOG_TEXT" - echo "::set-output name=version::$VERSION" - else - echo -e "No changelog and version information found in PR description please add them.\n Expected Format:\n VERSION:vX.XX.X\n CHANGELOG:This is changelog note.\n - To re-run the action, just pushed/commit the changes along with PR description, it will automatically triggered by sync." - exit 1 - fi - - name: Check PR body against changelog - if: steps.check-changelog.outputs.check_commit == 'false' - run: | - if ! grep -Fq "${{ steps.extract-changelog.outputs.changelog }}" CHANGELOG.md; then - # Check if version exists in CHANGELOG.md - if grep -q "## ${{ steps.extract-changelog.outputs.version }}" CHANGELOG.md; then - # Append PR description to existing version - sed -i "/## ${{ steps.extract-changelog.outputs.version }}/ a- ${{ steps.extract-changelog.outputs.changelog }} (#${{ github.event.pull_request.number }})" CHANGELOG.md + - name: check for changes + id: check-change + run: | + if git diff --name-only HEAD^ HEAD | grep 'changelog.md'; then + echo "No Changes detected, setting flag to false" + echo "::set-output name=change_detected::false" else - # Append new version and PR description - echo "$(awk '/All notable changes to the Zlux App Server package will be documented in this file\./ { - print - print "\n## " "${{ steps.extract-changelog.outputs.version }}" - print "- " "${{ steps.extract-changelog.outputs.changelog }}" " (#${{ github.event.pull_request.number }})" - next - } 1' CHANGELOG.md)" > CHANGELOG.md - fi - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add CHANGELOG.md - git commit -m "Update changelog with PR #${{ github.event.pull_request.number }} description" - git push - fi - - name: check for changes - id: check-change - run: | - if git diff --name-only HEAD^ HEAD | grep 'changelog.md'; then - echo "No Changes detected, setting flag to false" - echo "::set-output name=change_detected::false" - else - echo "::set-output name=change_detected::true" - fi + echo "::set-output name=change_detected::true" + fi check_changelog: needs: update-changelog @@ -132,8 +135,9 @@ jobs: exit 1 else echo "changelog was updated successfully." - fi - + fi + + build: runs-on: ubuntu-latest needs: check-permission From 7340883408183d1f07db26223c94b7170a68ea4c Mon Sep 17 00:00:00 2001 From: Himani1519 Date: Tue, 22 Aug 2023 19:18:51 +0530 Subject: [PATCH 04/11] Fix syntax error Signed-off-by: Himani1519 --- .github/workflows/build-core.yml | 170 +++++++++++++++---------------- 1 file changed, 84 insertions(+), 86 deletions(-) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index 05891346..2dd4e32a 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -44,99 +44,97 @@ jobs: github-repo: ${{ github.repository }} github-token: ${{ secrets.GITHUB_TOKEN }} - jobs: - update-changelog: - runs-on: ubuntu-latest - outputs: - was_updated: ${{ steps.check-change.outputs.change_detected }} - check_commit: ${{ steps.check-changelog.outputs.check_commit }} - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - fetch-depth: 0 - - - name: Check for updated CHANGELOG.md using git - id: check-changelog - run: | - if git diff --name-only origin/${{ github.base_ref }} | grep -q "^CHANGELOG.md$"; then - echo "CHANGELOG.md has been updated." - echo "::set-output name=check_commit::true" - else - echo "ERROR: CHANGELOG.md has not been updated." - echo "::set-output name=check_commit::false" - fi - - name: Extract changelog info - if: steps.check-changelog.outputs.check_commit == 'false' - id: extract-changelog - run: | - PR_DESCRIPTION="${{ github.event.pull_request.body }}" - # Check if "changelog:" exists in PR description - if echo "$PR_DESCRIPTION" | grep -q "VERSION:" && echo "$PR_DESCRIPTION" | grep -q "CHANGELOG:"; then - # Extract text after "changelog:" - CHANGELOG_TEXT=$(echo $PR_DESCRIPTION | sed -n 's/.*CHANGELOG: \(.*\)/\1/p') - # Extract VERSION: from PR description - VERSION=$(echo "$PR_DESCRIPTION" | grep -oP 'VERSION:\s*\K\d+\.\d+\.\d+') - echo "Extracted changelog: $CHANGELOG_TEXT" - echo "::set-output name=changelog::$CHANGELOG_TEXT" - echo "::set-output name=version::$VERSION" - else - echo -e "No changelog and version information found in PR description please add them.\n Expected Format:\n VERSION:vX.XX.X\n CHANGELOG:This is changelog note.\n - To re-run the action, just make a push or commit after updating the PR description or updating the changelog via a manual file changing commit." - exit 1 - fi - - name: Check PR body against changelog - if: steps.check-changelog.outputs.check_commit == 'false' - run: | - ESCAPED_CHANGELOG="${{ steps.extract-changelog.outputs.changelog }}" - ESCAPED_CHANGELOG=$(echo "$ESCAPED_CHANGELOG" | sed "s/'/\\\\'/g") - VERSION="${{ steps.extract-changelog.outputs.version }}" + update-changelog: + runs-on: ubuntu-latest + outputs: + was_updated: ${{ steps.check-change.outputs.change_detected }} + check_commit: ${{ steps.check-changelog.outputs.check_commit }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 - if ! grep -Fq "$ESCAPED_CHANGELOG" CHANGELOG.md; then - # Check if version exists in CHANGELOG.md - if grep -q "^## \`$VERSION\`" CHANGELOG.md; then - # Append PR description to existing version - sed -i "/^## \`$VERSION\`/a - $ESCAPED_CHANGELOG (#${{ github.event.pull_request.number }})" CHANGELOG.md - else - # Append new version (with backticks) and PR description below the anchor line - ANCHOR_LINE=$(awk '/All notable changes to the Zlux App Manager will be documented in this file\./ {print NR}' CHANGELOG.md) - sed -i "$ANCHOR_LINE a\\ - \n## \`$VERSION\`\n- $ESCAPED_CHANGELOG (#${{ github.event.pull_request.number }})\n" CHANGELOG.md - fi - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add CHANGELOG.md - git commit -m "Update changelog with PR #${{ github.event.pull_request.number }} description" - git push - fi + - name: Check for updated CHANGELOG.md using git + id: check-changelog + run: | + if git diff --name-only origin/${{ github.base_ref }} | grep -q "^CHANGELOG.md$"; then + echo "CHANGELOG.md has been updated." + echo "::set-output name=check_commit::true" + else + echo "ERROR: CHANGELOG.md has not been updated." + echo "::set-output name=check_commit::false" + fi + - name: Extract changelog info + if: steps.check-changelog.outputs.check_commit == 'false' + id: extract-changelog + run: | + PR_DESCRIPTION="${{ github.event.pull_request.body }}" + # Check if "changelog:" exists in PR description + if echo "$PR_DESCRIPTION" | grep -q "VERSION:" && echo "$PR_DESCRIPTION" | grep -q "CHANGELOG:"; then + # Extract text after "changelog:" + CHANGELOG_TEXT=$(echo $PR_DESCRIPTION | sed -n 's/.*CHANGELOG: \(.*\)/\1/p') + # Extract VERSION: from PR description + VERSION=$(echo "$PR_DESCRIPTION" | grep -oP 'VERSION:\s*\K\d+\.\d+\.\d+') + echo "Extracted changelog: $CHANGELOG_TEXT" + echo "::set-output name=changelog::$CHANGELOG_TEXT" + echo "::set-output name=version::$VERSION" + else + echo -e "No changelog and version information found in PR description please add them.\n Expected Format:\n VERSION:vX.XX.X\n CHANGELOG:This is changelog note.\n + To re-run the action, just make a push or commit after updating the PR description or updating the changelog via a manual file changing commit." + exit 1 + fi + - name: Check PR body against changelog + if: steps.check-changelog.outputs.check_commit == 'false' + run: | + ESCAPED_CHANGELOG="${{ steps.extract-changelog.outputs.changelog }}" + ESCAPED_CHANGELOG=$(echo "$ESCAPED_CHANGELOG" | sed "s/'/\\\\'/g") + VERSION="${{ steps.extract-changelog.outputs.version }}" - - name: check for changes - id: check-change - run: | - if git diff --name-only HEAD^ HEAD | grep 'changelog.md'; then - echo "No Changes detected, setting flag to false" - echo "::set-output name=change_detected::false" + if ! grep -Fq "$ESCAPED_CHANGELOG" CHANGELOG.md; then + # Check if version exists in CHANGELOG.md + if grep -q "^## \`$VERSION\`" CHANGELOG.md; then + # Append PR description to existing version + sed -i "/^## \`$VERSION\`/a - $ESCAPED_CHANGELOG (#${{ github.event.pull_request.number }})" CHANGELOG.md else - echo "::set-output name=change_detected::true" + # Append new version and PR description + ANCHOR_LINE=$(awk '/All notable changes to the Zlux App Manager will be documented in this file\./ {print NR}' CHANGELOG.md) + sed -i "$ANCHOR_LINE a\\ + \n## \`$VERSION\`\n- $ESCAPED_CHANGELOG (#${{ github.event.pull_request.number }})\n" CHANGELOG.md fi + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add CHANGELOG.md + git commit -m "Update changelog with PR #${{ github.event.pull_request.number }} description" + git push + fi - check_changelog: - needs: update-changelog - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: check for changes + id: check-change + run: | + if git diff --name-only HEAD^ HEAD | grep 'changelog.md'; then + echo "No Changes detected, setting flag to false" + echo "::set-output name=change_detected::false" + else + echo "::set-output name=change_detected::true" + fi - - name: Verify Changelog update - run: | - if [ "${{ needs.update-changelog.outputs.was_updated }}" != "true" ]; then - echo "CHANGELOG.md not updated, please update CHANGELOG.md with the changes made in the pull request" - exit 1 - else - echo "changelog was updated successfully." - fi + check_changelog: + needs: update-changelog + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Verify Changelog update + run: | + if [ "${{ needs.update-changelog.outputs.was_updated }}" != "true" ]; then + echo "CHANGELOG.md not updated, please update CHANGELOG.md with the changes made in the pull request" + exit 1 + else + echo "changelog was updated successfully." + fi build: runs-on: ubuntu-latest From 57d209349029799727757d53d7e62de452df40d5 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 22 Aug 2023 13:49:23 +0000 Subject: [PATCH 05/11] Update changelog with PR #542 description Signed-off-by: Himani1519 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f32605a..00d321f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to the Zlux App Manager will be documented in this file. ## `2.10.0` +- This action making a CHANGELOG note via special syntax from the GitHub PR commit message, like it could automatically update CHANGELOG.md with the message. First job checks if PR body has changelog note or not if it's not there then it asked them to add it and second job is to check if changelog note has been added in changelog.md file or not. (#542) - Bugfix: Fixed a timing issue with the iframe-adapter for Firefox (#532) ## `2.8.0` From 28193c8f0b470d90cfa8775ab1b94a4a2eaca0d5 Mon Sep 17 00:00:00 2001 From: Himani1519 Date: Wed, 23 Aug 2023 19:51:26 +0530 Subject: [PATCH 06/11] Fix version format Signed-off-by: Himani1519 --- .github/workflows/build-core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index 2dd4e32a..50128a30 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -81,7 +81,7 @@ jobs: echo "::set-output name=changelog::$CHANGELOG_TEXT" echo "::set-output name=version::$VERSION" else - echo -e "No changelog and version information found in PR description please add them.\n Expected Format:\n VERSION:vX.XX.X\n CHANGELOG:This is changelog note.\n + echo -e "No changelog and version information found in PR description please add them.\n Expected Format:\n VERSION:X.XX.X\n CHANGELOG:This is changelog note.\n To re-run the action, just make a push or commit after updating the PR description or updating the changelog via a manual file changing commit." exit 1 fi From e5d03e65bd76032be5229aa4ac176d06108acf0f Mon Sep 17 00:00:00 2001 From: Himani1519 Date: Tue, 29 Aug 2023 20:06:52 +0530 Subject: [PATCH 07/11] minor change Signed-off-by: Himani1519 --- .github/workflows/build-core.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index 50128a30..76f696de 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -103,10 +103,10 @@ jobs: sed -i "$ANCHOR_LINE a\\ \n## \`$VERSION\`\n- $ESCAPED_CHANGELOG (#${{ github.event.pull_request.number }})\n" CHANGELOG.md fi - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" + git config --global user.email "zowe-robot@users.noreply.github.com" + git config --global user.name "Zowe Robot" git add CHANGELOG.md - git commit -m "Update changelog with PR #${{ github.event.pull_request.number }} description" + git commit -s -m "Update changelog with PR #${{ github.event.pull_request.number }} description" git push fi From 926f654e8114a119a1f31897a25c0d3c6a0194a1 Mon Sep 17 00:00:00 2001 From: Himani1519 Date: Tue, 5 Sep 2023 20:42:03 +0530 Subject: [PATCH 08/11] Resolve conflicts Signed-off-by: Himani1519 --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00d321f6..8f32605a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,6 @@ All notable changes to the Zlux App Manager will be documented in this file. ## `2.10.0` -- This action making a CHANGELOG note via special syntax from the GitHub PR commit message, like it could automatically update CHANGELOG.md with the message. First job checks if PR body has changelog note or not if it's not there then it asked them to add it and second job is to check if changelog note has been added in changelog.md file or not. (#542) - Bugfix: Fixed a timing issue with the iframe-adapter for Firefox (#532) ## `2.8.0` From 2cb320c098c7255b059eceb2c55864b19c0567aa Mon Sep 17 00:00:00 2001 From: Zowe Robot Date: Tue, 5 Sep 2023 15:13:28 +0000 Subject: [PATCH 09/11] Update changelog with PR #542 description Signed-off-by: Zowe Robot --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f32605a..00d321f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to the Zlux App Manager will be documented in this file. ## `2.10.0` +- This action making a CHANGELOG note via special syntax from the GitHub PR commit message, like it could automatically update CHANGELOG.md with the message. First job checks if PR body has changelog note or not if it's not there then it asked them to add it and second job is to check if changelog note has been added in changelog.md file or not. (#542) - Bugfix: Fixed a timing issue with the iframe-adapter for Firefox (#532) ## `2.8.0` From 5702dd90c27f49776ca1625e52302cb959d5cf88 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Tue, 5 Sep 2023 14:05:14 -0400 Subject: [PATCH 10/11] Update CHANGELOG.md Signed-off-by: 1000TurquoisePogs --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00d321f6..db70357c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the Zlux App Manager will be documented in this file. ## `2.10.0` -- This action making a CHANGELOG note via special syntax from the GitHub PR commit message, like it could automatically update CHANGELOG.md with the message. First job checks if PR body has changelog note or not if it's not there then it asked them to add it and second job is to check if changelog note has been added in changelog.md file or not. (#542) + - Bugfix: Fixed a timing issue with the iframe-adapter for Firefox (#532) ## `2.8.0` From 3fc3943df5e1834bd1c31f071ac1075c1ce752be Mon Sep 17 00:00:00 2001 From: Himani1519 Date: Fri, 8 Sep 2023 12:08:34 +0530 Subject: [PATCH 11/11] update changelog when its PR Signed-off-by: Himani1519 --- .github/workflows/build-core.yml | 2 ++ CHANGELOG.md | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index 76f696de..3b28e241 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -45,6 +45,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} update-changelog: + if: github.event_name == 'pull_request' runs-on: ubuntu-latest outputs: was_updated: ${{ steps.check-change.outputs.change_detected }} @@ -121,6 +122,7 @@ jobs: fi check_changelog: + if: github.event_name == 'pull_request' needs: update-changelog runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index db70357c..78171998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to the Zlux App Manager will be documented in this file. - Bugfix: Fixed a timing issue with the iframe-adapter for Firefox (#532) ## `2.8.0` + - Bugfix: Fixed the iframe-adapter not properly recognizing standalone mode - Bugfix: Fixed Iframes from unintentionally loading their sources multiple times during refocus & multi-app situations - Enhancement: Added new isSingleAppModeSimple() to iframe-adapter to differentiate between standalone mode and simple standalone mode