Skip to content
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

New Issue ?body= query #5851

Merged
merged 5 commits into from
Jan 28, 2019
Merged

Conversation

KatieFrogs
Copy link
Contributor

Like with mailto email links, Github allows filling the body of the issue with the "body" query string in the URL, you can see it here:
https://github.com/LoveEevee/gitea/issues/new?body=This+is+an+example
This is particularly useful to make a link in an application and include a bug reporting button, which pre-fills the issue with a specific template, but also with some debug information that the software author wants to be included with the bug.
This PR implements an optional "body" that may be included with the URL when creating a new issue in a repository.

@codecov-io
Copy link

codecov-io commented Jan 25, 2019

Codecov Report

Merging #5851 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5851      +/-   ##
==========================================
+ Coverage   37.83%   37.85%   +0.01%     
==========================================
  Files         328      328              
  Lines       48326    48328       +2     
==========================================
+ Hits        18285    18294       +9     
+ Misses      27408    27401       -7     
  Partials     2633     2633
Impacted Files Coverage Δ
routers/repo/issue.go 36.69% <100%> (+0.11%) ⬆️
models/repo_list.go 63.29% <0%> (-1.27%) ⬇️
routers/repo/view.go 47.3% <0%> (+1.19%) ⬆️
modules/process/manager.go 81.15% <0%> (+4.34%) ⬆️
models/unit.go 14.28% <0%> (+14.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7461c5a...a55330e. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 25, 2019
@techknowlogick techknowlogick added the type/enhancement An improvement of existing functionality label Jan 25, 2019
@kolaente
Copy link
Member

kolaente commented Jan 26, 2019

Can we put this in the docs?
I'd propose to put a sentence about this in https://docs.gitea.io/en-us/issue-pull-request-templates/

@techknowlogick techknowlogick added this to the 1.8.0 milestone Jan 26, 2019
@KatieFrogs
Copy link
Contributor Author

@kolaente I have updated the documentation, thanks for the suggestion.

@@ -39,3 +39,6 @@ Possible file names for PR templates:
* .gitea/pull_request_template.md
* .github/PULL_REQUEST_TEMPLATE.md
* .github/pull_request_template.md


Additionally, the New Issue page URL can be suffixed with `?body=Issue+Text` and the form will be populated with that string. This string will be used instead of the template if there is one.
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this also work for pull requests? If so, you should mention that 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does not, this PR adds supports only for new issues. Implementing this to new pull requests makes little sense to me, as the developer also has to know which branches the user needs to compare in advance.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense, thanks for clarifying!

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 28, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 28, 2019
@techknowlogick techknowlogick merged commit 3568d42 into go-gitea:master Jan 28, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants