From ae54def304179ccfefb5cb8215ae1071ba24750d Mon Sep 17 00:00:00 2001 From: Ansel Robateau Date: Wed, 11 Dec 2024 14:33:42 -0600 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20call=20the=20predict?= =?UTF-8?q?-next-version=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: CORE-1729 --- .github/workflows/tag-tickets-with-release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/tag-tickets-with-release.yml b/.github/workflows/tag-tickets-with-release.yml index 02de1f9..494efc0 100644 --- a/.github/workflows/tag-tickets-with-release.yml +++ b/.github/workflows/tag-tickets-with-release.yml @@ -38,9 +38,17 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: get next predicted version + id: get_next_version + uses: VirdocsSoftware/github-actions/.github/actions/predict-next-version@ar-core-1729-get-the-correct-git-log-in-shared-action - name: create prompt id: create_prompt run: | + if [ "${{ inputs.is-release }}" = "true" ]; then + TARGET_BRANCH="${{ inputs.target-branch }}" + else + TARGET_BRANCH="origin/release/v${NEXT_VERSION}" + fi COMMON_BRANCH=$(git merge-base HEAD ${TARGET_BRANCH}) DIFF="$(git log --pretty=format:'%s' ${COMMON_BRANCH}..HEAD)" LLM_PROMPT_PREFIX="Create a fun release description in 100 characters or less in one line without identifiers for the following data: @@ -53,6 +61,7 @@ jobs: echo "EOF" >> $GITHUB_OUTPUT env: TARGET_BRANCH: ${{ inputs.target-branch }} + NEXT_VERSION: ${{ steps.get_next_version.outputs.next-version }} - uses: VirdocsSoftware/github-actions/.github/actions/llm@main id: llm_action with: From de03b611cb0e9b9fd21537ffce14348d8ae0a254 Mon Sep 17 00:00:00 2001 From: Ansel Robateau Date: Wed, 11 Dec 2024 14:37:19 -0600 Subject: [PATCH 2/8] ci: use the correct branch name --- .github/workflows/tag-tickets-with-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag-tickets-with-release.yml b/.github/workflows/tag-tickets-with-release.yml index 494efc0..ff500b1 100644 --- a/.github/workflows/tag-tickets-with-release.yml +++ b/.github/workflows/tag-tickets-with-release.yml @@ -40,7 +40,7 @@ jobs: fetch-depth: 0 - name: get next predicted version id: get_next_version - uses: VirdocsSoftware/github-actions/.github/actions/predict-next-version@ar-core-1729-get-the-correct-git-log-in-shared-action + uses: VirdocsSoftware/github-actions/.github/actions/predict-next-version@ar-CORE-1729-get-the-correct-git-log-in-shared-action - name: create prompt id: create_prompt run: | From 83c0536ec92a6c5c25ea861f99de6d3b5aa14031 Mon Sep 17 00:00:00 2001 From: Ansel Robateau Date: Wed, 11 Dec 2024 14:44:07 -0600 Subject: [PATCH 3/8] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20use=20the=20environm?= =?UTF-8?q?ent=20var?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: CORE-1729 --- .github/workflows/tag-tickets-with-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag-tickets-with-release.yml b/.github/workflows/tag-tickets-with-release.yml index ff500b1..3506e30 100644 --- a/.github/workflows/tag-tickets-with-release.yml +++ b/.github/workflows/tag-tickets-with-release.yml @@ -61,7 +61,7 @@ jobs: echo "EOF" >> $GITHUB_OUTPUT env: TARGET_BRANCH: ${{ inputs.target-branch }} - NEXT_VERSION: ${{ steps.get_next_version.outputs.next-version }} + NEXT_VERSION: ${{ github.env.NEXT_VERSION }} - uses: VirdocsSoftware/github-actions/.github/actions/llm@main id: llm_action with: From 8c11451b6908bc1f82acf43240561f3b7c2057a5 Mon Sep 17 00:00:00 2001 From: Ansel Robateau Date: Wed, 11 Dec 2024 14:50:18 -0600 Subject: [PATCH 4/8] =?UTF-8?q?test:=20=F0=9F=92=8D=20debug=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: CORE-1729 --- .github/actions/predict-next-version/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/predict-next-version/action.yml b/.github/actions/predict-next-version/action.yml index cce5593..de9cb14 100644 --- a/.github/actions/predict-next-version/action.yml +++ b/.github/actions/predict-next-version/action.yml @@ -21,7 +21,7 @@ runs: - name: Predict Next Version id: predict_next_version run: | - ${{ github.action_path }}/git_predict_next_version.sh | tee next_version.txt + bash -xv ${{ github.action_path }}/git_predict_next_version.sh | tee next_version.txt shell: bash - name: Set Outputs shell: bash From 271684eb16b86f20cd1666f044250437ced100ef Mon Sep 17 00:00:00 2001 From: Ansel Robateau Date: Wed, 11 Dec 2024 14:59:38 -0600 Subject: [PATCH 5/8] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20use=20the=20text=20f?= =?UTF-8?q?ile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: CORE-1729 --- .github/workflows/tag-tickets-with-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tag-tickets-with-release.yml b/.github/workflows/tag-tickets-with-release.yml index 3506e30..b1593a7 100644 --- a/.github/workflows/tag-tickets-with-release.yml +++ b/.github/workflows/tag-tickets-with-release.yml @@ -47,7 +47,7 @@ jobs: if [ "${{ inputs.is-release }}" = "true" ]; then TARGET_BRANCH="${{ inputs.target-branch }}" else - TARGET_BRANCH="origin/release/v${NEXT_VERSION}" + TARGET_BRANCH="origin/release/v$(cat next_version.txt)" fi COMMON_BRANCH=$(git merge-base HEAD ${TARGET_BRANCH}) DIFF="$(git log --pretty=format:'%s' ${COMMON_BRANCH}..HEAD)" @@ -61,7 +61,6 @@ jobs: echo "EOF" >> $GITHUB_OUTPUT env: TARGET_BRANCH: ${{ inputs.target-branch }} - NEXT_VERSION: ${{ github.env.NEXT_VERSION }} - uses: VirdocsSoftware/github-actions/.github/actions/llm@main id: llm_action with: From 7175418d26f9dea8c9c6d75fb0965eb12c9bae88 Mon Sep 17 00:00:00 2001 From: Ansel Robateau Date: Wed, 11 Dec 2024 15:05:44 -0600 Subject: [PATCH 6/8] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20add=20if=20condition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: CORE-1729 --- .github/workflows/tag-tickets-with-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tag-tickets-with-release.yml b/.github/workflows/tag-tickets-with-release.yml index b1593a7..1f31336 100644 --- a/.github/workflows/tag-tickets-with-release.yml +++ b/.github/workflows/tag-tickets-with-release.yml @@ -46,8 +46,10 @@ jobs: run: | if [ "${{ inputs.is-release }}" = "true" ]; then TARGET_BRANCH="${{ inputs.target-branch }}" - else + elif git ls-remote --heads origin release/v$(cat next_version.txt) | grep -sw "refs/heads/release/v$(cat next_version.txt)"; then TARGET_BRANCH="origin/release/v$(cat next_version.txt)" + else + TARGET_BRANCH="origin/main" fi COMMON_BRANCH=$(git merge-base HEAD ${TARGET_BRANCH}) DIFF="$(git log --pretty=format:'%s' ${COMMON_BRANCH}..HEAD)" From 580ff45facf69235672115bc1a5efc4256bf8ab1 Mon Sep 17 00:00:00 2001 From: Ansel Robateau Date: Wed, 11 Dec 2024 15:07:38 -0600 Subject: [PATCH 7/8] =?UTF-8?q?chore:=20=F0=9F=A4=96=20remove=20debugging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: CORE-1729 --- .github/actions/predict-next-version/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/predict-next-version/action.yml b/.github/actions/predict-next-version/action.yml index de9cb14..cce5593 100644 --- a/.github/actions/predict-next-version/action.yml +++ b/.github/actions/predict-next-version/action.yml @@ -21,7 +21,7 @@ runs: - name: Predict Next Version id: predict_next_version run: | - bash -xv ${{ github.action_path }}/git_predict_next_version.sh | tee next_version.txt + ${{ github.action_path }}/git_predict_next_version.sh | tee next_version.txt shell: bash - name: Set Outputs shell: bash From 4d254d34fdbe40d572592cbfbd2babea0d51b934 Mon Sep 17 00:00:00 2001 From: Ansel Robateau Date: Wed, 11 Dec 2024 15:13:45 -0600 Subject: [PATCH 8/8] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20target=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: CORE-1729 --- .github/workflows/tag-tickets-with-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag-tickets-with-release.yml b/.github/workflows/tag-tickets-with-release.yml index 1f31336..f0616b9 100644 --- a/.github/workflows/tag-tickets-with-release.yml +++ b/.github/workflows/tag-tickets-with-release.yml @@ -40,7 +40,7 @@ jobs: fetch-depth: 0 - name: get next predicted version id: get_next_version - uses: VirdocsSoftware/github-actions/.github/actions/predict-next-version@ar-CORE-1729-get-the-correct-git-log-in-shared-action + uses: VirdocsSoftware/github-actions/.github/actions/predict-next-version@main - name: create prompt id: create_prompt run: |