feat(users): implement 'skip_confirmation' in users 'emails' creation by AdrianDC · Pull Request #3265 · python-gitlab/python-gitlab
Repository navigation
feat(users): implement 'skip_confirmation' in users 'emails' creation - #3265
Merged
JohnVillalovos merged 1 commit into python-gitlab:main from AdrianDC:users-create-withoutconfirmation Oct 17, 2025
Merged
feat(users): implement 'skip_confirmation' in users 'emails' creation #3265 JohnVillalovos merged 1 commit into python-gitlab:main from AdrianDC:users-create-withoutconfirmation
Conversation
AdrianDC commented Sep 21, 2025
Copy link Copy Markdown
Contributor
Changes
- Implement missing argument in user-email creation : https://docs.gitlab.com/api/user_email_addresses/#add-an-email-address-for-a-user
Documentation and testing
Please consider whether this PR needs documentation and tests. This is not required , but highly appreciated:
- Documentation in the matching docs section
- Unit tests and/or functional tests
- Documentation automatically generated and new key matches admins sources
- No test added as most other settings are not implemented in tests/functional/cli/test_cli_v4.py
AdrianDC commented Sep 21, 2025 · edited Loading
Copy link Copy Markdown
Contributor
Author
|
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}"
fi
For 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
September 21, 2025 16:41 AdrianDC mentioned this pull request Sep 21, 2025 ci(gitlab-ci): create 'codestyle' job for GitLab CI/CD and local usage #3266 Draft 2 tasks
feat(users): implement 'skip_confirmation' in users 'emails' creation
c7dc968
Signed-off-by: Adrian DC <radian.dc@gmail.com>JohnVillalovos force-pushed the users-create-withoutconfirmation branch from
9462342 to
c7dc968
Compare
October 17, 2025 16:16 JohnVillalovos requested a review from Copilot October 17, 2025 16:16 Copilot PR reviewer Copilot
AI
reviewed Oct 17, 2025
View reviewed changes
Copilot
AI
left a comment
Copy link Copy Markdown
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 approved these changes Oct 17, 2025View reviewed changes
JohnVillalovos left a comment
Copy link Copy Markdown
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
LGTM
Thanks @AdrianDC
JohnVillalovos enabled auto-merge (rebase) October 17, 2025 16:18 JohnVillalovos merged commit2981730
into
python-gitlab : main
Oct 17, 2025
codecov
Bot
commented
Oct 17, 2025
·
edited
Loading
Copy link Copy Markdown
Codecov Report✅ All modified and coverable lines are covered by tests. @@ 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.
|