GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi
gitlab.getProjectMergeRequest
Explore with Pulumi AI
The gitlab.getProjectMergeRequest
data source retrieves
information about a single merge request related to a specific project.
Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const byProjectId = gitlab.getProjectMergeRequest({
project: "123",
iid: 456,
});
const byProjectName = gitlab.getProjectMergeRequest({
project: "company/group/project1",
iid: 3,
});
import pulumi
import pulumi_gitlab as gitlab
by_project_id = gitlab.get_project_merge_request(project="123",
iid=456)
by_project_name = gitlab.get_project_merge_request(project="company/group/project1",
iid=3)
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.GetProjectMergeRequest(ctx, &gitlab.GetProjectMergeRequestArgs{
Project: "123",
Iid: 456,
}, nil)
if err != nil {
return err
}
_, err = gitlab.GetProjectMergeRequest(ctx, &gitlab.GetProjectMergeRequestArgs{
Project: "company/group/project1",
Iid: 3,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var byProjectId = GitLab.GetProjectMergeRequest.Invoke(new()
{
Project = "123",
Iid = 456,
});
var byProjectName = GitLab.GetProjectMergeRequest.Invoke(new()
{
Project = "company/group/project1",
Iid = 3,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetProjectMergeRequestArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var byProjectId = GitlabFunctions.getProjectMergeRequest(GetProjectMergeRequestArgs.builder()
.project("123")
.iid(456)
.build());
final var byProjectName = GitlabFunctions.getProjectMergeRequest(GetProjectMergeRequestArgs.builder()
.project("company/group/project1")
.iid(3)
.build());
}
}
variables:
byProjectId:
fn::invoke:
Function: gitlab:getProjectMergeRequest
Arguments:
project: '123'
iid: 456
byProjectName:
fn::invoke:
Function: gitlab:getProjectMergeRequest
Arguments:
project: company/group/project1
iid: 3
Using getProjectMergeRequest
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getProjectMergeRequest(args: GetProjectMergeRequestArgs, opts?: InvokeOptions): Promise<GetProjectMergeRequestResult>
function getProjectMergeRequestOutput(args: GetProjectMergeRequestOutputArgs, opts?: InvokeOptions): Output<GetProjectMergeRequestResult>
def get_project_merge_request(iid: Optional[float] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProjectMergeRequestResult
def get_project_merge_request_output(iid: Optional[pulumi.Input[float]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProjectMergeRequestResult]
func GetProjectMergeRequest(ctx *Context, args *GetProjectMergeRequestArgs, opts ...InvokeOption) (*GetProjectMergeRequestResult, error)
func GetProjectMergeRequestOutput(ctx *Context, args *GetProjectMergeRequestOutputArgs, opts ...InvokeOption) GetProjectMergeRequestResultOutput
> Note: This function is named GetProjectMergeRequest
in the Go SDK.
public static class GetProjectMergeRequest
{
public static Task<GetProjectMergeRequestResult> InvokeAsync(GetProjectMergeRequestArgs args, InvokeOptions? opts = null)
public static Output<GetProjectMergeRequestResult> Invoke(GetProjectMergeRequestInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectMergeRequestResult> getProjectMergeRequest(GetProjectMergeRequestArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gitlab:index/getProjectMergeRequest:getProjectMergeRequest
arguments:
# arguments dictionary
The following arguments are supported:
getProjectMergeRequest Result
The following output properties are available:
- Assignee
Pulumi.
Git Lab. Outputs. Get Project Merge Request Assignee - First assignee of the merge request.
- Assignees
List<Pulumi.
Git Lab. Outputs. Get Project Merge Request Assignee> - Assignees of the merge request.
- Pulumi.
Git Lab. Outputs. Get Project Merge Request Author - User who created this merge request.
- Blocking
Discussions boolResolved - Indicates if all discussions are resolved only if all are required before merge request can be merged.
- Changes
Count string - Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
- Closed
At string - Timestamp of when the merge request was closed.
- Closed
By Pulumi.Git Lab. Outputs. Get Project Merge Request Closed By - User who closed this merge request.
- Created
At string - Timestamp of when the merge request was created.
- Id double
- The unique instance level ID of the merge request.
- Iid double
- The unique project level ID of the merge request.
- Project string
- The ID or path of the project.
- Assignee
Get
Project Merge Request Assignee - First assignee of the merge request.
- Assignees
[]Get
Project Merge Request Assignee - Assignees of the merge request.
- Get
Project Merge Request Author - User who created this merge request.
- Blocking
Discussions boolResolved - Indicates if all discussions are resolved only if all are required before merge request can be merged.
- Changes
Count string - Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
- Closed
At string - Timestamp of when the merge request was closed.
- Closed
By GetProject Merge Request Closed By - User who closed this merge request.
- Created
At string - Timestamp of when the merge request was created.
- Id float64
- The unique instance level ID of the merge request.
- Iid float64
- The unique project level ID of the merge request.
- Project string
- The ID or path of the project.
- assignee
Get
Project Merge Request Assignee - First assignee of the merge request.
- assignees
List<Get
Project Merge Request Assignee> - Assignees of the merge request.
- Get
Project Merge Request Author - User who created this merge request.
- blocking
Discussions BooleanResolved - Indicates if all discussions are resolved only if all are required before merge request can be merged.
- changes
Count String - Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
- closed
At String - Timestamp of when the merge request was closed.
- closed
By GetProject Merge Request Closed By - User who closed this merge request.
- created
At String - Timestamp of when the merge request was created.
- id Double
- The unique instance level ID of the merge request.
- iid Double
- The unique project level ID of the merge request.
- project String
- The ID or path of the project.
- assignee
Get
Project Merge Request Assignee - First assignee of the merge request.
- assignees
Get
Project Merge Request Assignee[] - Assignees of the merge request.
- Get
Project Merge Request Author - User who created this merge request.
- blocking
Discussions booleanResolved - Indicates if all discussions are resolved only if all are required before merge request can be merged.
- changes
Count string - Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
- closed
At string - Timestamp of when the merge request was closed.
- closed
By GetProject Merge Request Closed By - User who closed this merge request.
- created
At string - Timestamp of when the merge request was created.
- id number
- The unique instance level ID of the merge request.
- iid number
- The unique project level ID of the merge request.
- project string
- The ID or path of the project.
- assignee
Get
Project Merge Request Assignee - First assignee of the merge request.
- assignees
Sequence[Get
Project Merge Request Assignee] - Assignees of the merge request.
- Get
Project Merge Request Author - User who created this merge request.
- blocking_
discussions_ boolresolved - Indicates if all discussions are resolved only if all are required before merge request can be merged.
- changes_
count str - Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
- closed_
at str - Timestamp of when the merge request was closed.
- closed_
by GetProject Merge Request Closed By - User who closed this merge request.
- created_
at str - Timestamp of when the merge request was created.
- id float
- The unique instance level ID of the merge request.
- iid float
- The unique project level ID of the merge request.
- project str
- The ID or path of the project.
- assignee Property Map
- First assignee of the merge request.
- assignees List<Property Map>
- Assignees of the merge request.
- Property Map
- User who created this merge request.
- blocking
Discussions BooleanResolved - Indicates if all discussions are resolved only if all are required before merge request can be merged.
- changes
Count String - Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
- closed
At String - Timestamp of when the merge request was closed.
- closed
By Property Map - User who closed this merge request.
- created
At String - Timestamp of when the merge request was created.
- id Number
- The unique instance level ID of the merge request.
- iid Number
- The unique project level ID of the merge request.
- project String
- The ID or path of the project.
Supporting Types
GetProjectMergeRequestAssignee
GetProjectMergeRequestAuthor
GetProjectMergeRequestClosedBy
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.