From 38a870eaaeaf721930ccd1708a9105315ea35445 Mon Sep 17 00:00:00 2001 From: Greg O'Grady Date: Mon, 11 Nov 2024 12:46:36 -0500 Subject: [PATCH 1/4] build(ci): orb voiceflow/common@0.87.2 --- .circleci/continue-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/continue-config.yml b/.circleci/continue-config.yml index 37d01a240..682b6d001 100644 --- a/.circleci/continue-config.yml +++ b/.circleci/continue-config.yml @@ -12,7 +12,7 @@ parameters: default: false orbs: - vfcommon: voiceflow/common@0.82.0 + vfcommon: voiceflow/common@0.87.2 sonarcloud: sonarsource/sonarcloud@2.0.0 defaults: From 57eac466aedee7092193989bb0ce66e49d2da39a Mon Sep 17 00:00:00 2001 From: Greg O'Grady Date: Mon, 11 Nov 2024 13:00:05 -0500 Subject: [PATCH 2/4] build(ci): fail on bors staging branch --- .circleci/continue-config.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.circleci/continue-config.yml b/.circleci/continue-config.yml index 682b6d001..eebef9f25 100644 --- a/.circleci/continue-config.yml +++ b/.circleci/continue-config.yml @@ -121,6 +121,13 @@ workflows: force_execute: true run_in_container: false container_folder_to_copy: '' # Copy all + pre-steps: + - run: | + if [ "$CIRCLE_BRANCH" == "staging" ]; then + echo "Detected 'staging' branch" + echo "bors is deprecated. Use Graphite Merge Queue" + exit 1 + fi post_build_steps: - persist_to_workspace: root: '.' From 1fbdacc76a1e18cd09370608dfbf415db7417e44 Mon Sep 17 00:00:00 2001 From: Greg O'Grady Date: Mon, 11 Nov 2024 13:08:31 -0500 Subject: [PATCH 3/4] build(feat): labels for workflows --- .github/workflows/update-pr-title.yaml | 78 ++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/update-pr-title.yaml diff --git a/.github/workflows/update-pr-title.yaml b/.github/workflows/update-pr-title.yaml new file mode 100644 index 000000000..b94e4d25a --- /dev/null +++ b/.github/workflows/update-pr-title.yaml @@ -0,0 +1,78 @@ +name: 'Update Pull Request Title' +on: + pull_request: + types: [opened, synchronize, reopened, labeled] + +jobs: + update_pr_title: + runs-on: ubuntu-latest + steps: + - name: Get branch name + if: ${{ github.actor != 'github-actions' }} + id: branch-name + uses: tj-actions/branch-names@v6 + + - name: Check for hotfix label + uses: Dreamcodeio/pr-has-label-action@v1.2 + id: hotfixLabel + with: + label: hotfix + + - name: Check for breakglass label + uses: Dreamcodeio/pr-has-label-action@v1.2 + id: breakglassLabel + with: + label: breakglass + + - uses: tzkhan/pr-update-action@v2 + if: | + github.actor != 'github-actions' + && !contains(github.event.pull_request.title, '[breakglass]') + && ( + contains(steps.branch-name.outputs.head_ref_branch, 'break-glass') + || contains(steps.branch-name.outputs.head_ref_branch, 'breakglass') + || steps.breakglassLabel.outputs.hasLabel == 'true' + ) + with: + repo-token: '${{ secrets.GITHUB_TOKEN }}' + head-branch-regex: '.+' + title-template: ' [breakglass]' + title-update-action: suffix + + - uses: tzkhan/pr-update-action@v2 + if: | + github.actor != 'github-actions' + && !contains(github.event.pull_request.title, '[bugfix]') + && ( + contains(steps.branch-name.outputs.head_ref_branch, 'bug-fix') + || contains(steps.branch-name.outputs.head_ref_branch, 'bugfix') + || steps.hotfixLabel.outputs.hasLabel == 'true' + ) + with: + repo-token: '${{ secrets.GITHUB_TOKEN }}' + head-branch-regex: '.+' + title-template: ' [bugfix]' + title-update-action: suffix + + breakglass: + needs: update_pr_title + name: Breakglass + runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' }} + permissions: + contents: write + pull-requests: write + steps: + - id: automerge + name: automerge + uses: 'pascalgn/automerge-action@v0.16.4' + env: + GITHUB_TOKEN: '${{ secrets.GH_SA_TOKEN }}' + MERGE_LABELS: 'breakglass' + MERGE_METHOD: 'squash' + MERGE_DELETE_BRANCH: 'true' + MERGE_REQUIRED_APPROVALS: '0' + MERGE_RETRY_SLEEP: '60000' # ms + MERGE_RETRIES: '15' + MERGE_READY_STATE: 'clean,unstable' + MERGE_COMMIT_MESSAGE_REGEX: '(.*)### Implementation details. How do you make this change' From b098aa5dc74f6789bc50aabbe9f0bd84925902a2 Mon Sep 17 00:00:00 2001 From: Greg O'Grady Date: Mon, 11 Nov 2024 14:10:56 -0500 Subject: [PATCH 4/4] build(ci): skip vercel for gtmq_ branches --- .github/workflows/vercel.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/vercel.yaml diff --git a/.github/workflows/vercel.yaml b/.github/workflows/vercel.yaml new file mode 100644 index 000000000..00838cfae --- /dev/null +++ b/.github/workflows/vercel.yaml @@ -0,0 +1,21 @@ +name: 'Skip Vercel Checks' +on: + pull_request: + types: [opened] + # branches: + # - 'gtmq_**' + +jobs: + vercel_checks: + name: Vercel Preview Comments + runs-on: ubuntu-latest + steps: + - name: Skip Vercel Preview Comments + run: echo "Skipping Vercel Preview Comments for gtmq_" + + # vercel: + # name: UI Tests + # runs-on: ubuntu-latest + # steps: + # - name: Skip Vercel UI Tests + # run: echo "Skipping Vercel UI Tests for gtmq_"