Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file gitlab_s.ml
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339moduletypeGitlab=sigtyperate_limit={limit:int;remaining:int;reset:float}typerates={core:rate_limitoption}exceptionMessageofCohttp.Code.status_code*Gitlab_t.message(** Functions corresponding to direct API requests return
{!Response.t} values inside of {!Monad.t} values so that more
information about the request can be made
available. {!Monad.(>>~)} is a convenience operator that lets
you bind directly to the carried value. *)moduleResponse:sig(** [redirect] indicates whether the originally requested
endpoint should continue to be used in the future. *)typeredirect=|TemporaryofUri.t(** The redirection is temporary. *)|PermanentofUri.t(** The redirection is permanent. *)type'at=private<value:'a;redirects:redirectlist;..>(** ['a t] is an API response containing a payload of type
['a]. {b Do not} refer to this type explicitly as its identity and
representation are subject to change (e.g. a family of object
types may replace it before 3.0). *)valvalue:<value:'a;..>->'a(** [value r] is the payload in response [r]. *)valredirects:<redirects:redirectlist;..>->redirectlist(** [redirects r] is the sequence of redirects prior to response [r]. *)valfinal_resource:redirectlist->redirectoption(** [final_resource rs] is the single redirect, if any redirects
occurred, that describes the overall redirect chain [rs]. If
any redirect [rs] is temporary, [final_resource rs] will be a
temporary redirect to the final URI. If all redirects [rs] are
permanent, [final_resource rs] will be a permanent redirect to
the final URI. *)end(** All API requests are bound through this monad which encapsulates
an Lwt cooperative thread and includes some state which may be
set via {!API} functions. *)moduleMonad:sigtype'at(** ['a t] is an Lwt thread sensitive to GitLab API state. *)valreturn:'a->'at(** [return x] is the value [x] wrapped in a state-sensitive Lwt thread. *)valbind:('a->'bt)->'at->'bt(** [bind m f] is the eventual value of [f] applied to the
contents of [m]. Its argument order is designed for currying. *)valmap:('a->'b)->'at->'bt(** [map f m] is {!bind} [m (fun x -> return (f x))]. Its argument
order is designed for currying. *)val(>>=):'at->('a->'bt)->'bt(** [m >>= f] is [{!bind} f m]. *)val(>|=):'at->('a->'b)->'bt(** [m >|= f] is [{!map} f m]. *)val(*>):'at->'bt->'bt(** [m *> n] is [{m >>= fun _ -> n}]. *)val(>>~):'aResponse.tt->('a->'bt)->'bt(** [m >>~ f] is [m >|= {!Response.value} >>= f]. *)val(>|~):'aResponse.tt->('a->'b)->'bt(** [m >|~ f] is [m >|= {!Response.value} >|= f]. *)valcatch:(unit->'at)->(exn->'at)->'at(** [catch try with] is the result of trying [try]. If [try]
succeeds, its result is returned. If [try] raises an
exception, [with] is applied to the exception and the result
of [with] is returned. *)valfail:exn->'at(** [fail exn] raises exception [exn] inside of the monad. *)valrun:'at->'aLwt.t(** [run m] is the Lwt thread corresponding to the sequence of API
actions represented by [m]. Once a {!t} has been [run], any
GitLab API state such as associated default security tokens or
declared user agent string will not be available in
subsequently bound functions. *)valembed:'aLwt.t->'at(** [embed lwt] is an Lwt thread lifted into the GitLab API
monad. Its monadic state will be inherited from any monadic
values bound before it. *)val(let+):'at->('a->'b)->'btval(and+):'at->'bt->('a*'b)tval(let*):'at->('a->'bt)->'btval(and*):'at->'bt->('a*'b)tend(** The [Scope] module abstracts GitLab's
{{:https://docs.gitlab.com/ee/integration/oauth_provider.html#authorized-applications}authorization
scopes}. *)moduleScope:sigvalto_string:Gitlab_t.scope->string(** [to_string scope] is the string GitLab uses to indicate
the scope constructor [scope]. *)valof_string:string->Gitlab_t.scopeoption(** [scope_of_string scope] is the constructor corresponding to
the GitLab scope constructor [scope] if one exists. *)vallist_to_string:Gitlab_t.scopelist->string(** [string_of_scopes scopes] is the serialization for a list of
scopes [scopes] which GitLab accepts as a set of scopes in its
API. *)vallist_of_string:string->Gitlab_t.scopelistoption(** [scopes_of_string scopes] are the scope constructors
corresponding to the serialized list of constructors
[scopes]. *)valall:Gitlab_t.scopelist(** [all] is a list containing every scope constructor known. *)end(** Authentication Token for accessing GitLab APIs.
Of the several ways provided in GitLab, we currently support:
{ul {- Personal Access Tokens}
{- Project Access Tokens}
{- OAuth Authorization Codes}
}
*)moduleToken:sigtypeoauth={access_token:string;refresh_token:string}typet=|AccessTokenofstring(* Either a Personal or Project Access Token. *)|OAuthTokenofoauth(** [t] is the abstract type of a token. *)typegrant_type=AuthorizationCode|RefreshTokenvalcreate_url:client_id:string->redirect_uri:Uri.t->state:string->scopes:Gitlab_t.scopelist->unit->Uri.t(** Create URL for Authorisation code flow. {{:https://docs.gitlab.com/ee/api/oauth2.html#authorization-code-flow}}
*)valof_code:client_id:string->client_secret:string->?grant_type:grant_type->redirect_uri:string->code:string->unit->toptionLwt.t(** Retrieve an OAuth Token using the default grant_type [AuthorizationCode].
Use the [refresh_token] along with a grant_type of [RefreshToken] to request a
refreshed OAuth Token.
*)valof_string:string->t(** [of_string] create an [AccessToken]. *)valto_string:t->string(** [to_string token] is the string serialization of [token]. *)endtype+'aparse=string->'aLwt.t(** ['a parse] is the type of functions which extract meaningful
values from GitLab responses. *)type'ahandler=(Cohttp.Response.t*string->bool)*'a(** ['a handler] is the type of response handlers which consist of
an activation predicate (fst) and a parse function (snd). *)(** Each request to GitLab is made to a specific [Endpoint] in
GitLab's REST-like API. *)moduleEndpoint:sig(** Some endpoints expose resources which change over time and
responses from those endpoints may contain version metadata
which can be used to make low-cost conditional requests
(e.g. cache validation). *)moduleVersion:sig(** [t] is a version of a resource representation. *)typet=|Etagofstring(** An entity tag identifier *)|Last_modifiedofstring(** A timestamp conforming to the HTTP-date production *)endend(** The [Stream] module provides an abstraction to GitLab's paginated
endpoints. Stream creation does not initiate any network
activity. When requests are made, results are buffered
internally. Streams are not mutable. *)moduleStream:sigtype'at(** ['a t] is a stream consisting roughly of a buffer and a means
to refill it. *)type'aparse=string->'alistLwt.t(** ['a parse] is the type of functions which extract elements
from a paginated response. *)valnext:'at->('a*'at)optionMonad.t(** [next s] is the next element of the stream and a stream
continuation if one exists. The input stream is not
modified. This function offers an efficient, lazy, and uniform
means to iterate over ordered API results which may be too
numerous to fit into a single request/response pair. *)valmap:('a->'blistMonad.t)->'at->'bt(** [map f s] is the lazy stream of [f] applied to elements of [s]
as they are demanded. *)valtake:int->'at->'at(** [take n s] is the lazy stream of the first [n] elements of [s]
as they are demanded. *)valfold:('a->'b->'aMonad.t)->'a->'bt->'aMonad.t(** [fold f a s] is the left fold of [f] over the elements of [s]
with a base value of [a]. {b Warning:} this function may
result in {i many} successive API transactions. *)valfind:('a->bool)->'at->('a*'at)optionMonad.t(** [find p s] is the first value in [s] satisfying [p] if one
exists and a stream continuation for further ingestion. *)valiter:('a->unitMonad.t)->'at->unitMonad.t(** [iter f s] is activated after the application of [f] to each
element of [s]. *)valto_list:'at->'alistMonad.t(** [to_list s] is a list with each element of [s]. {b Warning:}
this function may result in {i many} successive API transactions. *)valof_list:'alist->'at(** [of_list l] is a stream with each element of [l].
Occasionally, it is useful to write interfaces which operate
generically on streams. [of_list] allows you to use list
values with those interfaces. *)valpoll:'at->'atoptionMonad.t(** [poll stream] is a stream with items newer than [stream]'s
items and will not resolve until any timeouts indicated by
GitLab have elapsed. By default, GitLab throttles polling
requests to once per minute per URL endpoint. *)valsince:'at->Endpoint.Version.t->'at(** [since stream version] is [stream] with [version] but without
any other change, i.e. the stream is not reset to its
beginning. Used in conjunction with [poll], [since] enables
low-cost conditional re-synchronization of local state with
GitLab state. *)valversion:'at->Endpoint.Version.toption(** [version stream] is the version of [stream] if one is
known. After any stream element is forced, the stream version
will be available unless GitLab violates its API specification. *)end(** Perform GitLab API requests. *)moduleAPI:sigvalcode_handler:expected_code:Cohttp.Code.status_code->'a->'ahandler(** [code_handler ~expected_code parse] is a response handler that
fires for responses with status [expected_code] and applies
[parse]. *)valget:?fail_handlers:'aparsehandlerlist->?expected_code:Cohttp.Code.status_code->?headers:Cohttp.Header.t->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aparse->'aResponse.tMonad.t(** [get ?rate ?fail_handlers ?expected_code ?headers ?token
?params uri p] is the [p]-parsed response to a GitLab API HTTP
GET request to [uri] with extra query parameters [params] and
extra headers [headers]. If [token] is supplied, it will be
used instead of any token bound into the monad. [p] will only
fire if the response status is [expected_code] which defaults
to [200 OK]. If the response status is not [expected_code],
[fail_handlers], if any, will be checked in the order
supplied. The [rate] parameter determines which rate limit
accounting regime will be used for caching rate limit values
in response headers. *)valget_stream:?fail_handlers:'aStream.parsehandlerlist->?expected_code:Cohttp.Code.status_code->?headers:Cohttp.Header.t->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aStream.parse->'aStream.t(** [get_stream uri stream_p] is the {!Stream.t} encapsulating
lazy [stream_p]-parsed responses to GitLab API HTTP GET
requests to [uri] and
{{:https://docs.gitlab.com/ee/api/index.html#pagination}its
successors}. For an explanation of the other
parameters, see {!get}. *)valpost:?fail_handlers:'aparsehandlerlist->expected_code:Cohttp.Code.status_code->?headers:Cohttp.Header.t->?body:string->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aparse->'aResponse.tMonad.t(** [post uri p] is the [p]-parsed response to a GitLab API HTTP
POST request to [uri]. For an explanation of the other
parameters, see {!get}. *)valdelete:?fail_handlers:'aparsehandlerlist->?expected_code:Cohttp.Code.status_code->?headers:Cohttp.Header.t->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aparse->'aResponse.tMonad.t(** [delete uri p] is the [p]-parsed response to a GitLab API HTTP
DELETE request to [uri]. For an explanation of the other
parameters, see {!get}. *)valpatch:?fail_handlers:'aparsehandlerlist->expected_code:Cohttp.Code.status_code->?headers:Cohttp.Header.t->?body:string->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aparse->'aResponse.tMonad.t(** [patch uri p] is the [p]-parsed response to a GitLab API HTTP
PATCH request to [uri]. For an explanation of the other
parameters, see {!get}. *)valput:?fail_handlers:'aparsehandlerlist->expected_code:Cohttp.Code.status_code->?headers:Cohttp.Header.t->?body:string->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aparse->'aResponse.tMonad.t(** [put uri p] is the [p]-parsed response to a GitLab API HTTP
PUT request to [uri]. For an explanation of the other
parameters, see {!get}. *)valset_user_agent:string->unitMonad.t(** [set_user_agent ua] contains monadic state that will cause
bound requests to use the [User-Agent] header value of [ua]. *)valset_token:Token.t->unitMonad.t(** [set_token token] contains monadic state that will cause bound
requests to use [token] for authentication by default. This
function enables the creation of large, generic monadic
compositions that do not have to be parameterized by
authentication token. *)valget_rate:?token:Token.t->unit->ratesMonad.t(** [get_rate ()] is the cached rate limit information. *)valget_rate_limit:?token:Token.t->unit->intoptionMonad.t(** [get_rate_limit ()] is the cached total request quota for the current token. *)valget_rate_remaining:?token:Token.t->unit->intoptionMonad.t(** [get_rate_remaining ()] is the cached remaining request quota for the current token. *)valget_rate_reset:?token:Token.t->unit->floatoptionMonad.t(** [get_rate_reset ()] is the cached, UNIX
epoch expiry time (s) when the remaining request quota will be
reset to the total request quota for the current token. *)valstring_of_message:Gitlab_t.message->string(** [string_of_message message] is the English language error
message that GitLab generated in [message]. *)end(** User contribution {{:https://docs.gitlab.com/ee/api/events.html}events}.
*)moduleEvent:sigvalall:token:Token.t->?before:string->?after:string->?scope:string->?sort:Gitlab_t.sort->?target_type:Gitlab_t.event_target_type->?action:Gitlab_t.event_action_type->unit->Gitlab_t.eventsResponse.tMonad.t(** [all ~token] get a list of events for the authenticated user.
See {{:https://docs.gitlab.com/ee/api/events.html#list-currently-authenticated-users-events}List currently authenticated user’s events}
*)end(** The [User] module provides access to {{:https://docs.gitlab.com/14.0/ee/api/users.html}User API}.
*)moduleUser:sigvalby_id:id:string->unit->Gitlab_t.userResponse.tMonad.t(** [by_id ~id ()] is the user information for user [id].
See {{:https://docs.gitlab.com/14.0/ee/api/users.html#for-user}Single User}.
*)valby_name:name:string->unit->Gitlab_t.usersResponse.tMonad.t(** [by_name ~name ()] search for user by [name].
See {{:https://docs.gitlab.com/14.0/ee/api/users.html#for-user}List Users}.
*)valcurrent_user:token:Token.t->unit->Gitlab_t.current_userResponse.tMonad.t(** [current_user ~token ()] is the current user for [token].
See {{:https://docs.gitlab.com/ee/api/users.html#list-current-user-for-normal-users}Current Authenticated User.}
*)valprojects:id:string->unit->Gitlab_t.projects_shortResponse.tMonad.t(** [projects ~id ()] list user projects for user [id].
See {{:https://docs.gitlab.com/14.0/ee/api/projects.html#list-user-projects}List User Projects}.
*)valmerge_requests:token:Token.t->?state:Gitlab_t.state->?milestone:string->?labels:stringlist->?author:string->?author_username:string->?my_reaction:string->?scope:Gitlab_t.merge_request_scope->unit->Gitlab_t.merge_requestStream.t(** [merge_requests ()] list all merge requests the authenticated user has access to.
See {{:https://docs.gitlab.com/14.0/ee/api/merge_requests.html#list-merge-requests}List merge requests}.
*)valissues:token:Token.t->?state:Gitlab_t.state->?assignee:string->?assignee_username:string->?milestone:string->?labels:stringlist->?author:string->?author_username:string->?scope:Gitlab_t.merge_request_scope->unit->Gitlab_t.issueStream.t(** [issues ~token ()] returns a list of project issues.
See {{:https://docs.gitlab.com/ee/api/issues.html#list-issues}List issues}.
*)valevents:token:Token.t->id:string->?action:Gitlab_t.event_action_type->?target_type:Gitlab_t.event_target_type->?per_page:int->?after:string->?sort:Gitlab_t.sort->unit->Gitlab_t.eventStream.t(** [events ~token ~id] get the contribution events for the specified user.
See {{:https://docs.gitlab.com/ee/api/events.html#get-user-contribution-events}Get user contribution events}.
*)(** Personal access tokens for {! User} authentication.
They may be used to:
{ul {- Authenticate with the GitLab API.}
{- Authenticate with Git using HTTP Basic Authentication.}}
*)modulePersonalAccessToken:sigvaltokens:token:Token.t->?user_id:int->unit->Gitlab_t.personal_access_tokensResponse.tMonad.t(** [person_access_tokens ~token ?user_id ()] get the Personal Access Tokens for the current user. Administrators can use the [~user_id] parameter to filter by user.
See {{:https://docs.gitlab.com/ee/api/personal_access_tokens.html#list-personal-access-tokens}List personal access tokens}.
*)valrevoke:token:Token.t->id:int->unit->unitResponse.tMonad.t(** [revoke_person_access_tokens ~token ~id] Revoke a personal access token.
See {{:https://docs.gitlab.com/ee/api/personal_access_tokens.html#revoke-a-personal-access-token}Revoke a personal access token}.
*)valcreate:token:Token.t->user_id:int->Gitlab_t.new_token->unit->Gitlab_t.personal_access_tokenResponse.tMonad.t(** Create a personal access token for [~user_id]. See {{:https://docs.gitlab.com/ee/api/users.html#create-a-personal-access-token}Create a personal access token}.
*)endend(** The [Project] module provides access to {{:https://docs.gitlab.com/ee/api/projects.html}Project API}. *)moduleProject:sigvalcreate:token:Token.t->name:string->?description:string->unit->Gitlab_t.project_shortResponse.tMonad.t(** [create ~token ~name ?description ()] Creates a new project owned by the authenticated user.
See {{:https://docs.gitlab.com/ee/api/projects.html#create-project}Create project}.
*)valby_name:?token:Token.t->owner:string->name:string->unit->Gitlab_t.projects_shortResponse.tMonad.t(** [by_name ~owner ~name ()] retrieves projects owned by [owner] with a name like [name].
Depending on the [name] used this will return 1 or more matches. Supply a [token] to access private projects.
*)valby_short_ref:?token:Token.t->short_ref:string->unit->Gitlab_t.project_shortoptionResponse.tMonad.t(** [by_short_ref ~short_ref ()] retrieves the project with [short_ref] (a short ref is a string on the
form [<namespace>/<project name>]), returns [None] if the project doesn't
exist.
Supply a [token] to access private projects.
See {{:https://docs.gitlab.com/ee/api/projects.html#get-single-project}Get single project}.
*)valby_id:?token:Token.t->project_id:int->unit->Gitlab_t.project_shortoptionResponse.tMonad.t(** [by_id ~project_id] retrieve the project for [project_id], returns [None] if the project doesn't
exist. Supply a [token] to access private projects.
See {{:https://docs.gitlab.com/ee/api/projects.html#get-single-project}Get a single project}.
*)moduleBranch:sigvalbranches:?token:Token.t->project_id:int->?search:string->unit->Gitlab_t.branch_fullStream.t(** [branches ?token ~project_id] lists repository branches from a project, sorted by name alphabetically.
Supply a [token] to access private projects.
See {{:https://docs.gitlab.com/ee/api/branches.html#list-repository-branches}List repository branches}.
*)valbranch:?token:Token.t->project_id:int->branch:string->unit->Gitlab_t.branch_fullResponse.tMonad.t(** [branch ?token ~name] gets a single project repository branch.
Supply a [token] to access private projects.
See {{:https://docs.gitlab.com/ee/api/branches.html#get-single-repository-branch}Get a single repository branch}.
*)valcreate:token:Token.t->project_id:int->branch:string->ref:string->unit->Gitlab_t.branch_fullResponse.tMonad.t(** [create ~token ~branch ~ref] Create a new branch in the repository.
See {{:https://docs.gitlab.com/ee/api/branches.html#create-repository-branch}Create repository branch}.
*)valdelete:token:Token.t->project_id:int->branch:string->unit->unitResponse.tMonad.t(** [delete ~token ~branch] Delete a branch in the repository.
See {{:https://docs.gitlab.com/ee/api/branches.html#delete-repository-branch}Delete repository branch}.
*)valdelete_merged:token:Token.t->project_id:int->unit->unitResponse.tMonad.t(** [delete ~token ~branch] Delete a branch in the repository.
See {{:https://docs.gitlab.com/ee/api/branches.html#delete-merged-branches}Delete merged repository branches}.
*)endvalpipelines:token:Token.t->project_id:int->?per_page:int->?status:Gitlab_t.pipeline_status->?source:Gitlab_t.pipeline_source->?sha:string->?ref_:string->?username:string->?updated_after:string->?updated_before:string->?sort:Gitlab_t.sort->?order_by:[`Id|`Ref|`Status|`Updated_at|`User_id]->?scope:Gitlab_t.pipeline_scope->unit->Gitlab_t.pipelineStream.t(** [pipelines ~token ~project_id ()] list all pipelines the authenticated user has access to in [project_id].
See {{:https://docs.gitlab.com/ee/api/pipelines.html#list-project-pipelines}List project pipelines}.
*)valpipeline:token:Token.t->project_id:int->pipeline_id:int->unit->Gitlab_t.single_pipelineResponse.tMonad.t(** [pipeline ~token ~project_id ~pipeline_id ()] get one single pipeline [pipeline_id] in [project_id].
See {{:https://docs.gitlab.com/ee/api/pipelines.html#get-a-single-pipeline} Get a single pipeline}.
*)valpipeline_jobs:token:Token.t->project_id:int->?per_page:int->?scope:Gitlab_t.pipeline_job_scope->?include_retried:bool->pipeline_id:int->unit->Gitlab_t.pipeline_jobStream.t(** [pipeline_jobs ~token ~project_id pipeline_id ()] get a list of jobs for
a pipeline [pipeline_id] of a project [project_id].
See {{:https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-jobs}List pipeline jobs}.
*)valjob_trace:token:Token.t->project_id:int->job_id:int->unit->stringoptionResponse.tMonad.t(** [job_trace ~token ~project_id job_id ()] get the log (trace) of a
specific job [job_id] of a project [project-id].
See {{:https://docs.gitlab.com/ee/api/jobs.html#get-a-log-file}Get a log file}.
*)valmerge_requests:?token:Token.t->?state:Gitlab_t.state->?milestone:string->?labels:stringlist->?author:string->?author_username:string->?my_reaction:string->?scope:Gitlab_t.merge_request_scope->?created_after:string->?created_before:string->?updated_after:string->?updated_before:string->?sort:Gitlab_t.sort->?order_by:[`Created_at|`Title|`Updated_at]->?target_branch:string->?wip:bool->?per_page:int->id:int->unit->Gitlab_t.merge_requestStream.t(** [merge_requests ?token ~id ()] list all merge requests for project [id].
See {{:https://docs.gitlab.com/14.0/ee/api/merge_requests.html#list-project-merge-requests}List project merge requests}.
*)valmerge_request:?token:Token.t->project_id:int->merge_request_iid:string->unit->Gitlab_t.merge_requestResponse.tMonad.t(** [merge_request ?token ~project_id ~merge_request_iid ()] shows information about a single merge request.
See {{:https://docs.gitlab.com/14.0/ee/api/merge_requests.html#get-single-mr}Get single merge request}.
*)valmerge_request_participants:?token:Token.t->project_id:int->merge_request_iid:string->unit->Gitlab_t.usersResponse.tMonad.t(** [merge_request_participants ?token ~project_id ~merge_request_iid ()] gets a list of merge request participants.
See {{:https://docs.gitlab.com/14.0/ee/api/merge_requests.html#get-single-mr-participants}Get a list of merge request participants}.
*)valmerge_request_commits:?token:Token.t->project_id:int->merge_request_iid:string->unit->Gitlab_t.commitsResponse.tMonad.t(** [merge_request_commits ?token ~project_id ~merge_request_iid ()] gets a list of merge request commits.
See {{:https://docs.gitlab.com/14.0/ee/api/merge_requests.html#get-single-mr-commits}Get single merge request commits}.
*)valmerge_request_changes:?token:Token.t->project_id:int->merge_request_iid:string->unit->Gitlab_t.changesResponse.tMonad.t(** [merge_request_changes ?token ~project_id ~merge_request_iid ()] shows information about the merge request including its files and changes.
See {{:https://docs.gitlab.com/ee/api/merge_requests.html#get-single-mr-changes}Get single MR changes}.
*)valmerge_request_pipelines:?token:Token.t->project_id:int->merge_request_iid:int->unit->Gitlab_t.pipelineStream.t(** [merge_request_pipelines ?token ~project_id ~merge_request_iid ()] gets a list of merge request pipelines.
See {{:https://docs.gitlab.com/ee/api/merge_requests.html#list-mr-pipelines}List MR pipelines }.
*)valevents:token:Token.t->project_id:int->?action:Gitlab_t.event_action_type->?target_type:Gitlab_t.event_target_type->unit->Gitlab_t.eventsResponse.tMonad.t(** [events ~project_id] get visible events for a project.
See {{:https://docs.gitlab.com/ee/api/events.html#list-a-projects-visible-events}List a projects visible events}.
*)valall_projects:token:Token.t->?owned:bool->?search:string->?with_programming_language:string->unit->Gitlab_t.project_shortStream.t(** [all_projects ~token ()] Get a list of all visible projects across GitLab for the authenticated user.
See {{:https://docs.gitlab.com/ee/api/projects.html#list-all-projects}List all projects}.
*)(** External Status Checks API. {{:https://docs.gitlab.com/ee/api/status_checks.html}} *)moduleExternalStatusCheck:sigvallist_for_merge_request:token:Token.t->project_id:int->merge_request_iid:string->unit->Gitlab_t.status_checksResponse.tMonad.t(** [list_for_merge_request ~project_id ~merge_request_iid] For a single merge request, list the external status checks that apply to it and their status.
See {{:https://docs.gitlab.com/ee/api/status_checks.html#list-status-checks-for-a-merge-request}List status checks for a merge request}.
*)valset_status:token:Token.t->project_id:int->merge_request_iid:string->sha:string->external_status_check_id:string->unit->Gitlab_t.external_status_checkResponse.tMonad.t(** [set_status ~project_id ~merge_request_iid ~sha ~external_status_check_id] For a single merge request, use the API to inform GitLab that a merge request has passed a check by an external service.
See {{:https://docs.gitlab.com/ee/api/status_checks.html#set-status-of-an-external-status-check}Set status of an external status check}.
*)valchecks:token:Token.t->project_id:int->unit->Gitlab_t.external_status_checksResponse.tMonad.t(** [checks ~project_id ] request project's external status checks.
See {{:https://docs.gitlab.com/ee/api/status_checks.html#get-project-external-status-checks}Get project external status checks}.
*)valcreate:token:Token.t->project_id:int->name:string->external_url:string->?protected_branch_ids:intlist->unit->Gitlab_t.external_status_checkResponse.tMonad.t(** [create ] create a new external status check for a project.
See {{:https://docs.gitlab.com/ee/api/status_checks.html#create-external-status-check}Create external status check}.
*)valdelete:token:Token.t->project_id:int->rule_id:int->unit->unitResponse.tMonad.t(** [delete ~project_id ~rule_id] an external status check for a project.
See {{:https://docs.gitlab.com/ee/api/status_checks.html#delete-external-status-check}Delete external status check}.
*)valupdate:token:Token.t->project_id:int->rule_id:int->?name:string->?external_url:string->?protected_branch_ids:intlist->unit->Gitlab_t.external_status_checkResponse.tMonad.t(** [update ~project_id ~rule_id] an external status check for a project.
See {{:https://docs.gitlab.com/ee/api/status_checks.html#update-external-status-check}Update external status check}.
*)end(** [Commit] operates on a repository's {{:https://docs.gitlab.com/ee/api/commits.html}commits}. *)moduleCommit:sigvalcommits:?token:Token.t->project_id:int->?ref_name:string->?since:string->?until:string->?path:string->?all:bool->unit->Gitlab_t.commitStream.t(** [commits ?token ~project_id ()] list all commits for a project.
See {{:https://docs.gitlab.com/ee/api/commits.html#list-repository-commits}List repository commits}.
*)valcommit:?token:Token.t->project_id:int->sha:string->?stats:bool->unit->Gitlab_t.commitResponse.tMonad.t(** [commit ?token ~project_id ~sha] get a specified commit by the commit hash or name of a branch or tag.
See {{:https://docs.gitlab.com/ee/api/commits.html#get-a-single-commit}Get a single commit}.
*)valcomments:?token:Token.t->project_id:int->sha:string->unit->Gitlab_t.commit_commentStream.t(** [comments ?token ~project_id ~sha] get comments of a commit.
See {{:https://docs.gitlab.com/ee/api/commits.html#get-the-comments-of-a-commit}Get the comments of a commit}.
*)valcomment:?token:Token.t->project_id:int->sha:string->Gitlab_t.new_comment->unit->Gitlab_t.commit_commentedResponse.tMonad.t(** [comment ~token ~project_id ~sha ~new_comment] adds a comment to a commit.
See {{:https://docs.gitlab.com/ee/api/commits.html#post-comment-to-commit}Post comment to a commit}.
*)valstatuses:?token:Token.t->project_id:int->sha:string->?ref_name:string->?stage:string->?name:string->?all:bool->unit->Gitlab_t.commit_statusStream.t(** [statuses ~token ~project_id ~sha] lists the statuses of a commit.
See {{:https://docs.gitlab.com/ee/api/commits.html#list-the-statuses-of-a-commit}List the statuses of a commit in a project}.
*)valstatus:token:Token.t->project_id:int->sha:string->Gitlab_t.new_status->unit->Gitlab_t.commit_statusResponse.tMonad.t(** [status ~token ~project_id ~sha ~state] adds or updates the build status of a commit.
See {{:https://docs.gitlab.com/ee/api/commits.html#post-the-build-status-to-a-commit}Post the build status to a commit}.
*)end(** [Milestone] operates on a [Project]'s milestones.
There is a separate Group [Milestone] module.
*)moduleMilestone:sigvalmilestones:?token:Token.t->project_id:int->?state:Gitlab_t.milestone_state->?title:string->?search:string->unit->Gitlab_t.milestonesResponse.tMonad.t(** [milestones ~project_id] returns a list of project milestones.
See {{:https://docs.gitlab.com/ee/api/milestones.html#list-project-milestones}List project milestones}.
*)valmilestone:?token:Token.t->project_id:int->milestone_id:int->unit->Gitlab_t.milestoneResponse.tMonad.t(** [milestone ~project_id ~milestone_id] get a single project milestone.
See {{:https://docs.gitlab.com/ee/api/milestones.html#get-single-milestone}Get a single milestone}.
*)valcreate:token:Token.t->project_id:int->Gitlab_t.new_milestone->unit->Gitlab_t.milestoneResponse.tMonad.t(** [create ~project_id ~title] create a project milestone.
See {{:https://docs.gitlab.com/ee/api/milestones.html#create-new-milestone}Create a new milestone}.
*)valupdate:token:Token.t->project_id:int->milestone_id:int->?title:string->?description:string->?due_date:string->?start_date:string->?state_event:Gitlab_t.milestone_state->unit->Gitlab_t.milestoneResponse.tMonad.t(** [update ~project_id ~milestone_id] update an existing milestone.
See {{:https://docs.gitlab.com/ee/api/milestones.html#edit-milestone}Edit a milestone}.
*)valdelete:token:Token.t->project_id:int->milestone_id:int->unit->unitResponse.tMonad.t(** [delete ~project_id ~milestone_id] delete a project milestone.
See {{:https://docs.gitlab.com/ee/api/milestones.html#delete-project-milestone}Delete a milestone}.
*)end(** Project access tokens for {! Project} authentication.
They may be used to:
{ul {- Authenticate with the GitLab API.}
{- Authenticate with Git using HTTP Basic Authentication.}}
*)moduleProjectAccessToken:sigvaltokens:token:Token.t->project_id:int->unit->Gitlab_t.project_access_tokensResponse.tMonad.t(** [tokens ~token ?project_id ()] get the Project Access Tokens for [~project_id].
See {{:https://docs.gitlab.com/ee/api/resource_access_tokens.html#list-project-access-tokens}List project access tokens}.
*)valrevoke:token:Token.t->project_id:int->id:int->unit->unitResponse.tMonad.t(** [revoke ~token ~id] Revoke a project access token.
See {{:https://docs.gitlab.com/ee/api/resource_access_tokens.html#revoke-a-project-access-token}Revoke a project access token}.
*)valcreate:token:Token.t->project_id:int->Gitlab_t.new_token->unit->Gitlab_t.project_access_tokenResponse.tMonad.t(** Create a project access token for [~project_id]. See {{:https://docs.gitlab.com/ee/api/resource_access_tokens.html#create-a-project-access-token}Create a project access token}.
*)endmoduleIssue:sigvallist:?token:Token.t->project_id:int->unit->Gitlab_t.issueStream.t(** [list ?token ~project_id] Request a list of a project’s issues.
See {{:https://docs.gitlab.com/ee/api/issues.html#list-project-issues}List project issues}.
*)valby_id:?token:Token.t->project_id:int->issue_id:int->unit->Gitlab_t.issueResponse.tMonad.t(** [by_id ?token ~project_id ~issue_id] Get a single project issue.
See {{:https://docs.gitlab.com/ee/api/issues.html#single-project-issue}Single project issue}.
*)valcreate:token:Token.t->project_id:int->Gitlab_t.create_issue->unit->Gitlab_t.issueResponse.tMonad.t(** Creates a new issue.
See {{:https://docs.gitlab.com/ee/api/issues.html#new-issue}New issue}.
*)endmoduleHook:sigvallist:?token:Token.t->project_id:int->unit->Gitlab_t.project_hooksResponse.tMonad.t(** [list ?token ~project_id] Request a list of a project’s hooks.
See {{:https://docs.gitlab.com/ee/api/projects.html#list-project-hooks}List project hooks}.
*)valby_id:?token:Token.t->project_id:int->hook_id:int->unit->Gitlab_t.project_hookResponse.tMonad.t(** [by_id ?token ~project_id ~hook_id] Get a single project hook.
See {{:https://docs.gitlab.com/ee/api/projects.html#get-project-hook}Get project hook}.
*)valcreate:token:Token.t->project_id:int->Gitlab_t.create_project_hook->unit->Gitlab_t.project_hookResponse.tMonad.t(** Creates a new webhook.
See {{:https://docs.gitlab.com/ee/api/projects.html#add-project-hook}Add project hook}.
*)end(** The [Notes] module provides access to
{{:https://docs.gitlab.com/ee/api/notes.html#merge-requests}Notes
API}.
*)moduleNotes:sig(** The [Merge_request] module provides access to
{{:https://docs.gitlab.com/ee/api/notes.html#merge-requests}Merge
requests notes API}.
*)moduleMerge_request:sigvallist:?token:Token.t->project_id:int->merge_request_iid:string->?sort:Gitlab_t.sort->unit->Gitlab_t.noteStream.t(** [list ?token ~project_id ~merge_request_iid]
Request a list of a merge request notes. See
{{:https://docs.gitlab.com/ee/api/notes.html#list-all-merge-request-notes}List
all merge request notes}.
*)valby_id:?token:Token.t->project_id:int->merge_request_iid:string->note_id:int->unit->Gitlab_t.noteResponse.tMonad.t(** [by_id ?token ~project_id ~merge_request_iid ~note_id]
Get a single note for a given merge request. See
{{:https://docs.gitlab.com/ee/api/notes.html#get-single-merge-request-note}Get
single merge request note}.
*)valcreate:token:Token.t->project_id:int->merge_request_iid:string->create_note:Gitlab_t.create_note->unit->Gitlab_t.noteResponse.tMonad.t(** [create ?token ~project_id ~merge_request_iid ~create_note]
Creates a new note. See
{{:https://docs.gitlab.com/ee/api/notes.html#create-new-merge-request-note}Create
new merge request note}.
*)valupdate:token:Token.t->project_id:int->merge_request_iid:string->note_id:int->body:string->unit->Gitlab_t.noteResponse.tMonad.t(** [update ?token ~project_id ~merge_request_iid ~note_id ~body]
Updates a note. See
{{:https://docs.gitlab.com/ee/api/notes.html#modify-existing-merge-request-note}Modify
existing note of a merge request}.
*)valdelete:token:Token.t->project_id:int->merge_request_iid:string->note_id:int->unit->unitResponse.tMonad.t(** [delete ?token ~project_id ~merge_request_iid ~note_id]
Deletes a note. See
{{:https://docs.gitlab.com/ee/api/notes.html#delete-a-merge-request-note}Delete
a merge request note}.
*)endendend(** The [Group] module provides access to {{:https://docs.gitlab.com/ee/api/groups.html}Group API}. *)moduleGroup:sigmoduleProject:sigvalby_name:?token:Token.t->owner:string->name:string->unit->Gitlab_t.projects_shortResponse.tMonad.t(** [by_name ~group ~name ()] retrieves projects owned by [group] with a name like [name].
Depending on the [name] used this will return 1 or more matches. Supply a [token] to access private projects.
There is no direct fetch by name API in GitLab.
*)endvalmerge_requests:?token:Token.t->?state:Gitlab_t.state->?milestone:string->?labels:stringlist->?author:string->?author_username:string->?my_reaction:string->?scope:Gitlab_t.merge_request_scope->id:string->unit->Gitlab_t.merge_requestStream.t(** [merge_requests ?token ~id ()] list all merge requests for group [id].
See {{:https://docs.gitlab.com/14.0/ee/api/merge_requests.html#list-group-merge-requests}List group merge requests}.
*)(** [Milestone] operates on a [Group]'s milestones. *)moduleMilestone:sigvalmilestones:?token:Token.t->group_id:int->?state:Gitlab_t.milestone_state->?title:string->?search:string->unit->Gitlab_t.milestonesResponse.tMonad.t(** [milestones ~group_id] returns a list of group milestones.
See {{:https://docs.gitlab.com/ee/api/milestones.html#list-group-milestones}List group milestones}.
*)valmilestone:?token:Token.t->group_id:int->milestone_id:int->unit->Gitlab_t.milestoneResponse.tMonad.t(** [milestone ~group_id ~milestone_id] get a single group milestone.
See {{:https://docs.gitlab.com/ee/api/milestones.html#get-single-milestone}Get a single milestone}.
*)valcreate:token:Token.t->group_id:int->Gitlab_t.new_milestone->unit->Gitlab_t.milestoneResponse.tMonad.t(** [create ~group_id ~title] create a group milestone.
See {{:https://docs.gitlab.com/ee/api/milestones.html#create-new-milestone}Create a new milestone}.
*)valupdate:token:Token.t->group_id:int->milestone_id:int->?title:string->?description:string->?due_date:string->?start_date:string->?state_event:Gitlab_t.milestone_state->unit->Gitlab_t.milestoneResponse.tMonad.t(** [update ~group_id ~milestone_id] update an existing milestone.
See {{:https://docs.gitlab.com/ee/api/milestones.html#edit-milestone}Edit a milestone}.
*)valdelete:token:Token.t->group_id:int->milestone_id:int->unit->unitResponse.tMonad.t(** [delete ~group_id ~milestone_id] delete a group milestone.
See {{:https://docs.gitlab.com/ee/api/milestones.html#delete-group-milestone}Delete a milestone}.
*)end(** [Issue] operates on a [Group]'s issues.
There is a separate [User] and [Project] issue module.
*)moduleIssue:sigvalissues:token:Token.t->group_id:int->?state:Gitlab_t.state->?assignee:string->?assignee_username:string->?milestone:string->?labels:stringlist->?author:string->?author_username:string->?scope:Gitlab_t.merge_request_scope->unit->Gitlab_t.issueStream.t(** [issues ~token ~group_id ()] returns a list of group issues.
See {{:https://docs.gitlab.com/ee/api/issues.html#list-group-issues}List group issues}.
*)endend(** The [Runners] module provides access to {{:https://docs.gitlab.com/ee/api/runners.html}Runners API}.
*)moduleRunners:sigvallist:token:Token.t->unit->Gitlab_t.runnersResponse.tMonad.t(** [list ~token] Get a list of specific runners available to the user.*)endend(** A module of this type is required in order to construct a
{!Gitlab} module using {!Gitlab_core.Make}. *)moduletypeEnv=sigvaldebug:bool(** [debug] is the initial debugging flag value. *)valgitlab_uri:string(** [gitlab_uri] is the gitlab instance to connect to. *)end(** A module of this type is required in order to construct a
{!Gitlab} module using {!Gitlab_core.Make}. *)moduletypeTime=sigvalnow:unit->float(** [now ()] is the current UNIX epoch time in seconds. *)valsleep:float->unitLwt.t(** [sleep sec] activates after [sec] seconds have elapsed. *)end