Skip to content
Merged
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
22 changes: 12 additions & 10 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,21 @@ jobs:
result-encoding: string
- run: |
echo "- Validating user-agent default"
expected="actions/github-script octokit-core.js/"
if [[ "${{steps.user-agent-default.outputs.result}}" != "$expected"* ]]; then
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-default.outputs.result}}"
ua="${{steps.user-agent-default.outputs.result}}"
if [[ "$ua" != "actions/github-script octokit-core.js/"* ]] && [[ "$ua" != "actions/github-script actions_orchestration_id/"* ]]; then
echo $'::error::\u274C' "Expected user-agent to start with 'actions/github-script', got $ua"
exit 1
fi
echo "- Validating user-agent set to a value"
expected="foobar octokit-core.js/"
if [[ "${{steps.user-agent-set.outputs.result}}" != "$expected"* ]]; then
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-set.outputs.result}}"
ua="${{steps.user-agent-set.outputs.result}}"
if [[ "$ua" != "foobar octokit-core.js/"* ]] && [[ "$ua" != "foobar actions_orchestration_id/"* ]]; then
echo $'::error::\u274C' "Expected user-agent to start with 'foobar', got $ua"
exit 1
fi
echo "- Validating user-agent set to an empty string"
expected="actions/github-script octokit-core.js/"
if [[ "${{steps.user-agent-empty.outputs.result}}" != "$expected"* ]]; then
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-empty.outputs.result}}"
ua="${{steps.user-agent-empty.outputs.result}}"
if [[ "$ua" != "actions/github-script octokit-core.js/"* ]] && [[ "$ua" != "actions/github-script actions_orchestration_id/"* ]]; then
echo $'::error::\u274C' "Expected user-agent to start with 'actions/github-script', got $ua"
exit 1
fi
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
Expand All @@ -178,7 +178,9 @@ jobs:
strategy:
matrix:
environment: ['', 'debug-integration-test']
environment: ${{ matrix.environment }}
environment:
name: ${{ matrix.environment }}
deployment: false
Comment on lines +181 to +183
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

matrix.environment includes an empty string, but the new object form always sets environment.name. If matrix.environment resolves to '', this can yield an empty environment name and cause the workflow to error (and/or attempt to reference a non-existent environment). Consider conditionally omitting environment when the matrix value is empty (e.g., make environment itself an expression that returns '' for the non-debug case, or restructure the matrix to use a boolean and only set the environment for the debug variant).

Suggested change
environment:
name: ${{ matrix.environment }}
deployment: false
environment: ${{ matrix.environment && fromJSON(format('{{"name":"{0}","deployment":false}}', matrix.environment)) || '' }}

Copilot uses AI. Check for mistakes.
name: "Integration test: debug option (runner.debug mode ${{ matrix.environment && 'enabled' || 'disabled' }})"
runs-on: ubuntu-latest
steps:
Expand Down
Loading