diff --git a/.circleci/continue-config.yml b/.circleci/continue-config.yml index 37d01a240..eebef9f25 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: @@ -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: '.' 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' 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_"