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 org assign on login #4817

Merged
merged 11 commits into from
Feb 16, 2025
Merged

Fix org assign on login #4817

merged 11 commits into from
Feb 16, 2025

Conversation

anbraten
Copy link
Member

@anbraten anbraten commented Feb 7, 2025

Changes

  • fix error when assigning org to user (the wrong error was handled)
  • enhance log messages

@woodpecker-bot
Copy link
Contributor

woodpecker-bot commented Feb 7, 2025

Deployment of preview was torn down

@anbraten anbraten added the bug Something isn't working label Feb 7, 2025
@anbraten anbraten requested a review from a team February 7, 2025 08:26
@xoxys
Copy link
Member

xoxys commented Feb 7, 2025

Will you take care of reverting the changes in #4762 as well?

@anbraten
Copy link
Member Author

anbraten commented Feb 7, 2025

Will merge main afterwards into #4762

Copy link

codecov bot commented Feb 8, 2025

Codecov Report

Attention: Patch coverage is 30.00000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 28.28%. Comparing base (b78427e) to head (6cf190d).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
server/api/login.go 22.22% 13 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4817      +/-   ##
==========================================
- Coverage   28.29%   28.28%   -0.02%     
==========================================
  Files         398      398              
  Lines       28301    28303       +2     
==========================================
- Hits         8008     8005       -3     
- Misses      19583    19588       +5     
  Partials      710      710              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@qwerty287 qwerty287 left a comment

Choose a reason for hiding this comment

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

I'd still rather have it done now already but if you don't want I also can't change it. Will block #4762 then though until that's resolved.

@anbraten
Copy link
Member Author

Ahh, didn't got your point. If you think it fits better in here I can add the store query using Forge-id and org-name.

@qwerty287 qwerty287 requested a review from a team February 14, 2025 07:18
@anbraten
Copy link
Member Author

lgtm now

@qwerty287
Copy link
Contributor

@anbraten can you fix https://ci.woodpecker-ci.org/repos/3780/pipeline/25527/37#L6?

If I fix it I can't approve the PR again and you can't either

@qwerty287 qwerty287 merged commit 45a92cd into main Feb 16, 2025
6 of 7 checks passed
@qwerty287 qwerty287 deleted the fix/login-org-assign branch February 16, 2025 10:02
@woodpecker-bot woodpecker-bot mentioned this pull request Feb 16, 2025
1 task
@anbraten
Copy link
Member Author

anbraten commented Feb 16, 2025

Should we add the forgeId for queries to the repo lookup by name as well?

repo, err = _store.GetRepoName(fullName)

repo, err = _store.GetRepoName(c.Param("repo_id_or_owner") + "/" + c.Param("repo_name"))

@qwerty287
Copy link
Contributor

Yes, I think so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants