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

Move sdk structs to modules/structs #6905

Merged
merged 6 commits into from May 11, 2019

Conversation

6 participants
@lunny
Copy link
Member

commented May 11, 2019

This PR will move all structs maintaining APIs needed from code.gitea.io/sdk-go to this main repository's sub package code.gitea.io/gitea/modules/structs. That will make maintaining APIs easier. When creating a new API for gitea, an extra PR to code.gitea.io/sdk-go will not be a necessary.

@lunny lunny added the kind/refactor label May 11, 2019

@lunny lunny added this to the 1.9.0 milestone May 11, 2019

@techknowlogick
Copy link
Member

left a comment

🎉 Thanks for PR :)

@techknowlogick

This comment has been minimized.

Copy link
Member

commented May 11, 2019

CI Fail

@techknowlogick

This comment has been minimized.

Copy link
Member

commented May 11, 2019

needs make fmt

lunny added some commits May 11, 2019

@techknowlogick

This comment has been minimized.

Copy link
Member

commented May 11, 2019

needs make vendor to cleanup vendor/modules.txt

@codecov-io

This comment has been minimized.

Copy link

commented May 11, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@1658cd0). Click here to learn what that means.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #6905   +/-   ##
=========================================
  Coverage          ?   41.39%           
=========================================
  Files             ?      436           
  Lines             ?    59618           
  Branches          ?        0           
=========================================
  Hits              ?    24678           
  Misses            ?    31700           
  Partials          ?     3240
Impacted Files Coverage Δ
routers/api/v1/org/hook.go 0% <ø> (ø)
routers/api/v1/org/member.go 12.13% <ø> (ø)
routers/api/v1/utils/hook.go 0% <ø> (ø)
models/attachment.go 52.05% <ø> (ø)
models/issue_tracked_time.go 67.56% <ø> (ø)
modules/structs/utils.go 0% <ø> (ø)
routers/api/v1/repo/file.go 68.19% <ø> (ø)
models/webhook_msteams.go 0% <ø> (ø)
routers/api/v1/repo/issue_comment.go 54.51% <ø> (ø)
models/lfs_lock.go 63.63% <ø> (ø)
... and 68 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 1658cd0...72046eb. Read the comment docs.

@zeripath

This comment has been minimized.

Copy link
Contributor

commented May 11, 2019

Hmm 2 things:

  • Would it actually be better to call modules/structs modules/api?
  • Is the SDK just going to import these from its code or will it keep its own copy?

@zeripath zeripath changed the title Move sdk structs to moduels/structs Move sdk structs to modules/structs May 11, 2019

@lunny

This comment has been minimized.

Copy link
Member Author

commented May 11, 2019

@zeripath
First, It only includes structs but not any codes we called API, so I don't think we should call it API.
Second, Yes, after this PR merged I will send another PR to code.gitea.io/sdk-go to remove all structs there and depend on this new package's specify version. That means you have to use go mod build code.gitea.io/sdk-go because code.gitea.io/gitea/modules/structs may have broken changes.

@zeripath

This comment has been minimized.

Copy link
Contributor

commented May 11, 2019

Ok.

@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels May 11, 2019

@lunny lunny merged commit 34eee25 into go-gitea:master May 11, 2019

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/drone/pr Build is passing
Details

@lunny lunny deleted the lunny:lunny/move_sdk_structs branch May 11, 2019

zeripath added a commit to zeripath/gitea that referenced this pull request May 11, 2019

Move sdk structs to modules/structs (go-gitea#6905)
* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
@lunny

This comment has been minimized.

Copy link
Member Author

commented May 11, 2019

Should fixed #5954

techknowlogick added a commit that referenced this pull request May 11, 2019

Remove local clones & make hooks run on merge/edit/upload (#6672)
* Add options to git.Clone to make it more capable

* Begin the process of removing the local copy and tidy up

* Remove Wiki LocalCopy Checkouts

* Remove the last LocalRepo helpers

* Remove WithTemporaryFile

* Enable push-hooks for these routes

* Ensure tests cope with hooks

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove Repository.LocalCopyPath()

* Move temporary repo to use the standard temporary path

* Fix the tests

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove LocalWikiPath

* Fix missing remove

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Use AppURL for Oauth user link (#6894)

* Use AppURL for Oauth user link

Fix #6843

* Update oauth.go

* Update oauth.go

* internal/ssh: ignore env command totally (#6825)

* ssh: ignore env command totally

* Remove commented code 

Needed fix described in issue #6889

* Escape the commit message on issues update and title in telegram hook (#6901)

* update sdk to latest (#6903)

* improve description of branch protection (fix #6886) (#6906)

The branch protection description text were not quite accurate.

* Fix logging documentation (#6904)

* ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG

* Allow DISABLE_ROUTER_LOG to be set in the [log] section

* [skip ci] Updated translations via Crowdin

* Move sdk structs to modules/structs (#6905)

* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.