summaryrefslogtreecommitdiff
path: root/gitlab/v4
Commit message (Collapse)AuthorAgeFilesLines
...
| * fix: correct ProjectFile.decode() documentationJohn L. Villalovos2021-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ProjectFile.decode() returns 'bytes' and not 'str'. Update the method's doc-string and add a type-hint. ProjectFile.decode() returns the result of a call to base64.b64decode() The docs for that function state it returns 'bytes': https://docs.python.org/3/library/base64.html#base64.b64decode Fixes: #1403
* | Merge pull request #1397 from JohnVillalovos/jlvillal/flake8Max Wittig2021-04-2317-88/+84
|\ \ | |/ |/| Fix all issues reported by running: tox -e pep8 and enable pep8 as a linter check
| * chore: fix F841 errors reported by flake8John L. Villalovos2021-04-181-1/+1
| | | | | | | | | | | | Local variable name is assigned to but never used https://www.flake8rules.com/rules/F841.html
| * chore: fix F401 errors reported by flake8John L. Villalovos2021-04-1816-87/+83
| | | | | | | | | | | | F401: Module imported but unused https://www.flake8rules.com/rules/F401.html
* | fix: argument type was not a tuple as expectedJohn L. Villalovos2021-04-181-1/+1
| | | | | | | | | | | | While adding type-hints mypy flagged this as an issue. The third argument to register_custom_action is supposed to be a tuple. It was being passed as a string rather than a tuple of strings.
* | chore: fix typo in mr eventsfeat/resource-state-eventsNejc Habjan2021-04-181-4/+2
| |
* | feat(objects): add support for resource state events APINejc Habjan2021-04-183-0/+30
|/
* Merge pull request #1366 from JohnVillalovos/jlvillal/create_attrsNejc Habjan2021-04-1742-270/+328
|\ | | | | chore: have _create_attrs & _update_attrs be a namedtuple
| * chore: have _create_attrs & _update_attrs be a namedtupleJohn L. Villalovos2021-04-1742-270/+328
| | | | | | | | | | | | Convert _create_attrs and _update_attrs to use a NamedTuple (RequiredOptional) to help with code readability. Update all code to use the NamedTuple.
* | Merge pull request #1363 from python-gitlab/feat/all-audit-eventsMax Wittig2021-03-245-18/+61
|\ \ | | | | | | Feat: cover all audit events
| * | feat(objects): add support for group audit events APIfeat/all-audit-eventsNejc Habjan2021-03-073-5/+47
| | |
| * | chore: import audit events in objectsNejc Habjan2021-03-071-0/+1
| | |
| * | fix(objects): add single get endpoint for instance audit eventsNejc Habjan2021-03-071-1/+1
| | |
| * | refactor(objects): move instance audit events where they belongNejc Habjan2021-03-072-13/+13
| | |
* | | Merge pull request #1373 from JacobHenner/jacobhenner/add-package_filesNejc Habjan2021-03-141-2/+13
|\ \ \ | |_|/ |/| | feat: add support for Project Package Files
| * | feat: add ProjectPackageFileJacob Henner2021-03-101-2/+13
| | | | | | | | | | | | | | | | | | | | | Add ProjectPackageFile and the ability to list project package package_files. Fixes #1372
* | | chore: add _create_attrs & _update_attrs to RESTManagerJohn L. Villalovos2021-03-101-23/+12
|/ / | | | | | | | | | | | | Add the attributes: _create_attrs and _update_attrs to the RESTManager class. This is so that we stop using getattr() if we don't need to. This also helps with type-hints being available for these attributes.
* | fix: checking if RESTManager._from_parent_attrs is setJohn L. Villalovos2021-03-071-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | Prior to commit 3727cbd21fc40b312573ca8da56e0f6cf9577d08 RESTManager._from_parent_attrs did not exist unless it was explicitly set. But commit 3727cbd21fc40b312573ca8da56e0f6cf9577d08 set it to a default value of {}. So the checks using hasattr() were no longer valid. Update the checks to check if RESTManager._from_parent_attrs has a value.
* | chore: make _types always present in RESTManagerJohn L. Villalovos2021-03-071-3/+2
|/ | | | | | | | | | We now create _types = {} in RESTManager class. By making _types always present in RESTManager it makes the code simpler. We no longer have to do: types = getattr(self, "_types", {}) And the type checker now understands the type.
* chore: del 'import *' in gitlab/v4/objects/project_access_tokens.pyJohn L. Villalovos2021-03-011-2/+2
| | | | | Remove usage of 'import *' in gitlab/v4/objects/project_access_tokens.py.
* chore(api): move repository endpoints into separate modulechore/split-repository-methodsNejc Habjan2021-02-282-197/+208
|
* Merge pull request #1333 from python-gitlab/feat/user-follow-apiNejc Habjan2021-02-281-0/+50
|\ | | | | feat(users): add follow/unfollow API
| * feat(users): add follow/unfollow APIfeat/user-follow-apiMax Wittig2021-02-271-0/+50
| |
* | fix: remove duplicate class definitions in v4/objects/users.pyJohn L. Villalovos2021-02-251-12/+0
| | | | | | | | | | The classes UserStatus and UserStatusManager were each declared twice. Remove the duplicate declarations.
* | Merge pull request #1319 from JohnVillalovos/jlvillal/import_starNejc Habjan2021-02-2557-114/+244
|\ \ | |/ |/| chore: remove usage of 'from ... import *'
| * chore: remove usage of 'from ... import *'John L. Villalovos2021-02-2357-114/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In gitlab/v4/objects/*.py remove usage of: * from gitlab.base import * * from gitlab.mixins import * Change them to: * from gitlab.base import CLASS_NAME * from gitlab.mixins import CLASS_NAME Programmatically update code to explicitly import needed classes only. After the change the output of: $ flake8 gitlab/v4/objects/*py | grep 'REST\|Mixin' Is empty. Before many messages about unable to determine if it was a valid name.
* | feat(projects): add project access token apiMax Wittig2021-02-242-0/+20
|/
* fix: undefined name errorsJohn L. Villalovos2021-02-232-4/+8
| | | | Discovered that there were some undefined names.
* chore(objects): make Project refreshableNejc Habjan2021-02-211-1/+1
| | | | Helps getting the real state of the project from the server.
* feat(objects): add Release Links API supportNejc Habjan2021-02-214-14/+39
|
* feat: add project audit endpointClayton Walker2021-02-192-0/+25
|
* feat: add personal access token APIfeat/personal-access-token-apiMax Wittig2021-02-172-0/+19
| | | | See: https://docs.gitlab.com/ee/api/personal_access_tokens.html
* fix: honor parameter value passedJonathan Vogt2021-02-151-2/+2
| | | | | | Gitlab allows setting the defaults for MR to delete the source. Also the inline help of the CLI suggest that a boolean is expected, but no matter what value you set, it will always delete.
* refactor(api): explicitly export classes for star importsrefactor/split-objectsNejc Habjan2021-02-0754-9/+525
|
* refactor(v4): split objects and managers per API resourceNejc Habjan2021-02-0754-5850/+6167
|
* feat(issues): add missing get verb to IssueManagerfeat/single-issue-apiNejc Habjan2021-02-061-1/+1
|
* feat: import from bitbucket serverDan Fuchs2021-02-041-3/+91
| | | | | | | | | | | | | I'd like to use this libary to automate importing Bitbucket Server repositories into GitLab. There is a [GitLab API endpoint](https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server) to do this, but it is not exposed through this library. * Add an `import_bitbucket_server` method to the `ProjectManager`. This method calls this GitLab API endpoint: https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server * Modify `import_gitlab` method docstring for python3 compatibility * Add a skipped stub test for the existing `import_github` method
* feat: support multipart uploadsfeat/multipart-uploadsMax Wittig2021-01-281-3/+3
|
* fix(api): use RetrieveMixin for ProjectLabelManagerMarvin Scholz2021-01-101-1/+1
| | | | | Allows to get a single label from a project, which was missing before even though the GitLab API has the ability to.
* Merge pull request #1200 from ↵Max Wittig2020-10-291-8/+89
|\ | | | | | | | | robinson96/feature/project_merge_request_approval_rules Feature/project merge request approval rules
| * test: add test_project_merge_request_approvals.pyPeter B. Robinson2020-10-141-2/+2
| |
| * feat: adds support for project merge request approval rules (#1199)Peter B. Robinson2020-09-301-8/+89
| |
* | fix(cli): write binary data to stdout bufferNejc Habjan2020-10-121-0/+2
| |
* | chore(cli): remove python2 codeNejc Habjan2020-10-121-5/+1
| |
* | Merge pull request #1203 from intostern/feat/bridgeMax Wittig2020-10-081-0/+12
|\ \ | | | | | | Added support for pipeline bridges
| * | feat: added support for pipeline bridgesAlex Zirka2020-10-071-0/+12
| |/
* | fix(cli): add missing args for project listsfix/cli-project-list-argsNejc Habjan2020-10-081-7/+17
|/
* fix(api): add missing runner access_level paramfix/runner-access-levelNejc Habjan2020-09-101-0/+1
|
* Merge pull request #1182 from jlpospisil/allow-mr-search-by-wipNejc Habjan2020-09-091-0/+3
|\ | | | | Added MR wip filter param
| * feat(api): added wip filter param for merge requestsJosh Pospisil2020-09-091-0/+1
| |