Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable gtmq (IN-1750) #292

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .circleci/continue-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:
default: false

orbs:
vfcommon: voiceflow/common@0.82.0
vfcommon: voiceflow/common@0.87.2
sonarcloud: sonarsource/[email protected]

defaults:
Expand Down Expand Up @@ -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: '.'
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/update-pr-title.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
id: hotfixLabel
with:
label: hotfix

- name: Check for breakglass label
uses: Dreamcodeio/[email protected]
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/[email protected]'
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'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MERGE_COMMIT_MESSAGE_REGEX value appears to be set to a PR template fragment, which will prevent automerge from succeeding since commit messages won't match this specific pattern. Consider using (.*) to match any commit message, or remove the MERGE_COMMIT_MESSAGE_REGEX parameter entirely if commit message validation isn't needed for the breakglass workflow.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

MERGE_COMMIT_MESSAGE_REGEX: '(.*)### Implementation details. How do you make this change'
21 changes: 21 additions & 0 deletions .github/workflows/vercel.yaml
Original file line number Diff line number Diff line change
@@ -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_"
Comment on lines +13 to +14
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The echo statement alone won't prevent Vercel checks from running. To properly skip these checks, replace the run command with:

run: exit 0

This will successfully short-circuit the workflow with a successful status.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.


# vercel:
# name: UI Tests
# runs-on: ubuntu-latest
# steps:
# - name: Skip Vercel UI Tests
# run: echo "Skipping Vercel UI Tests for gtmq_"
Loading