summaryrefslogtreecommitdiff
path: root/gitlab
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | 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
| | | |
* | | | test(objects): add tests for resource state eventsNejc Habjan2021-04-182-0/+115
| |/ / |/| |
* | | Merge pull request #1359 from klorenz/feat_token_lookupNejc Habjan2021-04-182-0/+79
|\ \ \ | | | | | | | | feat(config): allow using a credential helper to lookup tokens
| * | | chore(config): allow simple commands without external scriptKay-Uwe (Kiwi) Lorenz2021-04-181-6/+27
| | | |
| * | | chore: make lint happyKay-Uwe (Kiwi) Lorenz2021-03-071-1/+2
| | | |
| * | | fix: handling config value in _get_values_from_helperKay-Uwe (Kiwi) Lorenz2021-03-071-2/+4
| | | |
| * | | fix: let the homedir be expanded in path of helperKay-Uwe (Kiwi) Lorenz2021-03-071-1/+2
| | | |
| * | | chore: make lint happyKay-Uwe (Kiwi) Lorenz2021-03-071-6/+4
| | | |
| * | | chore: make lint happyKay-Uwe (Kiwi) Lorenz2021-03-071-13/+22
| | | |
| * | | fix: make secret helper more user friendlyKay-Uwe (Kiwi) Lorenz2021-03-072-20/+41
| | | |
| * | | fix: linting issues and testKay-Uwe (Kiwi) Lorenz2021-03-061-0/+4
| | | |
| * | | chore: add testKay-Uwe (Kiwi) Lorenz2021-03-061-0/+11
| | | |
| * | | feat: option to add a helper to lookup tokenKay-Uwe (Kiwi) Lorenz2021-03-061-0/+11
| | | |
* | | | Merge pull request #1375 from JohnVillalovos/jlvillal/update_uses_postNejc Habjan2021-04-172-2/+27
|\ \ \ \ | | | | | | | | | | chore: remove usage of getattr()
| * | | | chore: remove usage of getattr()John L. Villalovos2021-03-152-2/+27
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove usage of getattr(self, "_update_uses_post", False) Instead add it to class and set default value to False. Add a tests that shows it is set to True for the ProjectMergeRequestApprovalManager and ProjectApprovalManager classes.
* | | | Merge pull request #1366 from JohnVillalovos/jlvillal/create_attrsNejc Habjan2021-04-1745-286/+362
|\ \ \ \ | |_|_|/ |/| | | chore: have _create_attrs & _update_attrs be a namedtuple
| * | | chore: have _create_attrs & _update_attrs be a namedtupleJohn L. Villalovos2021-04-1745-286/+362
| | | | | | | | | | | | | | | | | | | | | | | | 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-246-25/+98
|\ \ \ \ | |_|/ / |/| | | Feat: cover all audit events
| * | | feat(objects): add support for group audit events APIfeat/all-audit-eventsNejc Habjan2021-03-074-8/+67
| | | |
| * | | test(objects): add unit test for instance audit eventsNejc Habjan2021-03-071-5/+18
| | | |
| * | | 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-142-3/+82
|\ \ \ \ | |_|/ / |/| | | feat: add support for Project Package Files
| * | | chore: fix package file test namingNejc Habjan2021-03-141-1/+1
| | | |
| * | | feat: add ProjectPackageFileJacob Henner2021-03-102-3/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ProjectPackageFile and the ability to list project package package_files. Fixes #1372
* | | | chore: add _create_attrs & _update_attrs to RESTManagerJohn L. Villalovos2021-03-104-91/+22
|/ / / | | | | | | | | | | | | | | | | | | 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-072-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-073-14/+12
|/ / | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #1336 from em-/fix/quote-everythingNejc Habjan2021-03-072-3/+11
|\ \ | | | | | | fix: handle tags like debian/2%2.6-21 as identifiers
| * | fix: handle tags like debian/2%2.6-21 as identifiersEmanuele Aina2021-03-052-3/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git refnames are relatively free-form and can contain all sort for special characters, not just `/` and `#`, see http://git-scm.com/docs/git-check-ref-format In particular, Debian's DEP-14 standard for storing packaging in git repositories mandates the use of the `%` character in tags in some cases like `debian/2%2.6-21`. Unfortunately python-gitlab currently only escapes `/` to `%2F` and in some cases `#` to `%23`. This means that when using the commit API to retrieve information about the `debian/2%2.6-21` tag only the slash is escaped before being inserted in the URL path and the `%` is left untouched, resulting in something like `/api/v4/projects/123/repository/commits/debian%2F2%2.6-21`. When urllib3 seees that it detects the invalid `%` escape and then urlencodes the whole string, resulting in `/api/v4/projects/123/repository/commits/debian%252F2%252.6-21`, where the original `/` got escaped twice and produced `%252F`. To avoid the issue, fully urlencode identifiers and parameters to avoid the urllib3 auto-escaping in all cases. Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
* | chore: add type-hints for gitlab/mixins.pyJohn L. Villalovos2021-03-061-57/+313
| | | | | | | | | | | | | | * Added type-hints for gitlab/mixins.py * Changed use of filter with a lambda expression to list-comprehension. mypy was not able to understand the previous code. Also list-comprehension is better :)
* | Merge pull request #1353 from JohnVillalovos/jlvillal/mypy_baseNejc Habjan2021-03-061-0/+5
|\ \ | | | | | | chore: add type hints to gitlab/base.py:RESTManager
| * | chore: add type hints to gitlab/base.py:RESTManagerJohn L. Villalovos2021-03-011-0/+5
| |/ | | | | | | Add some additional type hints to gitlab/base.py
* | Merge pull request #1350 from JohnVillalovos/jlvillal/isinstanceNejc Habjan2021-03-061-8/+15
|\ \ | |/ |/| chore: Put assert statements inside 'if TYPE_CHECKING:'
| * chore: put assert statements inside 'if TYPE_CHECKING:'John L. Villalovos2021-03-021-8/+15
| | | | | | | | | | | | | | | | | | | | | | To be safe that we don't assert while running, put the assert statements, which are used by mypy to check that types are correct, inside an 'if TYPE_CHECKING:' block. Also, instead of asserting that the item is a dict, instead assert that it is not a requests.Response object. Theoretically the JSON could return as a list or dict, though at this time we are assuming a dict.
* | 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: disallow incomplete type defsJohn L. Villalovos2021-02-284-31/+41
| | | | | | | | | | Don't allow a partially annotated function definition. Either none of the function is annotated or all of it must be. Update code to ensure no-more partially annotated functions. Update gitlab/cli.py with better type-hints. Changed Tuple[Any, ...] to Tuple[str, ...]
* Merge pull request #1347 from python-gitlab/chore/split-repository-methodsMax Wittig2021-02-282-197/+208
|\ | | | | chore(api): move repository endpoints into separate module
| * chore(api): move repository endpoints into separate modulechore/split-repository-methodsNejc Habjan2021-02-282-197/+208
| |
* | Merge pull request #1343 from JohnVillalovos/jlvillal/mypy_testing_thingsNejc Habjan2021-02-281-4/+6
|\ \ | | | | | | chore: add and fix some type-hints in gitlab/client.py
| * | chore: add and fix some type-hints in gitlab/client.pyJohn L. Villalovos2021-02-271-4/+6
| | | | | | | | | | | | Was able to figure out better type-hints for gitlab/client.py
* | | Merge pull request #1345 from JohnVillalovos/jlvillal/mypy_base_fixesNejc Habjan2021-02-281-1/+7
|\ \ \ | |_|/ |/| | chore: add additional type-hints for gitlab/base.py
| * | chore: add additional type-hints for gitlab/base.pyJohn L. Villalovos2021-02-271-1/+7
| |/ | | | | | | | | | | | | Add type-hints for the variables which are set via self.__dict__ mypy doesn't see them when they are assigned via self.__dict__. So declare them in the class definition.
* | Merge pull request #1333 from python-gitlab/feat/user-follow-apiNejc Habjan2021-02-283-0/+138
|\ \ | |/ |/| feat(users): add follow/unfollow API
| * feat(users): add follow/unfollow APIfeat/user-follow-apiMax Wittig2021-02-273-0/+138
| |
* | Merge pull request #1339 from JohnVillalovos/jlvillal/mypy_client_pyMax Wittig2021-02-272-79/+141
|\ \ | | | | | | chore: add type-hints to gitlab/client.py
| * | chore: add type-hints to gitlab/client.pyJohn L. Villalovos2021-02-262-79/+141
| | | | | | | | | | | | Adding some initial type-hints to gitlab/client.py