Skip to content

Support title and body query parameters for new PRs #34537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

endo0911engineer
Copy link

Currently, Gitea supports title and body query parameters when creating new issues, allowing pre-filling those fields via URL parameters. However, similar support for pull requests (PRs) does not exist.

This feature adds support for the title, body, and quick_pull query parameters in the new pull request creation page. These parameters work similarly to GitHub’s behavior, allowing users to pre-populate the PR title and body, and optionally expand the PR creation form automatically.

By supporting these query parameters, it improves the usability and automation capabilities when creating pull requests via direct URLs, aligning Gitea more closely with GitHub’s user experience.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 26, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label May 26, 2025
}
if expandNewPRForm || title != "" || body != "" {
ctx.Data["ExpandNewPrForm"] = true
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.

I think the logic could be moved to the line of ctx.Data["ExpandNewPrForm"] = ctx.FormBool("expand"), indeed ExpandNewPrForm was already controlled by "expand" query parameter, so it's good to put them together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants