Skip to content

Commit 91dd98d

Browse files
authored
Merge branch 'master' into XBAP-17277
2 parents 994ca65 + e98811a commit 91dd98d

20 files changed

Lines changed: 1127 additions & 522 deletions

.commitlintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"subject-case": [0],
5+
"body-max-line-length": [0]
6+
}
7+
}

.github/workflows/create-github-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ jobs:
3131
node-version: 20
3232

3333
- name: Perform release
34-
run: npx --package @semantic-release/exec semantic-release
34+
run: npx --package @semantic-release/exec --package conventional-changelog-conventionalcommits semantic-release
3535
env:
3636
GH_TOKEN: ${{ steps.get_access_token.outputs.token }}

.github/workflows/pr-linting.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PR Linting
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58
types: [opened, reopened, synchronize]
@@ -13,4 +16,23 @@ jobs:
1316
uses: actions/checkout@v4
1417

1518
- name: MegaLinter
16-
uses: oxsecurity/megalinter/flavors/documentation@v9
19+
uses: oxsecurity/megalinter/flavors/documentation@v9
20+
21+
commitlint:
22+
runs-on: ubuntu-latest
23+
name: Conventional Commit Validation
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Setup node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 20
34+
35+
- name: Validate PR commits with commitlint
36+
run: |
37+
npm install --no-save @commitlint/cli @commitlint/config-conventional
38+
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

.github/workflows/pr-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
gh workflow run pr.yml \
4242
--repo xero-internal/xeroapi-sdk-codegen \
4343
--ref master \
44-
--field branch_name="$BRANCH_NAME" \
44+
--field oas_branch="$BRANCH_NAME" \
4545
--field oas_repo="$OAS_REPO"
4646
4747
# Wait a moment for the run to be created

.releaserc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
}
2222
],
2323
"@semantic-release/github",
24-
"@semantic-release/commit-analyzer"
24+
[
25+
"@semantic-release/commit-analyzer",
26+
{
27+
"preset": "conventionalcommits"
28+
}
29+
]
2530
]
2631
}

manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"path": "/xero-payroll-au.yaml",
2828
"canPreview": true
2929
},
30+
"payrollAuV2": {
31+
"path": "/xero-payroll-au-v2.yaml",
32+
"canPreview": true
33+
},
3034
"payrollNz": {
3135
"path": "/xero-payroll-nz.yaml",
3236
"canPreview": true

scripts/api-diff/api-diff.sh

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ cd "$(dirname "$0")/../.."
1212

1313
# Configuration
1414
DOCKER_IMAGE="${OASDIFF_DOCKER_IMAGE:-tufin/oasdiff:latest}"
15-
BASE_BRANCH="${BASE_BRANCH:-origin/master}"
15+
16+
# Detect base branch from GitHub Actions environment or fallback to local defaults
17+
if [ -n "$GITHUB_BASE_REF" ]; then
18+
# In GitHub Actions PR, use the base ref (e.g., "master")
19+
BASE_BRANCH="${BASE_BRANCH:-origin/$GITHUB_BASE_REF}"
20+
else
21+
# Local development: default to origin/master
22+
BASE_BRANCH="${BASE_BRANCH:-origin/master}"
23+
fi
1624

1725
FAIL_ON_BREAKING=false
1826
TARGET_FILE=""
@@ -29,9 +37,21 @@ for arg in "$@"; do
2937
fi
3038
done
3139

40+
# Detect current branch: GitHub Actions PR branch, or local git branch
41+
# Allow CURRENT_BRANCH env var to override for testing
42+
if [ -n "$CURRENT_BRANCH" ]; then
43+
# Use explicitly set CURRENT_BRANCH (for testing)
44+
:
45+
elif [ -n "$GITHUB_HEAD_REF" ]; then
46+
# Use GitHub Actions PR branch
47+
CURRENT_BRANCH="$GITHUB_HEAD_REF"
48+
else
49+
# Use local git branch
50+
CURRENT_BRANCH=$(git branch --show-current 2>/dev/null || echo "")
51+
fi
52+
3253
# If --fail-on-breaking not explicitly set, determine based on branch name
3354
if [ "$FAIL_ON_BREAKING" = false ]; then
34-
CURRENT_BRANCH=${CURRENT_BRANCH:-$(git branch --show-current 2>/dev/null || echo "")}
3555
if [[ "$CURRENT_BRANCH" == *breaking* ]]; then
3656
echo "Branch '$CURRENT_BRANCH' contains 'breaking', allowing breaking changes"
3757
FAIL_ON_BREAKING=false
@@ -135,7 +155,7 @@ for file in $files; do
135155
echo ""
136156
echo "--- Breaking changes check ---"
137157
set +e
138-
BREAKING_OUTPUT=$(docker run --rm -v "$(pwd)":/current -v "$TEMP_DIR":/base "$DOCKER_IMAGE" breaking --fail-on ERR --include-path-params /base/"$file" /current/"$file" 2>&1)
158+
BREAKING_OUTPUT=$(docker run --rm -v "$(pwd)":/current -v "$TEMP_DIR":/base "$DOCKER_IMAGE" breaking --fail-on WARN --include-path-params /base/"$file" /current/"$file" 2>&1)
139159
BREAKING_EXIT=$?
140160
set -e
141161

xero-app-store.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: 3.0.0
22
info:
3-
version: 10.1.0
3+
version: 12.0.1
44
title: Xero AppStore API
55
description: These endpoints are for Xero Partners to interact with the App Store Billing platform
66
termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/

0 commit comments

Comments
 (0)