1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getProjectMergeRequest
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

gitlab.getProjectMergeRequest

Explore with Pulumi AI

gitlab logo
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

    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:

    Iid double
    The unique project level ID of the merge request.
    Project string
    The ID or path of the project.
    Iid float64
    The unique project level ID of the merge request.
    Project string
    The ID or path of the project.
    iid Double
    The unique project level ID of the merge request.
    project String
    The ID or path of the project.
    iid number
    The unique project level ID of the merge request.
    project string
    The ID or path of the project.
    iid float
    The unique project level ID of the merge request.
    project str
    The ID or path of the project.
    iid Number
    The unique project level ID of the merge request.
    project String
    The ID or path of the project.

    getProjectMergeRequest Result

    The following output properties are available:

    Assignee Pulumi.GitLab.Outputs.GetProjectMergeRequestAssignee
    First assignee of the merge request.
    Assignees List<Pulumi.GitLab.Outputs.GetProjectMergeRequestAssignee>
    Assignees of the merge request.
    Author Pulumi.GitLab.Outputs.GetProjectMergeRequestAuthor
    User who created this merge request.
    BlockingDiscussionsResolved bool
    Indicates if all discussions are resolved only if all are required before merge request can be merged.
    ChangesCount string
    Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
    ClosedAt string
    Timestamp of when the merge request was closed.
    ClosedBy Pulumi.GitLab.Outputs.GetProjectMergeRequestClosedBy
    User who closed this merge request.
    CreatedAt 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 GetProjectMergeRequestAssignee
    First assignee of the merge request.
    Assignees []GetProjectMergeRequestAssignee
    Assignees of the merge request.
    Author GetProjectMergeRequestAuthor
    User who created this merge request.
    BlockingDiscussionsResolved bool
    Indicates if all discussions are resolved only if all are required before merge request can be merged.
    ChangesCount string
    Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
    ClosedAt string
    Timestamp of when the merge request was closed.
    ClosedBy GetProjectMergeRequestClosedBy
    User who closed this merge request.
    CreatedAt 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 GetProjectMergeRequestAssignee
    First assignee of the merge request.
    assignees List<GetProjectMergeRequestAssignee>
    Assignees of the merge request.
    author GetProjectMergeRequestAuthor
    User who created this merge request.
    blockingDiscussionsResolved Boolean
    Indicates if all discussions are resolved only if all are required before merge request can be merged.
    changesCount String
    Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
    closedAt String
    Timestamp of when the merge request was closed.
    closedBy GetProjectMergeRequestClosedBy
    User who closed this merge request.
    createdAt 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 GetProjectMergeRequestAssignee
    First assignee of the merge request.
    assignees GetProjectMergeRequestAssignee[]
    Assignees of the merge request.
    author GetProjectMergeRequestAuthor
    User who created this merge request.
    blockingDiscussionsResolved boolean
    Indicates if all discussions are resolved only if all are required before merge request can be merged.
    changesCount string
    Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
    closedAt string
    Timestamp of when the merge request was closed.
    closedBy GetProjectMergeRequestClosedBy
    User who closed this merge request.
    createdAt 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 GetProjectMergeRequestAssignee
    First assignee of the merge request.
    assignees Sequence[GetProjectMergeRequestAssignee]
    Assignees of the merge request.
    author GetProjectMergeRequestAuthor
    User who created this merge request.
    blocking_discussions_resolved bool
    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 GetProjectMergeRequestClosedBy
    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.
    author Property Map
    User who created this merge request.
    blockingDiscussionsResolved Boolean
    Indicates if all discussions are resolved only if all are required before merge request can be merged.
    changesCount String
    Number of changes made on the merge request. Empty when the merge request is created, and populates asynchronously.
    closedAt String
    Timestamp of when the merge request was closed.
    closedBy Property Map
    User who closed this merge request.
    createdAt 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

    AvatarUrl string
    A link to the user's avatar image.
    Id double
    The internal ID number of the user.
    Name string
    The name of the user.
    State string
    The state of the user account.
    Username string
    The username of the user.
    WebUrl string
    A link to the user's profile page.
    AvatarUrl string
    A link to the user's avatar image.
    Id float64
    The internal ID number of the user.
    Name string
    The name of the user.
    State string
    The state of the user account.
    Username string
    The username of the user.
    WebUrl string
    A link to the user's profile page.
    avatarUrl String
    A link to the user's avatar image.
    id Double
    The internal ID number of the user.
    name String
    The name of the user.
    state String
    The state of the user account.
    username String
    The username of the user.
    webUrl String
    A link to the user's profile page.
    avatarUrl string
    A link to the user's avatar image.
    id number
    The internal ID number of the user.
    name string
    The name of the user.
    state string
    The state of the user account.
    username string
    The username of the user.
    webUrl string
    A link to the user's profile page.
    avatar_url str
    A link to the user's avatar image.
    id float
    The internal ID number of the user.
    name str
    The name of the user.
    state str
    The state of the user account.
    username str
    The username of the user.
    web_url str
    A link to the user's profile page.
    avatarUrl String
    A link to the user's avatar image.
    id Number
    The internal ID number of the user.
    name String
    The name of the user.
    state String
    The state of the user account.
    username String
    The username of the user.
    webUrl String
    A link to the user's profile page.

    GetProjectMergeRequestAuthor

    AvatarUrl string
    A link to the user's avatar image.
    Id double
    The internal ID number of the user.
    Name string
    The name of the user.
    State string
    The state of the user account.
    Username string
    The username of the user.
    WebUrl string
    A link to the user's profile page.
    AvatarUrl string
    A link to the user's avatar image.
    Id float64
    The internal ID number of the user.
    Name string
    The name of the user.
    State string
    The state of the user account.
    Username string
    The username of the user.
    WebUrl string
    A link to the user's profile page.
    avatarUrl String
    A link to the user's avatar image.
    id Double
    The internal ID number of the user.
    name String
    The name of the user.
    state String
    The state of the user account.
    username String
    The username of the user.
    webUrl String
    A link to the user's profile page.
    avatarUrl string
    A link to the user's avatar image.
    id number
    The internal ID number of the user.
    name string
    The name of the user.
    state string
    The state of the user account.
    username string
    The username of the user.
    webUrl string
    A link to the user's profile page.
    avatar_url str
    A link to the user's avatar image.
    id float
    The internal ID number of the user.
    name str
    The name of the user.
    state str
    The state of the user account.
    username str
    The username of the user.
    web_url str
    A link to the user's profile page.
    avatarUrl String
    A link to the user's avatar image.
    id Number
    The internal ID number of the user.
    name String
    The name of the user.
    state String
    The state of the user account.
    username String
    The username of the user.
    webUrl String
    A link to the user's profile page.

    GetProjectMergeRequestClosedBy

    AvatarUrl string
    A link to the user's avatar image.
    Id double
    The internal ID number of the user.
    Name string
    The name of the user.
    State string
    The state of the user account.
    Username string
    The username of the user.
    WebUrl string
    A link to the user's profile page.
    AvatarUrl string
    A link to the user's avatar image.
    Id float64
    The internal ID number of the user.
    Name string
    The name of the user.
    State string
    The state of the user account.
    Username string
    The username of the user.
    WebUrl string
    A link to the user's profile page.
    avatarUrl String
    A link to the user's avatar image.
    id Double
    The internal ID number of the user.
    name String
    The name of the user.
    state String
    The state of the user account.
    username String
    The username of the user.
    webUrl String
    A link to the user's profile page.
    avatarUrl string
    A link to the user's avatar image.
    id number
    The internal ID number of the user.
    name string
    The name of the user.
    state string
    The state of the user account.
    username string
    The username of the user.
    webUrl string
    A link to the user's profile page.
    avatar_url str
    A link to the user's avatar image.
    id float
    The internal ID number of the user.
    name str
    The name of the user.
    state str
    The state of the user account.
    username str
    The username of the user.
    web_url str
    A link to the user's profile page.
    avatarUrl String
    A link to the user's avatar image.
    id Number
    The internal ID number of the user.
    name String
    The name of the user.
    state String
    The state of the user account.
    username String
    The username of the user.
    webUrl String
    A link to the user's profile page.

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi