Skip to content

Commit 829d4ca

Browse files
feat: add optional service-url input for testing against non-production service
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 643e41c commit 829d4ca

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

pr-comment/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ inputs:
2626
description: 'GitHub token for posting PR comment'
2727
required: false
2828
default: '${{ github.token }}'
29+
service-url:
30+
description: 'oasdiff service base URL (override for testing)'
31+
required: false
32+
default: 'https://api.oasdiff.com'
2933
runs:
3034
using: 'docker'
3135
image: 'Dockerfile'
@@ -37,3 +41,4 @@ runs:
3741
- ${{ inputs.composed }}
3842
- ${{ inputs.oasdiff-token }}
3943
- ${{ inputs.github-token }}
44+
- ${{ inputs.service-url }}

pr-comment/entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ readonly exclude_elements="$4"
1313
readonly composed="$5"
1414
readonly oasdiff_token="$6"
1515
readonly github_token="$7"
16+
readonly service_url="${8:-https://api.oasdiff.com}"
1617

1718
echo "running oasdiff pr-comment base: $base, revision: $revision, include_path_params: $include_path_params, exclude_elements: $exclude_elements, composed: $composed"
1819

@@ -75,7 +76,7 @@ payload=$(jq -n \
7576

7677
# POST to oasdiff-service
7778
response=$(curl -s -w "\n%{http_code}" -X POST \
78-
"https://api.oasdiff.com/tenants/${oasdiff_token}/pr-comment" \
79+
"${service_url}/tenants/${oasdiff_token}/pr-comment" \
7980
-H "Content-Type: application/json" \
8081
-d "$payload")
8182

0 commit comments

Comments
 (0)