bug: pull_request events not fired for API-created PRs #220
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When a pull request is created via the Gitea API (
POST /repos/{owner}/{repo}/pulls), thepull_request: openedevent does not fire. This means Actions workflows withon: pull_request: types: [opened]are never triggered for API-created PRs.PRs created through the web UI do fire the event correctly.
Reproduction
on: pull_request: types: [opened]POST /api/v1/repos/Org/Repo/pullsImpact
High — This breaks automated release promotion workflows. Our CI pipeline promotes pre-releases to RC when a draft PR is opened to main. Since most PRs are created programmatically (via CLI tools, automation, Claude Code), the RC promotion step is completely bypassed.
Affected repos
All repos using the Universal Build & Release workflow (
auto-release.yml) — currently 37+ repos across MokoConsulting.Environment
Expected Behavior
API-created PRs should fire the same
pull_requestwebhook events as UI-created PRs, matching GitHub Actions behavior.Workaround
Currently using
workflow_dispatchas a manual fallback, but this defeats the purpose of the automated promotion pipeline.Related
Being worked on in a separate session.