summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/projects.py
Commit message (Collapse)AuthorAgeFilesLines
* fix: Use the ProjectIterationManager within the Project objectRyan Holleran2022-12-031-2/+2
| | | | | | | | The Project object was previously using the GroupIterationManager resulting in the incorrect API endpoint being used. Utilize the correct ProjectIterationManager instead. Resolves #2403
* refactor: explicitly use ProjectSecureFileNejc Habjan2022-11-171-2/+2
|
* feat: implement secure files APIBen Brown2022-11-101-0/+2
|
* feat(api): add support for getting a project's pull mirror detailsJohn L. Villalovos2022-11-041-0/+23
| | | | | | | Add the ability to get a project's pull mirror details. This was added in GitLab 15.5 and is a PREMIUM feature. https://docs.gitlab.com/ee/api/projects.html#get-a-projects-pull-mirror-details
* fix(cli): expose missing mr_default_target_self project attributeRomain Dartigues2022-11-031-0/+1
| | | | | | | | | | | | Example:: gitlab project update --id 616 --mr-default-target-self 1 References: * https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58093 * https://gitlab.com/gitlab-org/gitlab/-/blob/v13.11.0-ee/doc/user/project/merge_requests/creating_merge_requests.md#new-merge-request-from-a-fork * https://gitlab.com/gitlab-org/gitlab/-/blob/v14.7.0-ee/doc/api/projects.md#get-single-project
* feat(api): add support for remote project import from AWS S3 (#2357)Abhishek Singh2022-11-021-2/+64
|
* feat(api): add support for remote project import (#2348)Abhishek Singh2022-11-011-0/+45
|
* chore: enable mypy check `disallow_any_generics`John L. Villalovos2022-08-011-1/+1
|
* chore: change `_repr_attr` for Project to be `path_with_namespace`John L. Villalovos2022-07-291-1/+1
| | | | | | | Previously `_repr_attr` was `path` but that only gives the basename of the path. So https://gitlab.com/gitlab-org/gitlab would only show "gitlab". Using `path_with_namespace` it will now show "gitlab-org/gitlab"
* fix: support array types for most resourcesNejc Habjan2022-07-281-0/+3
|
* feat: add support for iterations APINejc Habjan2022-07-271-0/+2
|
* feat(groups): add support for shared projects APINejc Habjan2022-07-261-0/+25
|
* feat: add support for group and project invitations APINejc Habjan2022-07-231-0/+2
|
* feat(projects): add support for project restore APINejc Habjan2022-07-231-0/+15
|
* refactor: migrate services to integrationsNejc Habjan2022-07-231-1/+2
|
* feat: Add 'merge_pipelines_enabled' project attributeNick Brown2022-07-111-0/+2
| | | | | | | | Boolean. Enable or disable merge pipelines. See: https://docs.gitlab.com/ee/api/projects.html#edit-project https://docs.gitlab.com/ee/ci/pipelines/merged_results_pipelines.html
* feat(cli): add support for global CI lintNejc Habjan2022-07-051-4/+2
|
* refactor(objects): move ci lint to separate fileNejc Habjan2022-07-051-16/+1
|
* feat(objects): add Project CI Lint supportJohn L. Villalovos2022-07-041-0/+23
| | | | | | Add support for validating a project's CI configuration [1] [1] https://docs.gitlab.com/ee/api/lint.html
* refactor: avoid possible breaking change in iterator (#2107)John Villalovos2022-06-271-2/+5
| | | | | | | | Commit b6447211754e126f64e12fc735ad74fe557b7fb4 inadvertently introduced a possible breaking change as it added a new argument `iterator` and added it in between existing (potentially positional) arguments. This moves the `iterator` argument to the end of the argument list and requires it to be a keyword-only argument.
* test(pylint): enable pylint "unused-argument" checkJohn L. Villalovos2022-06-261-2/+2
| | | | | | | | | | Enable the pylint "unused-argument" check and resolve issues it found. * Quite a few functions were accepting `**kwargs` but not then passing them on through to the next level. Now pass `**kwargs` to next level. * Other functions had no reason to accept `**kwargs`, so remove it * And a few other fixes.
* feat(downloads): allow streaming downloads access to response iterator (#1956)Tom Catshoek2022-06-261-4/+21
| | | | | | | | | | | | | | | * feat(downloads): allow streaming downloads access to response iterator Allow access to the underlying response iterator when downloading in streaming mode by specifying `iterator=True`. Update type annotations to support this change. * docs(api-docs): add iterator example to artifact download Document the usage of the `iterator=True` option when downloading artifacts * test(packages): add tests for streaming downloads
* refactor: remove no-op id argument in GetWithoutIdMixinNejc Habjan2022-06-251-4/+2
|
* feat: Add support for Protected Environmentscalve2022-06-221-1/+5
| | | | | | | | - https://docs.gitlab.com/ee/api/protected_environments.html - https://github.com/python-gitlab/python-gitlab/issues/1130 no write operation are implemented yet as I have no use case right now and am not sure how it should be done
* chore: move `RequiredOptional` to the `gitlab.types` moduleJohn L. Villalovos2022-05-311-1/+2
| | | | | | By having `RequiredOptional` in the `gitlab.base` module it makes it difficult with circular imports. Move it to the `gitlab.types` module which has no dependencies on any other gitlab module.
* chore: update type-hints return signature for GetWithoutIdMixin methodsJohn L. Villalovos2022-05-301-2/+2
| | | | | | | Commit f0152dc3cc9a42aa4dc3c0014b4c29381e9b39d6 removed situation where `get()` in a `GetWithoutIdMixin` based class could return `None` Update the type-hints to no longer return `Optional` AKA `None`
* feat(objects): support get project storage endpointNejc Habjan2022-05-271-0/+19
|
* feat: display human-readable attribute in `repr()` if presentNejc Habjan2022-05-081-11/+1
|
* feat(ux): display project.name_with_namespace on project reprLaurent Peuch2022-04-291-0/+10
| | | | | | | | | | | | | | | This change the repr from: $ gitlab.projects.get(id=some_id) <Project id:some_id> To: $ gitlab.projects.get(id=some_id) <Project id:some_id name_with_namespace:"group_name / project_name"> This is especially useful when working on random projects or listing of projects since users generally don't remember projects ids.
* chore: create a custom `warnings.warn` wrapperJohn L. Villalovos2022-02-061-9/+12
| | | | | | | Create a custom `warnings.warn` wrapper that will walk the stack trace to find the first frame outside of the `gitlab/` path to print the warning against. This will make it easier for users to find where in their code the error is generated from
* feat(objects): add a complete artifacts managerNejc Habjan2022-02-011-81/+8
|
* chore: create new ArrayAttribute classJohn L. Villalovos2022-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Create a new ArrayAttribute class. This is to indicate types which are sent to the GitLab server as arrays https://docs.gitlab.com/ee/api/#array At this stage it is identical to the CommaSeparatedListAttribute class but will be used later to support the array types sent to GitLab. This is the second step in a series of steps of our goal to add full support for the GitLab API data types[1]: * array * hash * array of hashes Step one was: commit 5127b1594c00c7364e9af15e42d2e2f2d909449b [1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types Related: #1698
* chore: rename `types.ListAttribute` to `types.CommaSeparatedListAttribute`John L. Villalovos2022-01-221-2/+5
| | | | | | | | | | | This name more accurately describes what the type is. Also this is the first step in a series of steps of our goal to add full support for the GitLab API data types[1]: * array * hash * array of hashes [1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
* Merge pull request #1835 from python-gitlab/jlvillal/id_to_encodedidNejc Habjan2022-01-141-2/+2
|\ | | | | chore(objects): use `self.encoded_id` where could be a string
| * chore(objects): use `self.encoded_id` where could be a stringJohn L. Villalovos2022-01-131-2/+2
| | | | | | | | | | Updated a few remaining usages of `self.id` to use `self.encoded_id` where it could be a string value.
* | chore(projects): fix typing for transfer methodNejc Habjan2022-01-131-1/+1
| | | | | | Co-authored-by: John Villalovos <john@sodarock.com>
* | feat(api): add `project.transfer()` and deprecate `transfer_project()`Nejc Habjan2022-01-131-1/+11
|/
* fix: use url-encoded ID in all pathsJohn L. Villalovos2022-01-131-16/+16
| | | | | | | | | | | | Make sure all usage of the ID in the URL path is encoded. Normally it isn't an issue as most IDs are integers or strings which don't contain a slash ('/'). But when the ID is a string with a slash character it will break things. Add a test case that shows this fixes wikis issue with subpages which use the slash character. Closes: #1079
* feat: add support for `squash_option` in Projectsjlvillal/squash_optionJohn L. Villalovos2021-12-131-0/+2
| | | | | | | There is an optional `squash_option` parameter which can be used when creating Projects and UserProjects. Closes #1744
* chore: add initial pylint checkJohn L. Villalovos2021-12-071-5/+12
| | | | | | Initial pylint check is added. A LONG list of disabled checks is also added. In the future we should work through the list and resolve the errors or disable them on a more granular level.
* docs: use annotations for return typesdocs/sphinx-annotationsNejc Habjan2021-12-011-9/+9
|
* docs: only use type annotations for documentationNejc Habjan2021-11-281-46/+46
|
* feat: add support for `projects.groups.list()`jlvillal/project_groupsJohn L. Villalovos2021-11-261-0/+19
| | | | | | Add support for `projects.groups.list()` endpoint. Closes #1717
* refactor: use new-style formatting for named placeholdersNejc Habjan2021-11-081-3/+3
|
* refactor: use f-strings for string formattingNejc Habjan2021-11-051-33/+28
|
* feat(api): add merge trainsJacob Henner2021-10-201-0/+2
| | | | Add support for merge trains
* docs: fix a few typosTim Gates2021-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | There are small typos in: - docs/gl_objects/deploy_tokens.rst - gitlab/base.py - gitlab/mixins.py - gitlab/v4/objects/features.py - gitlab/v4/objects/groups.py - gitlab/v4/objects/packages.py - gitlab/v4/objects/projects.py - gitlab/v4/objects/sidekiq.py - gitlab/v4/objects/todos.py Fixes: - Should read `treatment` rather than `reatment`. - Should read `transferred` rather than `transfered`. - Should read `registered` rather than `registred`. - Should read `occurred` rather than `occured`. - Should read `overridden` rather than `overriden`. - Should read `marked` rather than `maked`. - Should read `instantiate` rather than `instanciate`. - Should read `function` rather than `fonction`.
* refactor(objects): remove deprecated project.issuesstatisticsNejc Habjan2021-09-081-1/+0
| | | | | BREAKING CHANGE: remove deprecated project.issuesstatistics in favor of project.issues_statistics
* chore: convert to using type-annotations for managersJohn L. Villalovos2021-09-081-56/+1
| | | | | | | | | | | | | Convert our manager usage to be done via type annotations. Now to define a manager to be used in a RESTObject subclass can simply do: class ExampleClass(CRUDMixin, RESTObject): my_manager: MyManager Any type-annotation that annotates it to be of type *Manager (with the exception of RESTManager) will cause the manager to be created on the object.
* chore: improve type-hinting for managersJohn L. Villalovos2021-09-071-11/+65
| | | | | | | | | | | | | | | The 'managers' are dynamically created. This unfortunately means that we don't have any type-hints for them and so editors which understand type-hints won't know that they are valid attributes. * Add the type-hints for the managers we define. * Add a unit test that makes sure that the type-hints and the '_managers' attribute are kept in sync with each other. * Add unit test that makes sure specified managers in '_managers' have a name ending in 'Managers' to keep with current convention. * Make RESTObject._managers always present with a default value of None. * Fix a type-issue revealed now that mypy knows what the type is