- Extract FindRunOptions construction logic from ListRuns into buildRunOptions function
- Update TestListRunsWorkflowFiltering and related tests to use actual production code
- Tests now verify production logic instead of duplicating parameter parsing
- Improved error handling by returning errors instead of direct HTTP responses
- Ensures future changes to parameter parsing are properly tested
This addresses the issue where tests were bypassing production code logic,
making them less reliable for catching regressions.
The CheckSuiteID parameter was referencing a non-existent 'check_suite_id'
column in the action_run table. This commit removes the hallucinated database
schema reference while maintaining API compatibility.
Changes:
- Remove CheckSuiteID field from FindRunOptions struct
- Remove check_suite_id database query condition
- Remove parameter handling logic from shared action handler
- Remove related tests for non-functional feature
- Update Swagger docs to indicate parameter is not supported in Gitea API
- Maintain GitHub API compatibility by keeping parameter documented
The check_suite_id parameter is now silently ignored when provided,
with clear documentation that it's not supported in Gitea.
Implements additional query parameters for the workflow runs API to match GitHub's REST API specification.
- Add `exclude_pull_requests` query parameter
- Add `check_suite_id` parameter
- Add `created` parameter with date range and comparison support
- Add workflow-specific endpoint `/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs`
Builds on the workflow API foundation from #33964 to provide additional GitHub API compatibility.
Reference: https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-workflow