Description
Description
When branch protection is enabled with required status checks, and a workflow uses on: paths filter, if the PR doesn't match the specified paths, the workflow won't be triggered. This causes the PR status check to always
show "Some required checks are missing" because the required check will never run.
Steps to Reproduce
- Enable branch protection on a branch (e.g.,
main)
- Configure the branch protection to require status checks
- Add a status check requirement (e.g.,
ci/workflow-name)
- Create/modify a GitHub Actions workflow with
on: paths filter:
on:
pull_request:
paths:
- "src/**"
- Create a PR that modifies files outside the specified paths (e.g., only documentation files)
- Check the PR status checks
Expected Behavior
- The workflow should either:
- Option A: Still run and report a "skipped" or "success" status when paths don't match
- Option B: Gitea should recognize that the workflow was intentionally skipped due to paths filter and not require it
- Option C: Provide a configuration option to mark certain checks as "optional when skipped"
Actual Behavior
- The workflow is not triggered at all
- The required status check is missing
- PR cannot be merged because "Some required checks are missing"
- User is forced to either:
- Remove the paths filter (causing unnecessary CI runs)
- Disable branch protection status check requirement
- Manually trigger the workflow
Gitea Version
1.25.5
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
using docker rootless image
Database
None
Description
Description
When branch protection is enabled with required status checks, and a workflow uses
on: pathsfilter, if the PR doesn't match the specified paths, the workflow won't be triggered. This causes the PR status check to alwaysshow "Some required checks are missing" because the required check will never run.
Steps to Reproduce
main)ci/workflow-name)on: pathsfilter:Expected Behavior
Actual Behavior
Gitea Version
1.25.5
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
using docker rootless image
Database
None