mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-09 03:20:34 +00:00
docs: document pre-filling issues and pull requests from query parameters (#592)
Describe the query parameters of the new issue and pull request pages, including those added in https://github.com/go-gitea/gitea/pull/39804. --------- Co-authored-by: Jakub Vrana <[email protected]> Reviewed-on: https://gitea.com/gitea/docs/pulls/592 Reviewed-by: wxiaoguang <[email protected]> Reviewed-by: bircni <[email protected]> Co-authored-by: Jakub Vrána <[email protected]>
This commit is contained in:
1 parent
b555a247e0
commit
db9e6f9f48
2 files changed
+43
-1
No files matched your search
@@ -15,7 +15,7 @@ creating issues and pull requests. This will cut down on the initial back and fo
|
|||||||
of getting some clarifying details.
|
of getting some clarifying details.
|
||||||
It is currently not possible to provide generic issue/pull-request templates globally.
|
It is currently not possible to provide generic issue/pull-request templates globally.
|
||||||
|
|
||||||
Additionally, the New Issue page URL can be suffixed with `?title=Issue+Title&body=Issue+Text` and the form will be populated with those strings. Those strings will be used instead of the template if there is one.
|
Additionally, the New Issue page URL can be suffixed with `?title=Issue+Title&body=Issue+Text` and the form will be populated with those strings. Those strings will be used instead of the template if there is one. See [Pre-filling Issues and Pull Requests](prefill-issues-pull-requests.md) for all parameters.
|
||||||
|
|
||||||
## File names
|
## File names
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
date: "2026-10-17T00:00:00+00:00"
|
||||||
|
slug: "prefill-issues-pull-requests"
|
||||||
|
sidebar_position: 14
|
||||||
|
---
|
||||||
|
|
||||||
|
# Pre-filling Issues and Pull Requests
|
||||||
|
|
||||||
|
Links to the pages for creating issues and pull requests can pre-fill the form with query parameters.
|
||||||
|
This lets you link users from another app, a README or a project board to a form that is already categorized.
|
||||||
|
|
||||||
|
- New issue: `/{owner}/{repo}/issues/new?…`
|
||||||
|
- New pull request: `/{owner}/{repo}/compare/{base}...{head}?…`
|
||||||
|
|
||||||
|
For example, this link opens a new issue with a title, two labels and an assignee:
|
||||||
|
|
||||||
|
```
|
||||||
|
https://gitea.example.com/owner/repo/issues/new?title=Dashboard+crashes&label=kind/bug,area/dashboard&assignee=alice
|
||||||
|
```
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
| Parameter | Value |
|
||||||
|
| ------------- | --------------------------------------------------------------------------- |
|
||||||
|
| `title` | Title |
|
||||||
|
| `body` | Description |
|
||||||
|
| `label` | Comma-separated label IDs or names |
|
||||||
|
| `labels` | Alias of `label` |
|
||||||
|
| `milestone` | Milestone ID or name |
|
||||||
|
| `project` | Comma-separated project IDs or titles |
|
||||||
|
| `assignee` | Comma-separated user IDs or usernames |
|
||||||
|
| `template` | File name of the [template](issue-pull-request-templates.md) to use |
|
||||||
|
| `field:<id>` | Value of the field with this `id` in a YAML template |
|
||||||
|
|
||||||
|
IDs and names can be mixed and names are matched case-insensitively. Values that don't match anything in the repository are ignored.
|
||||||
|
Labels include the organization's labels, and closed milestones and projects can be selected too.
|
||||||
|
Milestones and projects are only offered to users who can write to issues or pull requests, so for other users these parameters have no effect.
|
||||||
|
|
||||||
|
The values from the link take precedence over the title, description, labels and assignees of the template.
|
||||||
|
|
||||||
|
When there are several issue templates to choose from, the parameters are passed through to the chosen one.
|
||||||
|
On the compare page, any of these parameters also opens the pull request form directly, as `expand=1` does.
|
||||||
Reference in new issue
Block a user