Get work package git activity
get_work_package_git_activityShows commits, pull/merge requests, and CI status linked to a work package, helping you verify if a ticket is implemented and what shipped.
Instructions
Show the code behind a work package: commits, pull/merge requests and CI status.
Use this for "is this ticket implemented", "what shipped for it", "did CI pass",
"which branch/PR is this in". It returns, in one call: revisions (commits whose
message references the work package, with full SHA, short SHA, author, message and
commit time), github_pull_requests (title, state, draft, merged/merged_at, labels,
author, URL and the CI check_runs with status and conclusion),
gitlab_merge_requests (the same, with pipelines instead of check runs) and
gitlab_issues.
available says, per source, whether this instance and this account can answer at
all, and notes explains every false — "module absent" and "no permission" are
different answers and neither means "no code was written". Report the notes rather
than concluding a ticket has no development activity.
Pitfalls. Every pull/merge request carries two numbers: id is the
OpenProject-internal id (the only thing get_github_pull_request accepts) and
number is the '#481' humans quote on GitHub/GitLab. A state of 'closed' does not
mean merged — check merged. A source that 403s or 404s is reported in notes, not
raised, so a missing GitLab module never hides GitHub results.
Nothing appears here by magic. Links are created by text, not by the API: a commit message must mention the work package ('refs #123', or 'fixes #123' / 'closes #123' to also close it), and a pull or merge request must mention 'OP#123' or the full work-package URL in its description or a comment. OpenProject cannot browse repositories, list branches or diffs, or create these links through the API.
Cross-references: full pull-request detail (body, diff counts, all check runs) via
get_github_pull_request(github_pull_request_id=<the id field>); the ticket itself
via get_work_package; the discussion via list_work_package_comments.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include | No | Which sources to fetch: any of 'revisions' (SCM commits), 'github' (pull requests + CI check runs), 'gitlab' (merge requests, issues + pipelines). Omit for all three — they are fetched concurrently, so narrowing this saves little. Availability is reported for all three regardless of what was fetched. | |
| work_package_id | Yes | Work package id. Comes from search_work_packages, list_work_packages or get_work_package — never guess it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Degradation notes: which sources were skipped and why. Read them before reporting 'there are no pull requests'. | |
| available | Yes | Per-source availability, derived from the work package's own links. | |
| revisions | No | Commits referencing this work package; always a list. | |
| work_package | No | The work package these results belong to ({id, name}). | |
| gitlab_issues | No | Linked GitLab issues; always a list. | |
| github_pull_requests | No | Linked GitHub pull requests; always a list. | |
| gitlab_merge_requests | No | Linked GitLab merge requests; always a list. |