Skip to content

workflow_run triggered on [completed] receives run-name (aka display_title) as name in event #4141

@hazzik

Description

@hazzik

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:

  1. To trigger
name: Test workflow
run-name: Unexpected value

on:
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - run: echo 1
  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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions