badges: Relax the default workflow badge conditions
Previously, if no branch was explicitly specified for a workflow, it defaulted to the default branch of the repo. This worked fine for workflows that were triggered on push, but it prevented showing badges for workflows that only run on tags, or on schedule - since they do not run on a specific branch. Thus, relax the conditions, and if no branch is specified, just return the latest run of the given workflow. If one is specified, *then* restrict it to said branch. Fixes #3487. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
parent
6cb8c81de1
commit
d6915f4d5f
4 changed files with 35 additions and 7 deletions
1
release-notes/8.0.0/fix/3843.md
Normal file
1
release-notes/8.0.0/fix/3843.md
Normal file
|
@ -0,0 +1 @@
|
|||
- Fixed a bug that resulted in workflow badges not working for workflows that weren't running on push (such as scheduled workflows, and ones that run on tags and for prs)
|
Loading…
Add table
Add a link
Reference in a new issue