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

Add HTML URL to API Issues #9654

Merged
merged 4 commits into from
Jan 8, 2020
Merged

Add HTML URL to API Issues #9654

merged 4 commits into from
Jan 8, 2020

Conversation

jolheiser
Copy link
Member

After the recent refactor, webhooks are sending URLs pointing to the API rather than the instance.

This PR adds the HTML URL to API Issues. API PRs already have the HTML URL, so I assumed it was okay to add to Issues as well.

Signed-off-by: jolheiser <[email protected]>
@codecov-io
Copy link

codecov-io commented Jan 8, 2020

Codecov Report

Merging #9654 into master will decrease coverage by 0.02%.
The diff coverage is 29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9654      +/-   ##
==========================================
- Coverage   42.19%   42.16%   -0.03%     
==========================================
  Files         583      583              
  Lines       77254    77360     +106     
==========================================
+ Hits        32594    32618      +24     
- Misses      40651    40728      +77     
- Partials     4009     4014       +5
Impacted Files Coverage Δ
models/issue_tracked_time.go 62.84% <100%> (+1.05%) ⬆️
routers/api/v1/api.go 73.96% <100%> (ø) ⬆️
routers/api/v1/repo/issue_tracked_time.go 39.56% <13.86%> (-5.7%) ⬇️
routers/api/v1/utils/utils.go 56% <70%> (+56%) ⬆️
modules/queue/workerpool.go 37.76% <0%> (-3.44%) ⬇️
services/pull/temp_repo.go 31.62% <0%> (-2.57%) ⬇️
modules/process/manager.go 78.31% <0%> (+3.61%) ⬆️
models/unit.go 67.56% <0%> (+5.4%) ⬆️

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 da8a942...948c2a9. 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 8, 2020
@guillep2k
Copy link
Member

Looks like the refactor introduced a breaking change. If that was not intentional, I'd rather add APIURL and use URL again for the HTML link.

@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 8, 2020
@lafriks
Copy link
Member

lafriks commented Jan 8, 2020

This is also consistent with what github returns

@jolheiser
Copy link
Member Author

Looks like the refactor introduced a breaking change. If that was not intentional, I'd rather add APIURL and use URL again for the HTML link.

This is consistent with how structs/pull.go does it as well.
Since the structs package is generally used by APIs, I think the thought is that URL refers to the APIs URL?

@lafriks lafriks added this to the 1.12.0 milestone Jan 8, 2020
@guillep2k
Copy link
Member

This is consistent with how structs/pull.go does it as well.
Since the structs package is generally used by APIs, I think the thought is that URL refers to the APIs URL?

No problem, I thought it could be a breaking change, that's all.

@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 8, 2020
@jolheiser
Copy link
Member Author

This will also need a backport FYI.

@zeripath zeripath merged commit 5b2d933 into go-gitea:master Jan 8, 2020
@jolheiser jolheiser deleted the webhook_url branch January 8, 2020 23:27
@jolheiser
Copy link
Member Author

Will backport in a bit.

jolheiser added a commit to jolheiser/gitea that referenced this pull request Jan 9, 2020
* Add HTML URL to API Issues

Signed-off-by: jolheiser <[email protected]>

* Swagger

Signed-off-by: jolheiser <[email protected]>

Co-authored-by: Lauris BH <[email protected]>
lafriks added a commit that referenced this pull request Jan 9, 2020
* Add HTML URL to API Issues

Signed-off-by: jolheiser <[email protected]>

* Swagger

Signed-off-by: jolheiser <[email protected]>

Co-authored-by: Lauris BH <[email protected]>

Co-authored-by: Lauris BH <[email protected]>
@zeripath zeripath added the backport/done All backports for this PR have been created label Jan 12, 2020
@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
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants