File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 runs-on : ubuntu-latest
3232
3333 steps :
34- - uses : actions/github-script@v7
34+ - name : Print Triggering Workflow Name
35+ run : echo "The workflow that triggered this was ${{ github.event.workflow_run.name }}"
36+
37+ - name : Add Pull Request Label
38+ uses : actions/github-script@v7
3539 with :
3640 script : |
3741 const owner = "google"
4044 if (context.payload.pull_request !== undefined) {
4145 pull_number = context.payload.pull_request.number
4246 } else if (context.payload.workflow_run !== undefined) {
47+ workflow_name = context.payload.workflow_run.name
4348 if (context.payload.workflow_run.pull_requests.length === 0) {
44- console.log("This workflow is NOT running within a PR's context")
49+ console.log("This workflow ${workflow_name} is NOT running within a PR's context")
4550 process.exit()
4651 }
4752 console.log(context.payload.workflow_run.pull_requests)
You can’t perform that action at this time.
0 commit comments