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

Fix organization field being null in GET /api/v1/teams/{id} (#24694) #24696

Merged
merged 2 commits into from
May 13, 2023

Conversation

GiteaBot
Copy link
Contributor

Backport #24694 by @yardenshoham

Enabled the organization loading flag.

Before

{
  ...
  "description": "",
  "organization": null,
  "includes_all_repositories": true,
  "permission": "owner",
  ...
}

After

{
  ...
  "description": "",
  "organization": {
    "id": 2,
    "name": "bigorg",
    "full_name": "",
    "avatar_url": "https://3000-yardenshoham-gitea-3gfrlc9gn4h.ws-us96b.gitpod.io/avatars/e2649b0c016d9102664a7d4349503eb9",
    "description": "",
    "website": "",
    "location": "",
    "visibility": "public",
    "repo_admin_change_team_access": true,
    "username": "bigorg"
  },
  "includes_all_repositories": true,
  "permission": "owner",
  ...
}

…-gitea#24694)

Enabled the organization loading flag.

- Fixes go-gitea#20399 

# Before
```json
{
  ...
  "description": "",
  "organization": null,
  "includes_all_repositories": true,
  "permission": "owner",
  ...
}
```

# After
```json
{
  ...
  "description": "",
  "organization": {
    "id": 2,
    "name": "bigorg",
    "full_name": "",
    "avatar_url": "https://3000-yardenshoham-gitea-3gfrlc9gn4h.ws-us96b.gitpod.io/avatars/e2649b0c016d9102664a7d4349503eb9",
    "description": "",
    "website": "",
    "location": "",
    "visibility": "public",
    "repo_admin_change_team_access": true,
    "username": "bigorg"
  },
  "includes_all_repositories": true,
  "permission": "owner",
  ...
}
```

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
@GiteaBot GiteaBot added modifies/api This PR adds API routes or modifies them type/bug labels May 13, 2023
@GiteaBot GiteaBot added this to the 1.19.4 milestone May 13, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 13, 2023
@GiteaBot GiteaBot requested review from delvh and lunny May 13, 2023 14:48
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 13, 2023
@GiteaBot GiteaBot requested a review from silverwind May 13, 2023 14:48
@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 13, 2023
@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 13, 2023
Copy link
Member

@lunny lunny left a comment

Choose a reason for hiding this comment

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

wait a minute. I will add a test for that.

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels May 13, 2023
@lunny
Copy link
Member

lunny commented May 13, 2023

see #24699 24699

@yardenshoham
Copy link
Member

We have to merge the fix before we backport the test...

@yardenshoham yardenshoham requested a review from lunny May 13, 2023 15:41
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged labels May 13, 2023
@lunny
Copy link
Member

lunny commented May 13, 2023

We have to merge the fix before we backport the test...

How about cherry pick that PR to this one?

@yardenshoham
Copy link
Member

Sure, but I don't have push access

@yardenshoham
Copy link
Member

It's fine to do it separately, merge it one-by-one

@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 13, 2023
@silverwind silverwind merged commit da1c38d into go-gitea:release/v1.19 May 13, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 13, 2023
Codeberg-org pushed a commit to Codeberg-org/gitea that referenced this pull request Jun 3, 2023
…-gitea#24694) (go-gitea#24696)

Backport go-gitea#24694 by @yardenshoham

Enabled the organization loading flag.

- Fixes go-gitea#20399

# Before
```json
{
  ...
  "description": "",
  "organization": null,
  "includes_all_repositories": true,
  "permission": "owner",
  ...
}
```

# After
```json
{
  ...
  "description": "",
  "organization": {
    "id": 2,
    "name": "bigorg",
    "full_name": "",
    "avatar_url": "https://3000-yardenshoham-gitea-3gfrlc9gn4h.ws-us96b.gitpod.io/avatars/e2649b0c016d9102664a7d4349503eb9",
    "description": "",
    "website": "",
    "location": "",
    "visibility": "public",
    "repo_admin_change_team_access": true,
    "username": "bigorg"
  },
  "includes_all_repositories": true,
  "permission": "owner",
  ...
}
```

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
(cherry picked from commit da1c38d)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 11, 2023
@techknowlogick techknowlogick deleted the backport-24694-v1.19 branch September 9, 2023 05:29
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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants