Skip to content

Commit bbc335d

Browse files
authored
chore(ci): update test suite run workflow dispatch with useful info (#8780)
1 parent 4c64896 commit bbc335d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/master.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,18 @@ jobs:
137137
with:
138138
github-token: ${{ secrets.GH_TRIGGER_TOKEN }}
139139
script: |
140+
const prUrl = context.payload.pull_request ? context.payload.pull_request.html_url : '';
141+
const commitUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.sha}`;
142+
140143
await github.rest.actions.createWorkflowDispatch({
141144
owner: 'cubedevinc',
142145
repo: 'sql-api-test-suite',
143146
workflow_id: 'test_and_run_test_suites.yml',
144147
ref: 'main',
145148
inputs: {
146-
'cube-image': 'cubejs/cube:dev'
149+
'cube-image': 'cubejs/cube:dev',
150+
'source-repo': context.repo.repo,
151+
'source-pr-url': prUrl,
152+
'source-commit-url': commitUrl
147153
}
148154
})

.github/workflows/publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,12 +753,18 @@ jobs:
753753
with:
754754
github-token: ${{ secrets.GH_TRIGGER_TOKEN }}
755755
script: |
756+
const prUrl = context.payload.pull_request ? context.payload.pull_request.html_url : '';
757+
const commitUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.sha}`;
758+
756759
await github.rest.actions.createWorkflowDispatch({
757760
owner: 'cubedevinc',
758761
repo: 'sql-api-test-suite',
759762
workflow_id: 'test_and_run_test_suites.yml',
760763
ref: 'main',
761764
inputs: {
762-
'cube-image': 'cubejs/cube:latest'
765+
'cube-image': 'cubejs/cube:latest',
766+
'source-repo': context.repo.repo,
767+
'source-pr-url': prUrl,
768+
'source-commit-url': commitUrl
763769
}
764770
})

0 commit comments

Comments
 (0)