From e6b6b6d516c590b56666b0faab35ce54448fe2ff Mon Sep 17 00:00:00 2001 From: Ryan Rondeau Date: Tue, 15 Oct 2024 13:36:25 -0700 Subject: [PATCH 1/8] Update pr-version-bump.yml --- .github/workflows/pr-version-bump.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-version-bump.yml b/.github/workflows/pr-version-bump.yml index 159455008..6a5a0ff65 100644 --- a/.github/workflows/pr-version-bump.yml +++ b/.github/workflows/pr-version-bump.yml @@ -20,7 +20,7 @@ jobs: id: get_latest_tag run: | git fetch origin main --tags - latest_tag=$(git describe --tags --abbrev=0 origin/main) + latest_tag=$(git tag --list --sort=-authordate --merged | head -n1) echo "::set-output name=latest_tag::$latest_tag" echo "Latest tag: $latest_tag" From e99573bd744eee7b393f77f3b9976bebfea8cd7e Mon Sep 17 00:00:00 2001 From: Ryan Rondeau Date: Wed, 16 Oct 2024 11:04:33 -0700 Subject: [PATCH 2/8] update tag commands --- .github/workflows/pr-version-bump.yml | 2 +- .github/workflows/release-branch-creation.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-version-bump.yml b/.github/workflows/pr-version-bump.yml index 6a5a0ff65..2bbf6a12f 100644 --- a/.github/workflows/pr-version-bump.yml +++ b/.github/workflows/pr-version-bump.yml @@ -20,7 +20,7 @@ jobs: id: get_latest_tag run: | git fetch origin main --tags - latest_tag=$(git tag --list --sort=-authordate --merged | head -n1) + latest_tag=$(git tag --list --sort=-v:refname --merged | head -n 1) echo "::set-output name=latest_tag::$latest_tag" echo "Latest tag: $latest_tag" diff --git a/.github/workflows/release-branch-creation.yml b/.github/workflows/release-branch-creation.yml index 687cde518..d162d6259 100644 --- a/.github/workflows/release-branch-creation.yml +++ b/.github/workflows/release-branch-creation.yml @@ -20,7 +20,7 @@ jobs: id: latest_tag run: | git fetch --tags - latest_tag=$(git tag --sort=-creatordate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1) + latest_tag=$(git tag --list --sort=-v:refname --merged | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1) if [ -z "$latest_tag" ]; then echo "No previous tags found, starting with v0.1.0" latest_tag="v0.0.0" From 82f43cfae5e460dfe75727fc70add892fbadb7ee Mon Sep 17 00:00:00 2001 From: Ryan Rondeau Date: Thu, 17 Oct 2024 08:46:09 -0700 Subject: [PATCH 3/8] Update pr-version-bump.yml --- .github/workflows/pr-version-bump.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-version-bump.yml b/.github/workflows/pr-version-bump.yml index 2bbf6a12f..507c508e2 100644 --- a/.github/workflows/pr-version-bump.yml +++ b/.github/workflows/pr-version-bump.yml @@ -12,6 +12,10 @@ jobs: if: ${{ github.event.pull_request.merged == true }} steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + fetch-tags: true - name: Fetch all tags run: git fetch --tags --force @@ -19,7 +23,7 @@ jobs: - name: Fetch tags from main id: get_latest_tag run: | - git fetch origin main --tags + git fetch origin main --tags --force latest_tag=$(git tag --list --sort=-v:refname --merged | head -n 1) echo "::set-output name=latest_tag::$latest_tag" echo "Latest tag: $latest_tag" From 948dd038a8e115919ec47a9dad5b1285501d9cbd Mon Sep 17 00:00:00 2001 From: Ryan Rondeau Date: Thu, 17 Oct 2024 10:31:42 -0700 Subject: [PATCH 4/8] Update pr-version-bump.yml --- .github/workflows/pr-version-bump.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-version-bump.yml b/.github/workflows/pr-version-bump.yml index 507c508e2..6e95dfa4c 100644 --- a/.github/workflows/pr-version-bump.yml +++ b/.github/workflows/pr-version-bump.yml @@ -2,14 +2,12 @@ name: Handle PR Merge and Version Update on: pull_request: - types: [closed] branches: - release/** jobs: handle_pr: name: Handle Merged PR runs-on: ubuntu-22.04 - if: ${{ github.event.pull_request.merged == true }} steps: - uses: actions/checkout@v4 with: @@ -61,9 +59,9 @@ jobs: git config --global user.name "github-actions[bot]" git add frontend/package.json backend/package.json webeoc/package.json git commit -m "chore: bump version to ${{ steps.increment_version.outputs.new_version }}" - git push origin HEAD:refs/heads/${{ github.head_ref }} + echo git push origin HEAD:refs/heads/${{ github.head_ref }} - name: Create Git Tag run: | - git tag "${{ steps.increment_version.outputs.new_version }}" - git push origin "${{ steps.increment_version.outputs.new_version }}" + echo git tag "${{ steps.increment_version.outputs.new_version }}" + echo git push origin "${{ steps.increment_version.outputs.new_version }}" From 5e385038e476d5de28ffbd26151065bfbdbadbcf Mon Sep 17 00:00:00 2001 From: Ryan Rondeau Date: Thu, 17 Oct 2024 11:53:27 -0700 Subject: [PATCH 5/8] Update complaint-status-select.tsx --- frontend/src/app/components/codes/complaint-status-select.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/components/codes/complaint-status-select.tsx b/frontend/src/app/components/codes/complaint-status-select.tsx index d5c61e8bd..dcc0a36b6 100644 --- a/frontend/src/app/components/codes/complaint-status-select.tsx +++ b/frontend/src/app/components/codes/complaint-status-select.tsx @@ -7,7 +7,7 @@ interface Option { value: string | undefined; label: string | undefined; } - +// Random comment type Props = { onSelectChange: (selectedValue: string) => void; isDisabled?: boolean; From e1a3d9e112d5f1306a011b86dacf69e5e25c37f3 Mon Sep 17 00:00:00 2001 From: Ryan Rondeau Date: Thu, 17 Oct 2024 12:46:43 -0700 Subject: [PATCH 6/8] script updates --- .github/workflows/pr-version-bump.yml | 8 +++++--- .github/workflows/release-branch-creation.yml | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-version-bump.yml b/.github/workflows/pr-version-bump.yml index 6e95dfa4c..507c508e2 100644 --- a/.github/workflows/pr-version-bump.yml +++ b/.github/workflows/pr-version-bump.yml @@ -2,12 +2,14 @@ name: Handle PR Merge and Version Update on: pull_request: + types: [closed] branches: - release/** jobs: handle_pr: name: Handle Merged PR runs-on: ubuntu-22.04 + if: ${{ github.event.pull_request.merged == true }} steps: - uses: actions/checkout@v4 with: @@ -59,9 +61,9 @@ jobs: git config --global user.name "github-actions[bot]" git add frontend/package.json backend/package.json webeoc/package.json git commit -m "chore: bump version to ${{ steps.increment_version.outputs.new_version }}" - echo git push origin HEAD:refs/heads/${{ github.head_ref }} + git push origin HEAD:refs/heads/${{ github.head_ref }} - name: Create Git Tag run: | - echo git tag "${{ steps.increment_version.outputs.new_version }}" - echo git push origin "${{ steps.increment_version.outputs.new_version }}" + git tag "${{ steps.increment_version.outputs.new_version }}" + git push origin "${{ steps.increment_version.outputs.new_version }}" diff --git a/.github/workflows/release-branch-creation.yml b/.github/workflows/release-branch-creation.yml index d162d6259..dc1e58e9f 100644 --- a/.github/workflows/release-branch-creation.yml +++ b/.github/workflows/release-branch-creation.yml @@ -11,6 +11,10 @@ jobs: if: startsWith(github.ref, 'refs/heads/release/') && !contains(github.ref, '/') steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + fetch-tags: true - name: Install npm run: sudo apt-get install -y npm @@ -19,7 +23,7 @@ jobs: - name: Fetch latest tag id: latest_tag run: | - git fetch --tags + git fetch --tags --force latest_tag=$(git tag --list --sort=-v:refname --merged | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1) if [ -z "$latest_tag" ]; then echo "No previous tags found, starting with v0.1.0" From 2744d8bd08846fd84aa92e369d3e002936dcf019 Mon Sep 17 00:00:00 2001 From: Ryan Rondeau Date: Thu, 17 Oct 2024 12:48:58 -0700 Subject: [PATCH 7/8] Update complaint-status-select.tsx --- frontend/src/app/components/codes/complaint-status-select.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/app/components/codes/complaint-status-select.tsx b/frontend/src/app/components/codes/complaint-status-select.tsx index dcc0a36b6..259a4c097 100644 --- a/frontend/src/app/components/codes/complaint-status-select.tsx +++ b/frontend/src/app/components/codes/complaint-status-select.tsx @@ -7,7 +7,6 @@ interface Option { value: string | undefined; label: string | undefined; } -// Random comment type Props = { onSelectChange: (selectedValue: string) => void; isDisabled?: boolean; From 5b0c7de36acd2033ea2283c19e95122480d74303 Mon Sep 17 00:00:00 2001 From: Ryan Rondeau Date: Thu, 17 Oct 2024 12:49:17 -0700 Subject: [PATCH 8/8] Update complaint-status-select.tsx --- frontend/src/app/components/codes/complaint-status-select.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/app/components/codes/complaint-status-select.tsx b/frontend/src/app/components/codes/complaint-status-select.tsx index 259a4c097..d5c61e8bd 100644 --- a/frontend/src/app/components/codes/complaint-status-select.tsx +++ b/frontend/src/app/components/codes/complaint-status-select.tsx @@ -7,6 +7,7 @@ interface Option { value: string | undefined; label: string | undefined; } + type Props = { onSelectChange: (selectedValue: string) => void; isDisabled?: boolean;