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 issue subscription check to API #10967

Merged
merged 32 commits into from
Apr 21, 2020

Conversation

6543
Copy link
Member

@6543 6543 commented Apr 5, 2020

close #10962

GET ​/repos​/{owner}​/{repo}​/issues​/{index}​/subscriptions​/check

-> return a WatchInfo

Info

  • added smal refactor c7ad54c witch isn't worth its own pr

ToDo

  • add check via api
  • write test

@6543 6543 force-pushed the api-IssueSubscription-check_10962 branch from bb430ed to e418b89 Compare April 5, 2020 01:15
@codecov-io
Copy link

codecov-io commented Apr 5, 2020

Codecov Report

Merging #10967 into master will increase coverage by 0.10%.
The diff coverage is 68.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10967      +/-   ##
==========================================
+ Coverage   43.44%   43.55%   +0.10%     
==========================================
  Files         600      600              
  Lines       85108    85172      +64     
==========================================
+ Hits        36978    37094     +116     
+ Misses      43562    43500      -62     
- Partials     4568     4578      +10     
Impacted Files Coverage Δ
routers/api/v1/user/watch.go 0.00% <0.00%> (ø)
models/issue.go 51.40% <33.33%> (-0.09%) ⬇️
models/issue_watch.go 69.73% <53.84%> (-3.28%) ⬇️
routers/api/v1/repo/issue_subscription.go 56.42% <78.84%> (+56.42%) ⬆️
routers/repo/issue.go 35.32% <80.00%> (-0.25%) ⬇️
routers/api/v1/api.go 76.53% <100.00%> (+0.03%) ⬆️
services/pull/patch.go 62.93% <0.00%> (-2.80%) ⬇️
services/pull/temp_repo.go 31.62% <0.00%> (-2.57%) ⬇️
services/pull/check.go 53.04% <0.00%> (-2.44%) ⬇️
modules/queue/unique_queue_disk_channel.go 53.84% <0.00%> (-1.93%) ⬇️
... and 2 more

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 16f39ce...c5e53e5. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 5, 2020
@guillep2k
Copy link
Member

guillep2k commented Apr 5, 2020

Isn't this getting too intrusive for the users?

🤦‍♂ I see, it's for clients that use a different interface.

@guillep2k guillep2k added modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Apr 5, 2020
@guillep2k guillep2k added this to the 1.12.0 milestone Apr 5, 2020
@6543
Copy link
Member Author

6543 commented Apr 5, 2020

It will help clients for gitea.

for example: https://gitea.com/gitnex/GitNex/pulls/203/files#issuecomment-110519

@6543
Copy link
Member Author

6543 commented Apr 5, 2020

@guillep2k -> 7c4f75d 🎉
it breaks somehow the api pattern but is eaven easy to use and can't leek data

@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 Apr 8, 2020
@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 Apr 17, 2020
@zeripath zeripath removed the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Apr 21, 2020
@zeripath zeripath merged commit bb4261a into go-gitea:master Apr 21, 2020
@zeripath zeripath changed the title [API] add issue subscription check Add issue subscription check to API Apr 21, 2020
@6543 6543 deleted the api-IssueSubscription-check_10962 branch April 21, 2020 15:08
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
close go-gitea#10962

Adds `GET /api/v1​/repos​/{owner}​/{repo}​/issues​/{index}​/subscriptions​/check`
 -> return a `WachInfo`
@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. modifies/api This PR adds API routes or modifies them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] [API] Check If user is subscribed to specific Issue
6 participants