- Removal of deprecated symbols:
api::groups::CreateGroup::default_branch_protectionapi::groups::EditGroup::default_branch_protection
- No changes needed for GitLab 18.3.
- Removal of long-deprecated symbols:
api::error::ApiError<E>::Gitlabapi::error::ApiError<E>::GitlabObjectapi::error::ApiError<E>::GitlabUnrecognizedapi::issues::GroupIssues::without_milestoneapi::issues::GroupIssues::any_milestoneapi::issues::GroupIssues::milestone- All specific hook type specifications.
api::projects::merge_requests::MergeRequestSearchScope
- Deprecation of
ProjectAccessTokensBuilder::description. This parameter does not actually exist.
- Responses from GitLab now log the
X-Request-Idresponse header at thedebuglevel. See - Add
api::projects::StarProject,api::projects::UnstarProject, andapi::projects::Starrersendpoints. - Add
api::projects::artifacts::DeleteProjectArtifactsendpoint. - Add
api::projects::jobs::artifacts::DeleteJobArtifactsendpoint. - Add
api::projects::jobs::artifacts::KeepJobArtifactsendpoint. - Add
api::projects::jobs::artifacts::DownloadJobArtifactsendpoint. - Add
api::projects::jobs::artifacts::DownloadRefJobArtifactsendpoint. - Add
api::projects::jobs::artifacts::DownloadJobArtifactFileendpoint. - Add
api::projects::jobs::artifacts::DownloadRefJobArtifactFileendpoint.
- No changes needed for GitLab 18.2.
- No changes needed for GitLab 18.1.
api::projects::JobScopeno longerimpl Hash; instead it hasPartialOrdandOrdimplementations.api::users::ImpersonationTokenScopeno longerimpl Hash; instead it hasPartialOrdandOrdimplementations.
- String representations of
api::projects::labels::LabelColorare deprecated. They may still be passed to methods, but there is no way to trigger a diagnostic.
- Support for sorting project lists by
StarCount. - Support
member_role_idwhen sharing groups viaapi::groups::ShareGroup. - Support
default_branch,enabled_git_access_protocol,organization_id,duo_availability, andexperiment_features_enabledwhen creating groups viaapi::groups::CreateGroup. - Support
default_branch,enabled_git_access_protocol,allowed_email_domains_list,duo_availability,experiment_features_enabled,math_rendering_limits_enabled,lock_math_rendering_limits_enabled,duo_features_enabled, andmax_artifacts_sizewhen editing groups viaapi::groups::EditGroup. - Support
visibilityandmarked_for_deletion_onwhen listing groups viaapi::groups::Groups. - Support
masked_and_hiddenwhen creating group variables viaapi::groups::variables::CreateGroupVariable. - Support
masked_and_hiddenwhen updating group variables viaapi::groups::variables::UpdateGroupVariable. - Support
descriptionwhen creating project access tokens viaapi::projects::access_tokens::CreateProjectAccessToken. - Support
created_after,created_before,last_used_after,last_used_before,revoked,search,state,description,order_by, andsortwhen listing project access tokens viaapi::projects::access_tokens::ProjectAccessTokens. - Support
full_pathandpermanently_removewhen deleting projects viaapi::projects::DeleteProject. - Support
merge_afterwhen creating merge requests viaapi::projects::merge_requests::CreateMergeRequest. - Support
merge_afterwhen editing merge requests viaapi::projects::merge_requests::EditMergeRequest. - Support
namewhen querying pipelines viaapi::projects::pipelines::Pipelines. - Support
masked_and_hiddenwhen creating project variables viaapi::projects::variables::CreateProjectVariable. - Support
masked_and_hiddenwhen updating project variables viaapi::projects::variables::UpdateProjectVariable. - Support
descriptionwhen creating personal access tokens viaapi::users::personal_access_tokens::CreatePersonalAccessToken. - Support
descriptionwhen creating personal access tokens for a user viaapi::users::personal_access_tokens::CreatePersonalAccessTokenForUser. - Support
descriptionwhen creating impersonation tokens viaapi::users::impersonation_tokens::CreateImpersonationToken. - Support
name,description,branch_filter_strategy,feature_flag_events,resource_access_token_events,custom_webhook_template, andcustom_headerswhen creating or editing project and group hooks viaapi::projects::hooks::CreateHook,api::projects::hooks::EditHook,api::groups::hooks::CreateHook, andapi::groups::hooks::EditHook. - Support filtering issues by
Tasktype viaapi::issues::IssueType. - Add a
IssueMilestone::namedconstructor to ease usage of non-Cowvalues. - Support filtering packages by
Deprecatedstatus viaapi::packages::PackageStatus. - Support
marked_for_deletion_onwhen listing projects viaapi::projects::Projects. - Support
pipeline_id,order_by, andsortwhen listing commit statuses viaapi::projects::repository::commits::CommitStatuses. - Support
Skippedstate forapi::projects::repository::commits::CreateCommitStatus. - Support
usernameandmember_role_idforapi::groups::members::AddGroupMember. - Support
reject_non_dco_commitswhen editing project push rules viaapi::projects::push_rule::EditProjectPushRule. - Support
include_lfs_blobsandexclude_pathswhen getting project repository archives viaapi::projects::repository::archive::Archive. - Support
with_programming_language,id_after,id_before,membership,statistics,updated_after, andupdated_beforewhen listing user projects viaapi::users::projects::UserProjects. - Support
exclude_active,exclude_humans, andhumanswhen listing users viaapi::users::Users. - Support setting deploy key access to push to protected branches and tags.
- Support for setting an HTTP user agent via
GitlabBuilder::user_agent. - Support project job token scope APIs.
- Add
api::projects::pipelines::PipelineBridgesendpoint - Add
api::projects::pagesto manage pages settings. - Add
api::projects::labels::LabelPrioritytype - Add
api::projects::labels::LabelColortype - Add
api::projects::labels::EditLabelto edit project labels. api::common::directory_path_escapednow exists for escaping directory paths in URL components.
- Support for better error messages for rate limited responses. (#121)
- Fix
milestoneparameters when filtering issues within groups or projects. - Enforce character limits for
ref_,target_url, anddescriptionwhen creating commit statuses viaapi::projects::repository::commits::CreateCommitStatus. - Fix
file_nameencoding when it contains a directory paths for package operations viaapi::projects::packages::generic::GetPackageFileandapi::projects::packages::generic::UploadPackageFile
- No changes needed for GitLab 17.11.
- No changes needed for GitLab 17.10.
DisableProjectRunnerandEnableProjectRunnernow accept project names as well. A slight break as the types are now lifetime-aware, but this only affects code that needed to name the endpoint types across an API boundary (which should be rare).
- Internal dependency version updates; no user-facing changes.
- Add support for GitLab API authentication with job tokens.
- Add DeleteTag api
- Removal of APIs deprecated prior to 0.1700.0. Includes:
api::groups::CreateGroup::emails_disabledapi::groups::EditGroup::emails_disabledapi::groups::Groups::with_projectsapi::groups::members::AddGroupMember::tasks_to_be_doneapi::groups::members::AddGroupMember::tasks_project_idapi::issues::IssueOrderBy::WeightFieldsapi::issues::ProjectIssuesBuilder::without_milestoneapi::issues::ProjectIssuesBuilder::any_milestoneapi::issues::ProjectIssuesBuilder::milestoneapi::projects::ContainerExpirationPolicy::name_regexapi::projects::CreateProject::operations_access_levelapi::projects::CreateProject::emails_disabledapi::projects::CreateProject::container_registry_enabledapi::projects::CreateProject::tag_listapi::projects::CreateProject::build_coverage_regexapi::projects::CreateProject::approvals_before_mergeapi::projects::CreateProject::issues_enabledapi::projects::CreateProject::merge_requests_enabledapi::projects::CreateProject::jobs_enabledapi::projects::CreateProject::wiki_enabledapi::projects::CreateProject::snippets_enabledapi::projects::CreateProject::tagapi::projects::CreateProject::tagsapi::projects::EditProject::operations_access_levelapi::projects::EditProject::emails_disabledapi::projects::EditProject::container_registry_enabledapi::projects::EditProject::build_coverage_regexapi::projects::EditProject::approvals_before_mergeapi::projects::EditProject::issues_enabledapi::projects::EditProject::merge_requests_enabledapi::projects::EditProject::jobs_enabledapi::projects::EditProject::wiki_enabledapi::projects::EditProject::snippets_enabledapi::projects::EditProject::tagapi::projects::EditProject::tagsapi::projects::EditProject::printing_merge_requests_link_enabledapi::projects::issues::CreateIssue::epic_iidapi::projects::issues::EditIssue::epic_iidapi::projects::issues::EditIssue::issue_iidapi::projects::issues::EditIssue::remove_labelsapi::projects::issues::notes::CreateIssueNote::confidentialapi::projects::issues::notes::EditIssueNote::confidentialapi::projects::members::ProjectInviteTasksToBeDoneapi::projects::members::AddProjectMember::task_to_be_doneapi::projects::members::AddProjectMember::tasks_to_be_doneapi::projects::members::AddProjectMember::tasks_project_idapi::projects::members::ProjectMember::all_builderapi::projects::members::ProjectMembers::all_builderapi::projects::merge_requests::MergeRequestPipelinesapi::projects::merge_requests::MergeRequestPipelinesBuilderapi::projects::merge_requests::MergeRequestPipelinesBuilderErrorapi::projects::merge_requests::MergeRequestChangesapi::projects::merge_requests::MergeRequestChangesBuilderapi::projects::merge_requests::MergeRequestChangesBuilderErrorapi::projects::merge_requests::CreateMergeRequest::approvals_before_mergeapi::projects::merge_requests::CreateMergeRequest::allow_maintainer_to_pushapi::projects::merge_requests::EditMergeRequest::allow_maintainer_to_pushapi::projects::merge_requests::EditMergeRequest::remove_labelsapi::projects::merge_requests::MergeRequests::search_inapi::projects::merge_requests::note::CreateMergeRequestNote::merge_request_diff_shaapi::projects::merge_requests::note::EditMergeRequestNote::merge_request_diff_shaapi::projects::pipelines::Pipelines::nameapi::projects::protected_branches::ProtectedAccessLevelapi::projects::registry::Repositories::tagsapi::projects::registry::Repositories::tags_countapi::users::ExternalProvider::idwebhooks::MergeRequestHookAttrs::work_in_progress
hooktypes::HookDateparsing of local-offset time specifications has been restored.
IssueHookAttrs::time_estimateis allowed to benull(observed with a deployment).
- Add
api::projects::variablesto list and delete project-level CI/CD variables.
- Add support for
Planneraccess levels where necessary. This access level is new in GitLab 17.7.
- Add
api::paged::pagination::Pagination::AllPerPageLimit(usize)to get all results with smaller page size. Some endpoints return a 500 Internal Server Error when trying to fetch 100 results at once. - Add
api::groups::variablesto manage group-level CI/CD variables similar to the already available project-level CI/CD variable endpoints.
- Properly expose
api::runners::RunnerMetadatafor use with theCreateRunner::infomethod. - The following endpoints now support keyset pagination (depending on the
ordering request):
api::groups::GroupProjectsapi::projects::repository::Treeapi::users::UserProjects
api::projects::repository::CreateCommitnow property forces the encoding tobase64when non-UTF-8 contents are detected. This bumps the minimum Rust version to use theclient_apifeature to 1.66.api::users::Usersnow supports keyset pagination when sorting bycreated_atorupdated_at.
- All
webhooksandsystemhookstypes are deprecated. Parsing hooks should be done in the client crate to extract the fields of interest. See thehooktypesmodule for helpers with GitLab-specific oddities. - Deprecate
api::issues::GroupIssues::{without_milestone,any_milestone,milestone}in preference formilestone_id. Previously documented to be deprecated in 0.1602.1, but the attributes were missed.
- New
hooktypesmodule for stable types to assist in webhook parsing. hooktypes::HookDateto support parsing dates that appear in webhooks.hooktypes::{HookKind, SystemHookType, WebHookType}to help classify webhooks.
- Add
ApiErrorcode variants which give HTTP status codes with the GitLab error information (#116). These variants are now returned instead of the status-less variants. The variants without status information are now deprecated.
- Add
api::projects::issues::DeleteIssueendpoint - Add
api::projects::issues::notes::DeleteIssueNoteendpoint - Add
api::projects::approvals::ProjectApprovalsendpoint - Add
api::projects::approvals::ProjectApprovalRulesendpoint - Add
api::projects::repository::contributors::Contributorsendpoint - Add
api::users::CreateRunnerendpoint - Add
api::project::repository::branches::DeleteBranchendpoint - Add
api::merge_requests::*datatypes (reexported fromapi::projects::merge_requests) - Support sorting merge requests by merge date
- Add
api::merge_requests::MergeRequestsendpoint
- No changes needed for GitLab 17.4.
- No changes needed for GitLab 17.3.
- Add
api::projects:repository::commits::CompareCommitsendpoint
- Add
api::projects::DeleteProjectendpoint - Add
api::projects::deployments::CreateDeploymentendpoint - Add
api::projects::deployments::DeleteDeploymentendpoint - Add
api::projects::deployments::Deploymentendpoint - Add
api::projects::deployments::Deploymentsendpoint - Add
api::projects::deployments::EditDeploymentendpoint
- Add
api::projects::access_tokens::CreateProjectAccessTokenendpoint - Add
api::projects::access_tokens::ProjectAccessTokenendpoint - Add
api::projects::access_tokens::ProjectAccessTokensendpoint - Add
api::projects::access_tokens::RevokeProjectAccessTokenendpoint - Add
api::projects::access_tokens::RotateProjectAccessTokenendpoint
- Actually build the
/project/:project/issues/:issue_iid/related_merge_requestsendpoint. - Add
api::pipelines::PipelineTestReportSummaryendpoint
api::users::CreatePersonalAccessTokennow usesPersonalAccessTokenCreateScopeas this endpoint is actually quite limited compared to theCreatePersonalAccessTokenForUserendpoint.
- Add
api::users::CreatePersonalAccessTokenendpoint - Add
api::users::CreatePersonalAccessTokenForUserendpoint - Add
api::personal_access_tokens::PersonalAccessTokenendpoint - Add
api::personal_access_tokens::PersonalAccessTokenSelfendpoint - Add
api::personal_access_tokens::PersonalAccessTokensendpoint - Add
api::personal_access_tokens::RevokePersonalAccessTokenendpoint - Add
api::personal_access_tokens::RevokePersonalAccessTokenSelfendpoint - Add
api::personal_access_tokens::RotatePersonalAccessTokenendpoint - Add
api::personal_access_tokens::RotatePersonalAccessTokenSelfendpoint
- GraphQL support has been updated to use
graphql_client0.14. - The
httpcrate has been updated to 1.x.
- Add
api::projects::repository::commits::refsendpoint - Add
api::pipelines::PipelineTestReportendpoint
api::runners::EditRunnercan now editmaintenance_note
- The
typesmodule has been removed. Clients should define their own deserialization types. - Some
enumtypes have been preserved forwebhooksusage and are now exported from its module (thoughNoteableIdhas changed internal definition to avoid*Idtypes). - Hook type structures no longer
impl Serializeas this crate is intended to parse hooks, not write them.
- Add
api::job::Jobendpoint
- Job token authentication is now compliant with its limited permissions.
- The
ProtectedTagsendpoint nowimpl Pageable.
hookstypes no longer use thetypes::*Idtypes for simple wrappers.
- The
typesmodule and its members have been deprecated. Migrate to defining types in client crates directly.
&Endpointnow has animpl Endpoint&Pageablenow has animpl Pageableapi::pagednow supportsinto_iter()andinto_iter_async()methods.- Add
api::runners::Runnersendpoint - Add
api::runners::AllRunnersendpoint - Add
api::projects::runners::ProjectRunnersendpoint - Add
api::projects::runners::EnableProjectRunnerendpoint - Add
api::projects::runners::DisableProjectRunnerendpoint - Add
api::groups::runners::GroupRunnersendpoint - Add
api::runners::Runnerendpoint - Add
api::runners::EditRunnerendpoint - Add
api::runners::CreateRunnerendpoint - Add
api::runners::DeleteRunnerendpoint - Add
api::runners::DeleteRunnerByTokenendpoint - Add
api::runners::ResetRunnerAuthenticationTokenendpoint - Add
api::runners::ResetRunnerAuthenticationTokenByTokenendpoint - Add
api::runners::VerifyRunnerendpoint - Add
api::runners::RunnerJobsendpoint
api::pagednow requires that the item type be'static(shouldn't break anything).api::Paged::into_iternow returns aLazilyPagedIterwith&'a Erather thanE(shouldn't break anything).
- Add
From<&'a String>impl forNameOrId<'a>.
- No changes needed for GitLab 16.7.
api::projects::releases::CreateRelease- Add
api::projects::repository::commits::signatureendpoint. - Add endpoints for groups/projects access requests
api::projects::access_requests::{access_requests,request,approve,deny}andapi::groups::access_requests::{access_requests,request,approve,deny}. - Add
api::users::CreateUser - The
Endpoint::url_basemethod may be used to select the base for the endpoint's URL. Current options includeUrlBase::ApiV4andUrlBase::Instance. api::RestClient::instance_endpointnow has a default implementation of not supportingUrlBase::Instanceendpoints.ImpersonationClientmay now be switched to an OAuth2 token like the main builder can.
- Add
JsonEncodedvariant toBodyErrorenum. - Add
JsonParamshelper to create JSON-bodied queries. - Update to use the 2021 edition; used in the test suite.
api::users::ExternalProvidermembers are now private; use the associatedbuilder()method to build an instance instead.
- Add missing endpoints to
api::projects::merge_requests::awardsandapi::projects::merge_requests::notes::awards. - Add
api::projects::issues::awardsandapi::projects::issues::notes::awardsendpoints. - Add
api::users::projects::UserProjectsendpoint. - Add
api::projects::ArchiveProjectandapi::projects::UnarchiveProjectendpoints. - Support
emails_enabledparameters when creating or editing groups and projects. - Support filtering groups based on the repository storage.
- Support enforcing expiration on service access tokens for group hooks.
- Support filtering group and project packages by version.
- Support enforcing committer name requirements for push rules.
- Support model experimentl access levels when creating or editng projects.
- Support
unidiffrequests for merge request diffs. - Support the
SecurityOrchestrationPolicyfor the pipeline source filter. - Support returning users marked as auditors when listing all users.
- Detect and notify of
301 Moved Permanentlyresponses. - Support editing
prevent_merge_without_jira_issuewhen editing a project. - Support filtering projects by those that are hidden or are pending deletion.
- Support keyset pagination for the
/usersendpoint. - Support authentication with job tokens.
- Support
default_branch_protection_defaultsparameters when creating and editing groups. api::projects::releases::links::ListReleaseLinksapi::projects::releases::links::CreateReleaseLinkapi::projects::releases::links::GetReleaseLinkapi::projects::releases::links::UpdateReleaseLinkapi::projects::releases::links::DeleteReleaseLink
- The
emails_disabledparameter has been replaced byemails_enabledwhen creating or editing groups and projects. - The
tasks_to_be_doneandtasks_project_idparameters for group and project memberships have been removed upstream.
enumtypes under theapimodule (with a few exceptions) have been marked as `#[non_exhaustive] with the intent to keep semver stability if/when GitLab enhances the API in ways that require these types to change.
- No changes needed for GitLab 16.6.
- Add
api::projects::packages::generic::UploadPackageFileandapi::projects::packages::generic::GetPackageFileendpoints.
- Fix "self" query used to verify authentication tokens (#96)
- Add Email Address to User Hook Attributes.
- Support managing group/project push rules.
- Add
api::projects::merge_requests::MergeRequestDiffsendpoint. api::pagediterators can be turned into asyncStreams using theinto_async()method.api::pagediterators can now set the page number (1-indexed) for direct access.- Extend enum
systemhooks::ProjectEventwithproject_update
api::retry::Clientnow forwards the HTTP version for requests as well.
- Deprecate
api::projects::merge_requests::MergeRequestChangesendpoint. Deprecated in GitLab 15.7; useMergeRequestDiffsinstead.
- No changes needed for GitLab 16.4.
- Support
/project/:project/issues/:issue_iid/related_merge_requestsendpoint.
- Switches
/api/projects/repository/treeto use ordinary pagination.
- Minimum dependency build now requires 1.63 to avoid security advisories.
api::projects::protected_branches::ProtectBranch::allowed_to_unprotectno longer supports theNoAccesslevel as GitLab does not support it. Callers need to update to use theProtectedAccessLevelWithAccessset of levels instead.
- Milestone filters for
api::issues::{Group,Project}Issuesnow use the proper query parameter (milestone_id).
- Add
api::groups::BranchProtection::PushExceptInitialprotection rule. - Support editing member rule IDs on group and project memberships.
- Support
UpcomingandStartedmilestone queries for issues. - Support
skip_usersin group and project member list queries. - Support
show_seat_infoparameter when listing memberships. - Support
NoneandAnyepic filters for project issues. - Support epic filters for group issues.
- Support filtering project and group issues by health status.
- Support
Any,Today, andTomorrowissue due date filters. - Support sorting issue results by their title.
- Support filtering group issues by their type.
- Support filtering out external users when listing users.
- Support setting and editing the
rawflag on project CI variables. - Support setting and editing the
descriptionfield on project CI variables. - Support sorting tags by version number.
- Support filtering commits by author.
- Support filtering branches by regex.
- Support setting the
internalflag for created issue and MR notes. - Support the
WaitingForResourcejob scope when filtering jobs. - Support the
include_retriedfield for project jobs. - Support filtering MRs by approver usernames.
- Support filtering MRs by whether they are approved or not.
- Support setting
merge_commit_templatewhen creating a project. - Support setting
mr_default_target_selfwhen creating a project. - Support IP restriction ranges when editing groups.
- Support wiki access level when editing groups.
- Support project download limit parameters when editing groups.
- Support filtering projects by last updated timestamps.
- Support skipping LDAP users when searching users.
- Support downloading raw file contents backed by LFS.
- Support setting and editing access levels for
releases,environments,feature flags,infrastructure, andmonitorproject features. - Support setting and editing the
only_allow_merge_if_all_status_checks_passedflag on projects. - Support setting and editing group runner support on projects.
- Support editing
mirror_branch_regexon projects. - Support editing
ci_allow_fork_pipelines_to_run_in_parent_project,enforce_auth_checks_on_uploads,issue_branch_template,allow_pipeline_trigger_approve_deployment, andci_forward_deployment_rollback_allowedsettings on projects.
- Deprecate
api::issues::{Group,Project}Issues::{without_milestone,any_milestone,milestone}in preference formilestone_id. With new enumerations possible, using the actual name for the parameter is best with the actual type exposed. - The
refparameter for raw file contents is no longer required. If not provided, the repository'sHEADcommit will be used. - Deprecate including
tagsandtags_countin project registry repository queries. Removed in GitLab 15.0. - Deprecate MR note creation and editing with
merge_request_diff_shafields. The documentation had a typo and it is only supported when creating an MR note. Usemerge_request_diff_head_shainstead. - Deprecate
approvals_before_mergein project creation and editing and MR creation. MR approval rules APIs (currently no bindings are provided) should be used instead. - Deprecate
confidentialfor issue notes. Useinternalinstead, but note that it is only available at note creation and cannot be edited later. ProtectedAccessis now a generic type in order to support different fields with different available access levels. Most call sites should not be affected.- Deprecate
build_coverage_regexwhen creating and editing a project. This setting is now set via.gitlab-ci.ymlrather than at the project-level. - Deprecate
operations_access_levelfor more granular feature selections.
- Pipeline schedule API endpoints added.
- Introduce the
draftfield to all MergeRequest structs.
- Deprecate the
work_in_progressfield on all MergeRequest structs.
api::projects::registry::RepositoryTagsis nowPageable.
api::projects::Jobsnow supports keyset pagination.
- CI updates to publish via CI.
- Support for GET /projects/:id/repository/files/:file_path endpoint
- Add "title" to
webhooks::MergeRequestChanges. - Support
/projects/:id/packages/:package_idendpoint - Support
/projects/:id/packages/:package_id/package_filesendpoint - Support
/projects/:id/packages/:package_id/package_files/:package_file_idendpoint - Support
/groups/:id/packagesendpoint. - New endpoints for creating commits with
gitlab::api::projects::repository::commits::CreateCommit
- Add "approval" and "unapproval" to
webhooks::MergeRequestAction.
- Expose
RestErrorat the crate root. - Add an
ImpersonationClienttype to use impersonation tokens with an existing client. - Support
/projects/:id/packagesendpoint.
- Add API endpoint
api::projects::merge_requests::approval_rules.
- Implement
Clonefor structs that implementEndpoint. - Support for container registry endpoints.
- Support
/project/:project/repository/archiveendpoint.
- No changes needed for GitLab 15.6.
- No changes needed for GitLab 15.5.
- API endpoints for user impersonation tokens.
types::GroupHookhas been added.- New endpoints for:
- Creating, getting, editing, listing and deleting group hooks.
- Support for
Pushbranch protections when creating groups. - Support for sorting project search results by
Similarity. - Support for setting group shared runner settings,
path,prevent_sharing_groups_outside_hierarchy,prevent_forking_outside_group, andfile_template_project_id. - Support for
invite_source,tasks_to_be_done, andtasks_project_idwhen adding a member to a group or project. - Support
skip_subresourceswhen deleting group memberships. - Support for filtering on
epic_idwhen listing issues. - Support for issue types when creating, editing, and filtering issues.
- Support sorting merge requests by title.
- Support requesting retried jobs when requesting pipeline jobs.
- Support pipeline status states
PreparingandWaitingForResource. - Support setting the
security_and_compliance_access_levelwhen creating and editing projects. - Support editing the
mr_default_target_selfandci_separated_cachesproject fields. - Support setting variables when playing manual jobs.
- Support
merge_request_diff_shawhen editing and creating MR notes (required for the/mergecommand). - Support filtering pipelines by their source.
- Support allowing force pushes when protecting branches.
- Support including HTML descriptions in project releases.
- Support sorting parameters for project releases.
- Support including trailers in commit queries.
- Support
execute_filemodeandlast_commit_idwhen editing files through the API. - Support querying custom attributes of users.
- Support
without_project_botsandsaml_provider_idwhen listing users. - Support for filtering projects based on import status and topics.
- Support for finer-grained creation rules for protected tags.
- Support filters when updating project pipeline variables.
- Keyset pagination is now supported for group searches ordered by name.
- Support filtering groups based on custom attributes.
- The
allproject membership endpoints have been split out.
api::issues::IssueOrderBy::WeightFieldsis nowapi::issues::IssueOrderBy::Weight. The old name seems to come from a misreading of the documentation's list of supported fields. Its field name has also been fixed toweightinstead ofweight_fields.api::projects::{CreateProject, EditProject}::container_registry_enabledis deprecated in favor ofcontainer_registry_access_level.api::projects::{CreateProject, EditProject}::{tag, tags}are deprecated in favor oftopicandtopics.api::projects::merge_requests::MergeRequests::search_inis deprecated because GitLab doesn't actually have such a query parameter.api::projects::merge_requests::MergeRequestSearchScopeis deprecated because GitLab doesn't actually have such a query parameter it represented.api::projects::pipelines::Pipelines::nameis deprecated; GitLab never supported such a parameter.api::projects::members::{ProjectMember, ProjectMembers}::all_membersis deprecated. Theallendpoints have different parameters, so merging them doesn't work anymore.
api::deploy_keys::DeployKeys::publicis now private.api::projects::{CreateProject, EditProject}::requirements_access_leveldo not supportPublic, so they now usesapi::FeatureAccessLevelinstead ofapi::FeatureAccessLevelPublic.api::users::Users::externalis now a()instead ofboolbecause GitLab doesn't actually supportexternal=false.api::projects::repository::Treenow uses keyset pagination and requires GitLab 15.0. Page-based iteration has been deprecated by GitLab.api::projects::variables::ProjectVariableFilter::environment_scopeis now private.
graphql_clienthas been updated to 0.11.
api::projects::merge_requests::MergeRequestPipelinesand associated structures have been moved toapi::projects::merge_requests::pipelines.
api::projects::edit::EditProjectfixes a typo fromprinting_merge_requests_link_enabledtoprinting_merge_request_link_enabledapi::projects::protected_branches::ProtectedBranchesis now paginated.
types::UserState::Deactivatedhas been added.- New endpoints for:
- Sharing and unsharing groups
- Listing shared projects in a group
- Sharing and unsharing projects
- Creating a pipeline on a merge request
- New fields on
types::Hook:push_events_branch_filterissues_eventsconfidential_issues_eventsmerge_requests_eventsnote_eventsconfidential_note_eventsrepository_update_eventsjob_eventspipeline_eventswiki_page_events
- New fields on
types::ProjectHook:deployment_eventsreleases_events
- New fields on
types::Project:build_git_strategyci_default_git_depth
- New fields on
webhooks::MergeRequestHook:changes
- New
webhooks::MergeRequestChangesstructure
- No changes needed for GitLab 15.0.
- No changes needed for GitLab 14.10.
- The
api::projects::repository::branches::Branchesendpoint is now pageable. - Extend type
webhooks::MergeRequestHookwith changes entry - The
api::projects::protected_branches::ProtectedBranchesendpoint is now pageable. - Extend UserState enum with Deactivated
- Extend Hook type with fields:
- push_events_branch_filter
- issues_events
- confidential_issues_events
- merge_requests_events
- note_events
- confidential_note_events
- job_events
- pipeline_events
- wiki_page_events
- repository_update_events
- Extend Project type with fields:
- build_git_strategy
- ci_default_git_depth
- Move api endpoint
api::projects::merge_requests::pipelinestoapi::projects::merge_requests::pipelines::pipelines - Add api endpoint
api::projects::merge_requests::pipelines::create - Fix parameters for editing projects:
- printing_merge_request_link_enabled
- No changes needed for GitLab 14.9.
- Added the
api::projects::merge_trainsendpoint to get merge trains for a specific project.
types::RepoCommit::parent_idsis now anOption.
- Protected tags with special URL characters (namely
/) are now handled properly withapi::projects::protected_tags::ProtectedTag. - Tags on a repository are now pageable.
- The
types::DiscussionNoteType::Notevariant has been added.
- Groups can now be edited via
EditGroup. - New
rustlsfeature to support static linking (no OpenSSL). - New type definitions for:
MergeRequestCommitProjectVariableProtectedTagAccessLevelProtectedTagReleaseTagTag
- New endpoints for:
- Creating, updating, and inspecting project-level pipeline variables.
- Deleting project hooks.
- Getting tree object from projects.
- Updating a file in a project.
- Getting merge requests associated with a commit.
- Getting commits of a merge request.
- Deleting a file from the repository.
- Deploy keys
- New parameters for creating projects:
container_registry_access_levelmerge_pipelines_enabledmerge_trains_enabledsquash_optiontopics
- New parameters for editing projects:
container_registry_access_levelmerge_commit_templatesquash_commit_templateissues_templatemerge_requests_templatesquash_optionmerge_pipelines_enabledmerge_trains_enabledprinting_merge_requests_link_enabledtopicskeep_latest_artifact
- Repository branches are now pageable
- Use explicit type for referencing associated items for rustc 1.57
- No changes needed for GitLab 14.6.
- No functional changes. Only documentation and tests were updated.
- Missing
Buildertype exports have been added.
- The error types from
Builderinstances are now distinct per builder type.
- Added the
first_contributorsfield toapi::projects::merge_requests::MergeRequest - Added the
api::projects::merge_requests::pipelinesendpoint to get the pipelines attached to a merge request - Added the
api::projects::merge_requests::changesendpoint to get information about a merge request along with diffs - Made field
code_owner_approval_requiredintypes::ProtectedRepoBranchanOption<bool>instead ofboolas the field is only present in Gitlab premium - Added
Paged::iter_asyncreturning a paginated asynchronous stream analogous toPages::iter. - Added the
api::groups::issues::Issuesendpoint to get issues associated with a group. - Added support for TLS-authenticated clients to
GitlabBuilder
- No changes needed for GitLab 14.3.
- Added the
api::projects::merge_requests::approvals::MergeRequestApprovalsendpoint to get approvals of a merge request. - Added graphql requests to the async client.
- The
Gitlabclient now supports unauthenticated connections.
- Clients may be wrapped by
api::retry::Clientin order to perform exponential backoff for service-side errors. Backoff parameters are configurable via theapi::retry::Backoffstructure.
types::MergeRequest::source_project_idis now anOption<ProjectId>
- A new
RestClienttrait has been refactored fromClientandAsyncClient. - The
api::pagedtype now has an.iter()method which may be used to iterate over paginated results using lazily fetched API results. This can be used to reduce memory usage for large result sets. - Added a
confidentialparameter forapi::projects::issues::EditIssue - GitLab responses which do not return JSON (e.g., 5xx status codes) are now
caught as the
ApiError::GitlabServiceerror variant. Previously, the JSON deserialization would have been exposed.
- Allow arbitrary strings for the UID of
ExternalProvidermatching what the API expects and allows.
- Project hooks can now be edited via
EditHook.
- Upgraded
reqwestandbyteswhich use tokio 1.0.
- Added the
api::projects::releases::ProjectReleasesendpoint to list all releases for a project. - Added tags related api endpoints under
api::projects::repository::tags - Listing commits in a repository can now be done via
Commits - Added asynchronous API for query
api::AsyncQueryand clientapi::AsyncClient. - Added asynchronous client
AsyncGitlab(created byGitlabBuilder::build_async).
types::{Pipeline,PipelineBasic}now have aproject_idmember.
ParamValue::as_valuenow takes its value as&selfrather thanself. This was required in order to implementCommaSeparatedListreliably.- Merge request discussions on code now have a more fine-grained API. This change was made by GitLab and is just being followed by the crate.
api::common::CommaSeparatedListnow exists for easy use of comma-separated values.- Project members can now be removed via
RemoveProjectMember. - Group members can now be edited via
EditGroupMember. - Project members can now be edited via
EditProjectMember.
EditIssue::remove_labelsis deprecated in favor of the betterclear_labelswording.EditMergeRequest::remove_labelsis deprecated in favor of the betterclear_labelswording.
- API bindings for the
"minimal"access level. - Groups can have "inherit" set as their shared runner minute limit.
- Listing groups can now be set to only return top-level groups.
- Searching for projects within a group can now be sorted by a similarity score based on the search criteria.
- Project container expiration policies can now use an arbitrary "keep n" count.
- Project container expiration policies now have
name_regex_delete(replacing the now-deprecatedname_regex) andname_regex_keep. - Projects can now be created and edited with
operations_access_levelsettings. - Projects can now be created and edited with
requirements_access_levelsettings. - Projects can now be created and edited with
analytics_access_levelsettings. - Projects can now be created and edited with
show_default_award_emojissettings. - Projects can now be created and edited with
restrict_user_defined_variablessettings. - Projects can now be created and edited with
allow_merge_on_skipped_pipelinesettings. - Projects can now be edited with
ci_forward_deployment_enabledsettings. - Environments can now be filtered by their deployment state.
- Project hooks can now be registered for events related to confidential notes, deployments, and releases.
- Issues can now be edited with incremental label changes.
- Issues can now be filtered by iterations, due dates, and search queries can now be scoped.
- Issue notes can now be created and edited with the confidential flag.
- Project labels can be filtered by search queries.
- Project members can now be edited in batch (using multiple IDs).
- Merge requests can now be created and edited with reviewer settings.
- Merge requests can now be created with the
approvals_before_mergesetting. - Merge request discussions can now be created on a specific commit.
- Merge requests can now be edited with incremental label changes.
- Merge requests can now be filtered by search scopes.
- Merge requests can now trigger merge status rechecks when listing.
- Merge requests can now be filtered by reviewer.
- Merge requests can now be filtered by environment status.
- API bindings for the
"scheduled"pipeline status. - Projects can now be sorted by various resource sizes.
- Projects can now be filtered by storage backend.
- Users can now be filtered by GitLab-internal users and administrator status.
- Group member removal can now specify to unassign issuables.
- No changes needed for GitLab 13.8.
- Added
api::projects::repository::files::FileRaw - Added
api::projects::merge_requests::approval_state::MergeRequestApprovalStatequery to access the approval rules state of a particular merge request.
- No changes needed for GitLab 13.6.
- Changed
ci_config_pathtoOption<String>ingitlab::webhooks::PipelineHookAttrs
- Added
head_pipeline_idfield togitlab::webhooks::MergeRequestHookAttrs
- Error types now use
#[non_exhaustive]
- Added
gitlab::webhooks::PipelineHook
Idtypes now implementHash
- Added
api::projects::issues::MergeRequestsClosingandapi::projects::issues::MergeRequestsClosing
- GitLab 13.2 added the
approvedandunapprovedmerge request actions for CE.
- Added the
api::projects::protected_tags::ProtectTagapi::projects::protected_tags::UnprotectTagapi::projects::protected_tags::ProtectedTagapi::projects::protected_tags::ProtectedTagsendpoint to query, protect and unprotect a projects tags. - Added the
api::projects::labels::DeleteLabelendpoint to delete existing labels from a project. - Added the
api::projects::labels::PromoteLabelendpoint to promote a project label to a group label. - Added the
api::projects:merge_requests::MergeMergeRequestendpoint to merge open merge requests. - Added the
api::projects:merge_requests::RebaseMergeRequestendpoint to rebase open merge requests when using the fast-forward merge model. - Added the
api::projects:merge_requests::ApproveMergeRequestendpoint to approve open merge requests. - Added the
api::projects:merge_requests::UnapproveMergeRequestendpoint to unapprove approved merge requests.
- Updated
api::projects::members::ProjectMember[s]to support the ability to include member details for those members that have access as a result of belonging to ancestor/enclosing groups, in addition to directly added members. - Allow a label via the
api::projects::labels::Labelendpoint to be queried by id or name.
- Added the
api::groups::projects::GroupProjectsendpoint to list a groups projects. - Added the
api::groups::subgroups::GroupSubgroupsendpoint to list a groups subgroups. - Added the
api::projects::protected_branches::ProtectedBranchesendpoint to list a projects protected branches. - Added the
api::projects::protected_branches::ProtectedBranchendpoint to query a projects protected branch.
- Added pagination support to
api::projects::labels::Labels - Keyset pagination also supports the to-be-removed (14.0)
LinksHTTP header.
- The REST endpoint methods on the
Gitlabstructure have been removed. Associated helper structures for resource creation endpoints have been removed as well:CreateMergeRequestParamsCreateMergeRequestParamsBuilderCreateGroupParamsCreateGroupParamsBuilderCreateProjectParamsCreateProjectParamsBuilderMergeMethodBuildGitStrategyAutoDeployStrategyWebhookEventsCommitStatusInfoMergeRequestStateFilterRepoFileProjectFeaturesQueryParamSliceQueryParamVec
- Now-impossible error conditions have been removed from
GitlabError.
- All methods on the
Gitlabstructure now haveEndpointstructures implemented. In a future release, these methods (and their support types) will be removed. - The
Serializeimplementations of the API types are deprecated (though marking them as such is difficult).
- The
api::projects::issues::Issuesendpoint'smilestonefield was changed to match the actual API exposed by GitLab (withNoneandAnyoptions). - The
api::projects::pipelines::PipelineVariablesendpoint is now pageable. - All
EnableStatefields may now be set usingboolvalues. - The
api::projects::merge_requests::EditMergeRequestendpoint now supports unlabeling a merge request. - The
api::Clienttrait has been changed to use thehttpcrate types. This allows for clients to not be tied toreqwestand for mocking and testing of the endpoints themselves. - GitLab errors now detect error objects returned from the API.
- The
min_access_levelfield forapi::groups::Groupsand theaccess_levelforapi::projects::members::AddProjectMemberare now properly passed as integers to the API. (#42) - The path used for the project and group milestone endpoints has been fixed.
It was observed (#41) that the new API pattern was not handling POST and
PUT parameters properly. This has now been fixed.
In the process of updating the body handling, a simpler pattern for query parameters was also implemented.
Some additional merge status names for merge requests were missing and have been added.
- The
api::projects::environments::Environmentendpoint uses the correct path now. - The
api::groups::members::GroupMembers,api::projects::members::ProjectMembers, andapi::projects::repository::Branchesendpoints now accepts plain strings for theirqueryfields. - The
api::projects::protected_branches::UnprotectBranchendpoint now properly escapes branch names with URL-special characters. - The
api::projects::repository::CreateFileendpoint now properly upgrades the encoding when attempting to encode binary contents usingEncoding::Text. - The
api::projects::CreateProjectandapi::projects::EditProjectendpoints now accepts plain strings in itsimport_urlfield.
- The
api::projects::issues::EditIssuenow usesissuerather thanissue_iidfor consistency.
A new pattern for API implementation is now underway. Instead of methods
directly on the Gitlab instance, there are now structures which implement an
api::Endpoint trait. This trait may be used to query any structure
implementing the api::Client trait using the api::Query trait. All
endpoints use the "builder" pattern to collect required and optional
parameters.
There are some adaptor functions to handle various use cases:
api::paged: This may be used to handle pagination of any endpoint which supports it (checked at compile time).api::ignore: This may be used to ignore the content of the response for any endpoint. HTTP and GitLab error messages are still captured.api::raw: Instead of deserializing the contents of the result from GitLab into a structure, the raw bytes may be fetched instead using this function.api::sudo: This function adapts any endpoint into being called as another user if the client is able to do so (basically, is an administrator).
The api::Query trait deserializes the contents from GitLab into any structure
which implements the serde::DeserializeOwned trait. This can be used to only
grab information of interest to the caller instead of extracting all of the
information available through the types module.
If your endpoint is deprecated, it has been marked as such and you should migrate to the new pattern. Please see the docs for available endpoints.
All new endpoint implementations should use the new pattern rather than adding
methods to Gitlab. Result structures do not need to be added to this crate
either. It is expected that they too will be deprecated at some point and
either not provided or moved to a dedicated crate.
use std::env;
use serde::Deserialize;
use gitlab::Gitlab;
use gitlab::api::{self, projects, Query};
#[derive(Debug, Deserialize)]
struct Project {
name: String,
}
fn example() {
// Create the client.
let client = Gitlab::new("gitlab.com", env::get("GITLAB_TOKEN").unwrap()).unwrap();
// Create a simple endpoint.
let endpoint = projects::Project::builder().project("gitlab-org/gitlab").build().unwrap();
// Get the information.
let project: Project = endpoint.query(&client).unwrap();
// Call it again, but ignore the response from GitLab.
let _: () = api::ignore(endpoint).query(&client).unwrap();
// Create an endpoint that supports pagination.
let pageable_endpoint = projects::Projects::builder().build().unwrap();
// Get just the first page (20 results).
let first_page: Vec<Project> = pageable_endpoint.query(&client).unwrap();
// Get 200 results instead.
let first_200_projects: Vec<Project> = api::paged(pageable_endpoint, api::Pagination::Limit(200)).query(&client).unwrap();
// Query `gitlab-org/gitlab` except by ID this time.
let endpoint = projects::Project::builder().project(278964).build().unwrap();
// Get the raw data from the response.
let raw_data: Vec<u8> = api::raw(endpoint).query(&client).unwrap();
}- Include a changelog.