Skip to content

Correct workflow badge 'event' example to use 'on' #12329

@danielfdickinson

Description

@danielfdickinson

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge

What part(s) of the article would you like to see updated?

The example at

## Using the `event` parameter
This Markdown example adds a badge that displays the status of workflow runs triggered by the `pull_request` event.
```markdown
![example event parameter](https://github.com/github/docs/actions/workflows/main.yml/badge.svg?event=pull_request)
```
is incorrect.

Using a URL such as https://github.com/github/docs/actions/workflows/main.yml/badge.svg?event=pull_request shows no status, as with this repo:

test-build-validate PR

Changing it to a URL such as https://github.com/danielfdickinson/hugo-action-check-links/actions/workflows/test-check-links.yml/badge.svg?on=pull_request shows the status of the event (in this case pull_request)

test-build-validate PR

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions