-
Notifications
You must be signed in to change notification settings - Fork 674
feat(users): implement 'skip_confirmation' in users 'emails' creation #3265
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
feat(users): implement 'skip_confirmation' in users 'emails' creation #3265
Conversation
|
Tested working properly to add + confirm an email for a GitLab bot user using noreply secondary email address. For reference to manually patch older sources in CI/CD jobs, # Patch GitLab sources
- |
gitlab_bin=$(which gitlab | xargs readlink -f)
gitlab_venv="${gitlab_bin%/bin/*}"
gitlab_users=$(ls -1 "${gitlab_venv}/lib/python"*/*-packages/gitlab/v4/objects/users.py || true)
if ! grep -q ', "skip_confirmation", ' "${gitlab_users}"; then
sed -i 's/\("email"\),)/\1, "skip_confirmation", )/g' "${gitlab_users}"
fiFor self usage upon future PR, to run codestyle tasks from containers : docker run \
-v "${PWD}:${PWD}:rw" \
-w "${PWD}" \
--entrypoint 'sh' \
--rm \
'alpine:3' \
-c \
'apk add py3-tox && tox -e black,isort' |
805b8c9 to
9462342
Compare
Signed-off-by: Adrian DC <radian.dc@gmail.com>
9462342 to
c7dc968
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Implements support for the skip_confirmation parameter when creating user email addresses via the UserEmailManager, aligning with the GitLab API.
- Add skip_confirmation as an optional attribute to UserEmailManager._create_attrs
- Minor formatting change to multi-line RequiredOptional definition
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
JohnVillalovos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @AdrianDC
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3265 +/- ##
=======================================
Coverage 97.32% 97.32%
=======================================
Files 98 98
Lines 6052 6052
=======================================
Hits 5890 5890
Misses 162 162
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Changes
Documentation and testing
Please consider whether this PR needs documentation and tests. This is not required, but highly appreciated: