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

feat(api): add support for events scope parameter #2561

Merged

Conversation

weber-s
Copy link
Contributor

@weber-s weber-s commented May 2, 2023

Changes

Add support for the scope parameter in api: "/events?scope=all" that is implemented by https://gitlab.com/gitlab-org/gitlab/-/merge_requests/19816

ex: retrieve all dashboard activity for a given user:

i_t = user.impersonationtokens.create({"name": token_name, 'scopes': ["api"]})
user_gl = gitlab.Gitlab(<url>, private_token=i_t.token)
events = user_gl.events.list(scope="all")
i_t.delete()

Documentation and testing

No other params are documented more than the method signature. So automodule should generate it.

@nejch
Copy link
Member

nejch commented May 2, 2023

Thanks @weber-s for the contribution! The failure is unrelated to your PR.

We need a tiny fix for 3.12 so we'll just get a fix in for that and then rebase your PR to get green CI.

@nejch nejch force-pushed the add_support_api_events_scope_parameter branch from f4a226e to 4b04a9d Compare May 3, 2023 10:02
@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Merging #2561 (4b04a9d) into main (7be09e5) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2561   +/-   ##
=======================================
  Coverage   96.21%   96.21%           
=======================================
  Files          87       87           
  Lines        5700     5700           
=======================================
  Hits         5484     5484           
  Misses        216      216           
Flag Coverage Δ
api_func_v4 82.45% <100.00%> (ø)
cli_func_v4 83.10% <100.00%> (+0.05%) ⬆️
unit 87.87% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gitlab/v4/objects/events.py 98.94% <100.00%> (ø)

@nejch
Copy link
Member

nejch commented May 3, 2023

Thanks again @weber-s!

@nejch nejch merged commit 348f56e into python-gitlab:main May 3, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants