`workflow_run` triggered on `[completed]` receives `run-name` (aka `display_title`) as `name` in `event`
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
When workflow is triggered as workflow_run on [completed] it receives run-name as name in the event. workflow_run object.
To Reproduce
Steps to reproduce the behavior:
Create 2 workflows:
- To trigger
name: Test workflow
run-name: Unexpected value
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: echo 1
- To watch for workflow run:
name: WF Run
on:
workflow_run:
workflows:
- Test workflow
types:
- requested
- completed
jobs:
export:
runs-on: ubuntu-latest
steps:
- run: |
echo "name = '${{ github.event.workflow_run.name }}'"
echo "display_title = '${{ github.event.workflow_run.display_title }}'"
On requested it outputs:
name = 'Test workflow'
display_title = 'Test workflow'
And on completed:
name = 'Unexpected value'
display_title = 'Unexpected value'
Expected behavior
Expecting to see name in the workflow_run.name and run-name in github.event.workflow_run.display_title.
Runner Version and Platform
Version of your runner? Latest
OS of the machine running the runner? Ubuntu
What's not working?
Outputs run-name instead of name in the event object.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the two workflow YAML examples, comparing the requested and completed workflow_run event outputs on Ubuntu. Trace how the runner application constructs the event object; done means workflow_run.name remains Test workflow and display_title contains Unexpected value for the completed run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100