Skip to content

Commit 0788eba

Browse files
committed
Merge remote-tracking branch 'origin/main' into add-app-secrets
2 parents 00fcb06 + 1933e51 commit 0788eba

File tree

464 files changed

+7444
-2130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

464 files changed

+7444
-2130
lines changed

.github/workflows/openapi-spec.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Check for breaking OpenAPI changes
2+
3+
on:
4+
push:
5+
pull_request:
6+
paths:
7+
- "internal/api/docs/openapi.yaml"
8+
workflow_dispatch:
9+
inputs:
10+
target_branch:
11+
description: "Branch to compare against (used in manual runs)"
12+
required: false
13+
default: "main"
14+
15+
jobs:
16+
oasdiff:
17+
name: OASDiff Check
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Set up Go
27+
uses: actions/setup-go@v5
28+
with:
29+
go-version-file: go.mod
30+
31+
- name: Install oasdiff
32+
run: go install github.com/oasdiff/[email protected]
33+
34+
- name: Add Go bin to PATH
35+
run: echo "${HOME}/go/bin" >> $GITHUB_PATH
36+
37+
- name: Determine base branch and fetch OpenAPI file
38+
id: get_base_openapi
39+
run: |
40+
BASE_BRANCH="${{ github.event.pull_request.base.ref || github.event.inputs.target_branch || 'main' }}"
41+
echo "Comparing against base branch: $BASE_BRANCH"
42+
git fetch origin "$BASE_BRANCH"
43+
git show origin/"$BASE_BRANCH":internal/api/docs/openapi.yaml > /tmp/base-openapi.yaml \
44+
|| (touch /tmp/base-openapi.yaml; echo "No base OpenAPI file found, using empty file.")
45+
46+
- name: Run oasdiff to check for breaking changes
47+
run: |
48+
if oasdiff breaking --format githubactions --filter-extension request-parameter-enum-value-added --fail-on ERR /tmp/base-openapi.yaml internal/api/docs/openapi.yaml; then
49+
echo "✅ No breaking changes detected in OpenAPI spec."
50+
else
51+
echo "❌ Breaking changes detected! Please review the OpenAPI spec."
52+
exit 1
53+
fi

.github/workflows/test-update.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,15 @@ jobs:
2727
GH_TOKEN: ${{ secrets.ARDUINOBOT_TOKEN }}
2828
run: |
2929
go tool task test:update
30+
31+
- name: Slack notification of unexpected failure
32+
if: ${{ failure() }}
33+
uses: rtCamp/action-slack-notify@v2
34+
env:
35+
SLACK_WEBHOOK: ${{ secrets.TEAM_TOOLING_CHANNEL_SLACK_WEBHOOK }}
36+
SLACK_MESSAGE: |
37+
:warning::warning::warning::warning:
38+
WARNING: ${{ github.repository }} ${{ github.workflow }} workflow run had an unexpected failure!!!
39+
:warning::warning::warning::warning:
40+
SLACK_COLOR: danger
41+
MSG_MINIMAL: true

0 commit comments

Comments
 (0)