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

Fixes #7023 - API Org Visibility #7028

Merged
merged 16 commits into from
May 30, 2019

Conversation

richmahn
Copy link
Contributor

@richmahn richmahn commented May 24, 2019

Fixes #7023

Makes sure we are handling visibility when creating and editing orgs as strings. Can be "public", "limited" or "private". Isn't required so if visibility isn't set (empty string) when creating it will be public and when editing it will remain the same.

Update: Did a little clean up of swagger comments and properties for repo Create and Update file endpoints as well since didn't know that comments could be put in the struct and seen by clicking "Model" on the swagger page until recently.

@techknowlogick techknowlogick added modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality labels May 24, 2019
@techknowlogick techknowlogick added this to the 1.9.0 milestone May 24, 2019
routers/api/v1/org/org.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 24, 2019
@codecov-io
Copy link

codecov-io commented May 24, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #7028   +/-   ##
=========================================
  Coverage          ?   41.73%           
=========================================
  Files             ?      443           
  Lines             ?    60159           
  Branches          ?        0           
=========================================
  Hits              ?    25105           
  Misses            ?    31777           
  Partials          ?     3277
Impacted Files Coverage Δ
routers/api/v1/admin/org.go 53.16% <100%> (ø)
routers/api/v1/convert/convert.go 81.42% <100%> (ø)
routers/api/v1/repo/file.go 68.19% <100%> (ø)
routers/api/v1/org/org.go 70.73% <81.81%> (ø)
modules/structs/org_type.go 94.11% <83.33%> (ø)

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 d95caf5...7098cd5. Read the comment docs.

modules/structs/org_type.go Outdated Show resolved Hide resolved
routers/api/v1/convert/convert.go Outdated Show resolved Hide resolved
modules/structs/org_type.go Outdated Show resolved Hide resolved
modules/structs/org_type.go Show resolved Hide resolved
Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

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

Last two nits from me. The description field should describe the body in total but in any case I think it has to be in the referenced schema when there is a reference like that. (I could be wrong - if you want to keep a description just check what other bits do.)

templates/swagger/v1_json.tmpl Outdated Show resolved Hide resolved
templates/swagger/v1_json.tmpl Outdated Show resolved Hide resolved
@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 May 26, 2019
modules/structs/org.go Show resolved Hide resolved
@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 May 30, 2019
@techknowlogick techknowlogick merged commit 43cf2f3 into go-gitea:master May 30, 2019
jeffliu27 pushed a commit to jeffliu27/gitea that referenced this pull request Jul 18, 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. modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set organisation visibility from API
8 participants