GitLab

Pulumi Official
Package maintained by Pulumi
v4.7.1 published on Thursday, Jun 30, 2022 by Pulumi

getProjectIssue

The gitlab.ProjectIssue data source allows to retrieve details about an issue in a project.

Upstream API: GitLab API docs

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(GitLab.GetProject.InvokeAsync(new GitLab.GetProjectArgs
        {
            Id = "foo/bar/baz",
        }));
        var welcomeIssue = foo.Apply(foo => Output.Create(GitLab.GetProjectIssue.InvokeAsync(new GitLab.GetProjectIssueArgs
        {
            Project = foo.Id,
            Iid = 1,
        })));
        this.WelcomeIssueWebUrl = data.Gitlab_project_issue.Web_url;
    }

    [Output("welcomeIssueWebUrl")]
    public Output<string> WelcomeIssueWebUrl { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v4/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := gitlab.LookupProject(ctx, &GetProjectArgs{
			Id: pulumi.StringRef("foo/bar/baz"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = gitlab.LookupProjectIssue(ctx, &GetProjectIssueArgs{
			Project: foo.Id,
			Iid:     1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("welcomeIssueWebUrl", data.Gitlab_project_issue.Web_url)
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var foo = Output.of(GitlabFunctions.getProject(GetProjectArgs.builder()
            .id("foo/bar/baz")
            .build()));

        final var welcomeIssue = Output.of(GitlabFunctions.getProjectIssue(GetProjectIssueArgs.builder()
            .project(foo.apply(getProjectResult -> getProjectResult.id()))
            .iid(1)
            .build()));

        ctx.export("welcomeIssueWebUrl", data.gitlab_project_issue().web_url());
    }
}
import pulumi
import pulumi_gitlab as gitlab

foo = gitlab.get_project(id="foo/bar/baz")
welcome_issue = gitlab.get_project_issue(project=foo.id,
    iid=1)
pulumi.export("welcomeIssueWebUrl", data["gitlab_project_issue"]["web_url"])
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const foo = gitlab.getProject({
    id: "foo/bar/baz",
});
const welcomeIssue = foo.then(foo => gitlab.getProjectIssue({
    project: foo.id,
    iid: 1,
}));
export const welcomeIssueWebUrl = data.gitlab_project_issue.web_url;
variables:
  foo:
    Fn::Invoke:
      Function: gitlab:getProject
      Arguments:
        id: foo/bar/baz
  welcomeIssue:
    Fn::Invoke:
      Function: gitlab:getProjectIssue
      Arguments:
        project: ${foo.id}
        iid: 1
outputs:
  welcomeIssueWebUrl: ${data.gitlab_project_issue.web_url}

Using getProjectIssue

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 getProjectIssue(args: GetProjectIssueArgs, opts?: InvokeOptions): Promise<GetProjectIssueResult>
function getProjectIssueOutput(args: GetProjectIssueOutputArgs, opts?: InvokeOptions): Output<GetProjectIssueResult>
def get_project_issue(iid: Optional[int] = None,
                      project: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetProjectIssueResult
def get_project_issue_output(iid: Optional[pulumi.Input[int]] = None,
                      project: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetProjectIssueResult]
func LookupProjectIssue(ctx *Context, args *LookupProjectIssueArgs, opts ...InvokeOption) (*LookupProjectIssueResult, error)
func LookupProjectIssueOutput(ctx *Context, args *LookupProjectIssueOutputArgs, opts ...InvokeOption) LookupProjectIssueResultOutput

> Note: This function is named LookupProjectIssue in the Go SDK.

public static class GetProjectIssue 
{
    public static Task<GetProjectIssueResult> InvokeAsync(GetProjectIssueArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectIssueResult> Invoke(GetProjectIssueInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectIssueResult> getProjectIssue(GetProjectIssueArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: gitlab:index/getProjectIssue:getProjectIssue
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Iid int
Project string
Iid int
Project string
iid Integer
project String
iid number
project string
iid int
project str
iid Number
project String

getProjectIssue Result

The following output properties are available:

AssigneeIds List<int>
AuthorId int
ClosedAt string
ClosedByUserId int
Confidential bool
CreatedAt string
Description string
DiscussionLocked bool
DiscussionToResolve string
Downvotes int
DueDate string
EpicId int
EpicIssueId int
ExternalId string
HumanTimeEstimate string
HumanTotalTimeSpent string
Id string

The provider-assigned unique ID for this managed resource.

Iid int
IssueId int
IssueLinkId int
IssueType string
Labels List<string>
Links Dictionary<string, string>
MergeRequestToResolveDiscussionsOf int
MergeRequestsCount int
MilestoneId int
MovedToId int
Project string
References Dictionary<string, string>
State string
Subscribed bool
TaskCompletionStatuses List<Pulumi.GitLab.Outputs.GetProjectIssueTaskCompletionStatus>
TimeEstimate int
Title string
TotalTimeSpent int
UpdatedAt string
Upvotes int
UserNotesCount int
WebUrl string
Weight int
assigneeIds List<Integer>
authorId Integer
closedAt String
closedByUserId Integer
confidential Boolean
createdAt String
description String
discussionLocked Boolean
discussionToResolve String
downvotes Integer
dueDate String
epicId Integer
epicIssueId Integer
externalId String
humanTimeEstimate String
humanTotalTimeSpent String
id String

The provider-assigned unique ID for this managed resource.

iid Integer
issueId Integer
issueLinkId Integer
issueType String
labels List<String>
links Map<String,String>
mergeRequestToResolveDiscussionsOf Integer
mergeRequestsCount Integer
milestoneId Integer
movedToId Integer
project String
references Map<String,String>
state String
subscribed Boolean
taskCompletionStatuses List<GetProjectIssueTaskCompletionStatus>
timeEstimate Integer
title String
totalTimeSpent Integer
updatedAt String
upvotes Integer
userNotesCount Integer
webUrl String
weight Integer
assigneeIds number[]
authorId number
closedAt string
closedByUserId number
confidential boolean
createdAt string
description string
discussionLocked boolean
discussionToResolve string
downvotes number
dueDate string
epicId number
epicIssueId number
externalId string
humanTimeEstimate string
humanTotalTimeSpent string
id string

The provider-assigned unique ID for this managed resource.

iid number
issueId number
issueLinkId number
issueType string
labels string[]
links {[key: string]: string}
mergeRequestToResolveDiscussionsOf number
mergeRequestsCount number
milestoneId number
movedToId number
project string
references {[key: string]: string}
state string
subscribed boolean
taskCompletionStatuses GetProjectIssueTaskCompletionStatus[]
timeEstimate number
title string
totalTimeSpent number
updatedAt string
upvotes number
userNotesCount number
webUrl string
weight number
assigneeIds List<Number>
authorId Number
closedAt String
closedByUserId Number
confidential Boolean
createdAt String
description String
discussionLocked Boolean
discussionToResolve String
downvotes Number
dueDate String
epicId Number
epicIssueId Number
externalId String
humanTimeEstimate String
humanTotalTimeSpent String
id String

The provider-assigned unique ID for this managed resource.

iid Number
issueId Number
issueLinkId Number
issueType String
labels List<String>
links Map<String>
mergeRequestToResolveDiscussionsOf Number
mergeRequestsCount Number
milestoneId Number
movedToId Number
project String
references Map<String>
state String
subscribed Boolean
taskCompletionStatuses List<Property Map>
timeEstimate Number
title String
totalTimeSpent Number
updatedAt String
upvotes Number
userNotesCount Number
webUrl String
weight Number

Supporting Types

GetProjectIssueTaskCompletionStatus

completedCount Integer
count Integer
completedCount number
count number
completedCount Number
count Number

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes

This Pulumi package is based on the gitlab Terraform Provider.