diff --git a/.github/workflows/tag-tickets-with-release.yml b/.github/workflows/tag-tickets-with-release.yml index 02de1f9..f0616b9 100644 --- a/.github/workflows/tag-tickets-with-release.yml +++ b/.github/workflows/tag-tickets-with-release.yml @@ -38,9 +38,19 @@ 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@main - name: create prompt id: create_prompt run: | + if [ "${{ inputs.is-release }}" = "true" ]; then + TARGET_BRANCH="${{ inputs.target-branch }}" + 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)" LLM_PROMPT_PREFIX="Create a fun release description in 100 characters or less in one line without identifiers for the following data: