woodpecker-ci/woodpecker

Allow badges to include more than just push events

Opened this issue ยท 10 comments

Component

web-ui

Describe the bug

We have a good state build, but the WEB UI shows a bad build result badge:
image

We have newer seen this problem before!

Steps to reproduce

...don't know...

Expected behavior

No response

System Info

{
"source": "https://github.com/woodpecker-ci/woodpecker",
"version": "2.7.3"
}

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
xoxys commented

Is the status wrong in your example, or the badge in the upper right?

Is the status wrong in your example, or the badge in the upper right?

Title + description updated.

The badge is intentionally limited to the push event.

xoxys commented

The badge is intentionally limited to the push event.

According to the screenshot, the last successful build is a commit to master (should match the push to default branch limitation) and should be reflected in the badge status.

It's a cron build, not a push build

xoxys commented

Ah, because of the clock symbol I see ๐Ÿ‘

The badge is intentionally limited to the push event.

Hmm... why?
No matter the trigger of the pipeline, the badge should express the state of the pipeline (like the first word in the badge).
We have an dashboard where we intentionally monitor the state of our pipelines.

I think it's good with this filter, because cron and push pipelines can be different. And mostly people use the badge for the push pipelines.
What would be good though is an option to change that.

Maybe it would be better to allow the choice to the user and add an option in the badge settings for each repo. This way if someone would like to have that updated even on PRs, that would be possible.

I'd use an URL param just like it is for the branch already.