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

Don't fail user creation if org exists #4687

Merged
merged 3 commits into from
Jan 10, 2025
Merged

Conversation

pat-s
Copy link
Contributor

@pat-s pat-s commented Jan 8, 2025

fix #4651

Also modified OrgFindByName to return nil if nothing is found instead of erroring with a SQL error.

@pat-s pat-s added bug Something isn't working server labels Jan 8, 2025
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 52.17391% with 11 lines in your changes missing coverage. Please review.

Project coverage is 28.18%. Comparing base (d022bf2) to head (ffcc47e).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
server/store/datastore/user.go 46.66% 6 Missing and 2 partials ⚠️
server/store/datastore/org.go 62.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4687   +/-   ##
=======================================
  Coverage   28.17%   28.18%           
=======================================
  Files         398      398           
  Lines       28231    28245   +14     
=======================================
+ Hits         7954     7960    +6     
- Misses      19571    19575    +4     
- Partials      706      710    +4     

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

@pat-s pat-s requested review from qwerty287 and lafriks January 10, 2025 09:29
@pat-s pat-s merged commit 628c0e8 into main Jan 10, 2025
9 checks passed
@pat-s pat-s deleted the fix/usercreate-existingorg branch January 10, 2025 17:12
@woodpecker-bot
Copy link
Contributor

@pat-s
Copy link
Contributor Author

pat-s commented Jan 10, 2025

💚 All backports created successfully

Status Branch Result
release/v2.8

Questions ?

Please refer to the Backport tool documentation

@pat-s pat-s added the backport-done indicates that this pull has been backported label Jan 10, 2025
pat-s added a commit to pat-s/woodpecker that referenced this pull request Jan 10, 2025
@woodpecker-bot woodpecker-bot mentioned this pull request Jan 11, 2025
1 task
@qwerty287 qwerty287 mentioned this pull request Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done indicates that this pull has been backported bug Something isn't working server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding users with the same name as an already existing organization fails
4 participants