GitLab v8.4.1 published on Tuesday, Sep 24, 2024 by Pulumi
gitlab.getProjectIssue
Explore with Pulumi AI
The gitlab.ProjectIssue
data source allows to retrieve details about an issue in a project.
Upstream API: GitLab API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const foo = gitlab.getProject({
pathWithNamespace: "foo/bar/baz",
});
const welcomeIssue = foo.then(foo => gitlab.getProjectIssue({
project: foo.id,
iid: 1,
}));
export const welcomeIssueWebUrl = webUrl;
import pulumi
import pulumi_gitlab as gitlab
foo = gitlab.get_project(path_with_namespace="foo/bar/baz")
welcome_issue = gitlab.get_project_issue(project=foo.id,
iid=1)
pulumi.export("welcomeIssueWebUrl", web_url)
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 {
foo, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{
PathWithNamespace: pulumi.StringRef("foo/bar/baz"),
}, nil)
if err != nil {
return err
}
_, err = gitlab.LookupProjectIssue(ctx, &gitlab.LookupProjectIssueArgs{
Project: foo.Id,
Iid: 1,
}, nil)
if err != nil {
return err
}
ctx.Export("welcomeIssueWebUrl", webUrl)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var foo = GitLab.GetProject.Invoke(new()
{
PathWithNamespace = "foo/bar/baz",
});
var welcomeIssue = GitLab.GetProjectIssue.Invoke(new()
{
Project = foo.Apply(getProjectResult => getProjectResult.Id),
Iid = 1,
});
return new Dictionary<string, object?>
{
["welcomeIssueWebUrl"] = webUrl,
};
});
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.GetProjectArgs;
import com.pulumi.gitlab.inputs.GetProjectIssueArgs;
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 foo = GitlabFunctions.getProject(GetProjectArgs.builder()
.pathWithNamespace("foo/bar/baz")
.build());
final var welcomeIssue = GitlabFunctions.getProjectIssue(GetProjectIssueArgs.builder()
.project(foo.applyValue(getProjectResult -> getProjectResult.id()))
.iid(1)
.build());
ctx.export("welcomeIssueWebUrl", webUrl);
}
}
variables:
foo:
fn::invoke:
Function: gitlab:getProject
Arguments:
pathWithNamespace: foo/bar/baz
welcomeIssue:
fn::invoke:
Function: gitlab:getProjectIssue
Arguments:
project: ${foo.id}
iid: 1
outputs:
welcomeIssueWebUrl: ${webUrl}
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:
getProjectIssue Result
The following output properties are available:
- Assignee
Ids List<int> - The IDs of the users to assign the issue to.
- int
- The ID of the author of the issue. Use
gitlab.User
data source to get more information about the user. - Closed
At string - When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Closed
By intUser Id - The ID of the user that closed the issue. Use
gitlab.User
data source to get more information about the user. - Confidential bool
- Set an issue to be confidential.
- Created
At string - When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
- Description string
- The description of an issue. Limited to 1,048,576 characters.
- Discussion
Locked bool - Whether the issue is locked for discussions or not.
- Discussion
To stringResolve - The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
- Downvotes int
- The number of downvotes the issue has received.
- Due
Date string - The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- Epic
Id int - ID of the epic to add the issue to. Valid values are greater than or equal to 0.
- Epic
Issue intId - The ID of the epic issue.
- External
Id string - The external ID of the issue.
- Human
Time stringEstimate - The human-readable time estimate of the issue.
- Human
Total stringTime Spent - The human-readable total time spent of the issue.
- Id string
- The provider-assigned unique ID for this managed resource.
- Iid int
- The internal ID of the project's issue.
- Issue
Id int - The instance-wide ID of the issue.
- Issue
Link intId - The ID of the issue link.
- Issue
Type string - The type of issue. Valid values are:
issue
,incident
,test_case
. - Labels List<string>
- The labels of an issue.
- Links Dictionary<string, string>
- The links of the issue.
- Merge
Request intTo Resolve Discussions Of - The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
- Merge
Requests intCount - The number of merge requests associated with the issue.
- Milestone
Id int - The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
- Moved
To intId - The ID of the issue that was moved to.
- Project string
- The name or ID of the project.
- References Dictionary<string, string>
- The references of the issue.
- State string
- The state of the issue. Valid values are:
opened
,closed
. - Subscribed bool
- Whether the authenticated user is subscribed to the issue or not.
- Task
Completion List<Pulumi.Statuses Git Lab. Outputs. Get Project Issue Task Completion Status> - The task completion status. It's always a one element list.
- Time
Estimate int - The time estimate of the issue.
- Title string
- The title of the issue.
- Total
Time intSpent - The total time spent of the issue.
- Updated
At string - When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Upvotes int
- The number of upvotes the issue has received.
- User
Notes intCount - The number of user notes on the issue.
- Web
Url string - The web URL of the issue.
- Weight int
- The weight of the issue. Valid values are greater than or equal to 0.
- Assignee
Ids []int - The IDs of the users to assign the issue to.
- int
- The ID of the author of the issue. Use
gitlab.User
data source to get more information about the user. - Closed
At string - When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Closed
By intUser Id - The ID of the user that closed the issue. Use
gitlab.User
data source to get more information about the user. - Confidential bool
- Set an issue to be confidential.
- Created
At string - When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
- Description string
- The description of an issue. Limited to 1,048,576 characters.
- Discussion
Locked bool - Whether the issue is locked for discussions or not.
- Discussion
To stringResolve - The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
- Downvotes int
- The number of downvotes the issue has received.
- Due
Date string - The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- Epic
Id int - ID of the epic to add the issue to. Valid values are greater than or equal to 0.
- Epic
Issue intId - The ID of the epic issue.
- External
Id string - The external ID of the issue.
- Human
Time stringEstimate - The human-readable time estimate of the issue.
- Human
Total stringTime Spent - The human-readable total time spent of the issue.
- Id string
- The provider-assigned unique ID for this managed resource.
- Iid int
- The internal ID of the project's issue.
- Issue
Id int - The instance-wide ID of the issue.
- Issue
Link intId - The ID of the issue link.
- Issue
Type string - The type of issue. Valid values are:
issue
,incident
,test_case
. - Labels []string
- The labels of an issue.
- Links map[string]string
- The links of the issue.
- Merge
Request intTo Resolve Discussions Of - The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
- Merge
Requests intCount - The number of merge requests associated with the issue.
- Milestone
Id int - The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
- Moved
To intId - The ID of the issue that was moved to.
- Project string
- The name or ID of the project.
- References map[string]string
- The references of the issue.
- State string
- The state of the issue. Valid values are:
opened
,closed
. - Subscribed bool
- Whether the authenticated user is subscribed to the issue or not.
- Task
Completion []GetStatuses Project Issue Task Completion Status - The task completion status. It's always a one element list.
- Time
Estimate int - The time estimate of the issue.
- Title string
- The title of the issue.
- Total
Time intSpent - The total time spent of the issue.
- Updated
At string - When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- Upvotes int
- The number of upvotes the issue has received.
- User
Notes intCount - The number of user notes on the issue.
- Web
Url string - The web URL of the issue.
- Weight int
- The weight of the issue. Valid values are greater than or equal to 0.
- assignee
Ids List<Integer> - The IDs of the users to assign the issue to.
- Integer
- The ID of the author of the issue. Use
gitlab.User
data source to get more information about the user. - closed
At String - When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- closed
By IntegerUser Id - The ID of the user that closed the issue. Use
gitlab.User
data source to get more information about the user. - confidential Boolean
- Set an issue to be confidential.
- created
At String - When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
- description String
- The description of an issue. Limited to 1,048,576 characters.
- discussion
Locked Boolean - Whether the issue is locked for discussions or not.
- discussion
To StringResolve - The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
- downvotes Integer
- The number of downvotes the issue has received.
- due
Date String - The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- epic
Id Integer - ID of the epic to add the issue to. Valid values are greater than or equal to 0.
- epic
Issue IntegerId - The ID of the epic issue.
- external
Id String - The external ID of the issue.
- human
Time StringEstimate - The human-readable time estimate of the issue.
- human
Total StringTime Spent - The human-readable total time spent of the issue.
- id String
- The provider-assigned unique ID for this managed resource.
- iid Integer
- The internal ID of the project's issue.
- issue
Id Integer - The instance-wide ID of the issue.
- issue
Link IntegerId - The ID of the issue link.
- issue
Type String - The type of issue. Valid values are:
issue
,incident
,test_case
. - labels List<String>
- The labels of an issue.
- links Map<String,String>
- The links of the issue.
- merge
Request IntegerTo Resolve Discussions Of - The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
- merge
Requests IntegerCount - The number of merge requests associated with the issue.
- milestone
Id Integer - The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
- moved
To IntegerId - The ID of the issue that was moved to.
- project String
- The name or ID of the project.
- references Map<String,String>
- The references of the issue.
- state String
- The state of the issue. Valid values are:
opened
,closed
. - subscribed Boolean
- Whether the authenticated user is subscribed to the issue or not.
- task
Completion List<GetStatuses Project Issue Task Completion Status> - The task completion status. It's always a one element list.
- time
Estimate Integer - The time estimate of the issue.
- title String
- The title of the issue.
- total
Time IntegerSpent - The total time spent of the issue.
- updated
At String - When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- upvotes Integer
- The number of upvotes the issue has received.
- user
Notes IntegerCount - The number of user notes on the issue.
- web
Url String - The web URL of the issue.
- weight Integer
- The weight of the issue. Valid values are greater than or equal to 0.
- assignee
Ids number[] - The IDs of the users to assign the issue to.
- number
- The ID of the author of the issue. Use
gitlab.User
data source to get more information about the user. - closed
At string - When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- closed
By numberUser Id - The ID of the user that closed the issue. Use
gitlab.User
data source to get more information about the user. - confidential boolean
- Set an issue to be confidential.
- created
At string - When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
- description string
- The description of an issue. Limited to 1,048,576 characters.
- discussion
Locked boolean - Whether the issue is locked for discussions or not.
- discussion
To stringResolve - The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
- downvotes number
- The number of downvotes the issue has received.
- due
Date string - The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- epic
Id number - ID of the epic to add the issue to. Valid values are greater than or equal to 0.
- epic
Issue numberId - The ID of the epic issue.
- external
Id string - The external ID of the issue.
- human
Time stringEstimate - The human-readable time estimate of the issue.
- human
Total stringTime Spent - The human-readable total time spent of the issue.
- id string
- The provider-assigned unique ID for this managed resource.
- iid number
- The internal ID of the project's issue.
- issue
Id number - The instance-wide ID of the issue.
- issue
Link numberId - The ID of the issue link.
- issue
Type string - The type of issue. Valid values are:
issue
,incident
,test_case
. - labels string[]
- The labels of an issue.
- links {[key: string]: string}
- The links of the issue.
- merge
Request numberTo Resolve Discussions Of - The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
- merge
Requests numberCount - The number of merge requests associated with the issue.
- milestone
Id number - The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
- moved
To numberId - The ID of the issue that was moved to.
- project string
- The name or ID of the project.
- references {[key: string]: string}
- The references of the issue.
- state string
- The state of the issue. Valid values are:
opened
,closed
. - subscribed boolean
- Whether the authenticated user is subscribed to the issue or not.
- task
Completion GetStatuses Project Issue Task Completion Status[] - The task completion status. It's always a one element list.
- time
Estimate number - The time estimate of the issue.
- title string
- The title of the issue.
- total
Time numberSpent - The total time spent of the issue.
- updated
At string - When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- upvotes number
- The number of upvotes the issue has received.
- user
Notes numberCount - The number of user notes on the issue.
- web
Url string - The web URL of the issue.
- weight number
- The weight of the issue. Valid values are greater than or equal to 0.
- assignee_
ids Sequence[int] - The IDs of the users to assign the issue to.
- int
- The ID of the author of the issue. Use
gitlab.User
data source to get more information about the user. - closed_
at str - When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- closed_
by_ intuser_ id - The ID of the user that closed the issue. Use
gitlab.User
data source to get more information about the user. - confidential bool
- Set an issue to be confidential.
- created_
at str - When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
- description str
- The description of an issue. Limited to 1,048,576 characters.
- discussion_
locked bool - Whether the issue is locked for discussions or not.
- discussion_
to_ strresolve - The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
- downvotes int
- The number of downvotes the issue has received.
- due_
date str - The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- epic_
id int - ID of the epic to add the issue to. Valid values are greater than or equal to 0.
- epic_
issue_ intid - The ID of the epic issue.
- external_
id str - The external ID of the issue.
- human_
time_ strestimate - The human-readable time estimate of the issue.
- human_
total_ strtime_ spent - The human-readable total time spent of the issue.
- id str
- The provider-assigned unique ID for this managed resource.
- iid int
- The internal ID of the project's issue.
- issue_
id int - The instance-wide ID of the issue.
- issue_
link_ intid - The ID of the issue link.
- issue_
type str - The type of issue. Valid values are:
issue
,incident
,test_case
. - labels Sequence[str]
- The labels of an issue.
- links Mapping[str, str]
- The links of the issue.
- merge_
request_ intto_ resolve_ discussions_ of - The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
- merge_
requests_ intcount - The number of merge requests associated with the issue.
- milestone_
id int - The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
- moved_
to_ intid - The ID of the issue that was moved to.
- project str
- The name or ID of the project.
- references Mapping[str, str]
- The references of the issue.
- state str
- The state of the issue. Valid values are:
opened
,closed
. - subscribed bool
- Whether the authenticated user is subscribed to the issue or not.
- task_
completion_ Sequence[Getstatuses Project Issue Task Completion Status] - The task completion status. It's always a one element list.
- time_
estimate int - The time estimate of the issue.
- title str
- The title of the issue.
- total_
time_ intspent - The total time spent of the issue.
- updated_
at str - When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- upvotes int
- The number of upvotes the issue has received.
- user_
notes_ intcount - The number of user notes on the issue.
- web_
url str - The web URL of the issue.
- weight int
- The weight of the issue. Valid values are greater than or equal to 0.
- assignee
Ids List<Number> - The IDs of the users to assign the issue to.
- Number
- The ID of the author of the issue. Use
gitlab.User
data source to get more information about the user. - closed
At String - When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- closed
By NumberUser Id - The ID of the user that closed the issue. Use
gitlab.User
data source to get more information about the user. - confidential Boolean
- Set an issue to be confidential.
- created
At String - When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
- description String
- The description of an issue. Limited to 1,048,576 characters.
- discussion
Locked Boolean - Whether the issue is locked for discussions or not.
- discussion
To StringResolve - The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
- downvotes Number
- The number of downvotes the issue has received.
- due
Date String - The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
- epic
Id Number - ID of the epic to add the issue to. Valid values are greater than or equal to 0.
- epic
Issue NumberId - The ID of the epic issue.
- external
Id String - The external ID of the issue.
- human
Time StringEstimate - The human-readable time estimate of the issue.
- human
Total StringTime Spent - The human-readable total time spent of the issue.
- id String
- The provider-assigned unique ID for this managed resource.
- iid Number
- The internal ID of the project's issue.
- issue
Id Number - The instance-wide ID of the issue.
- issue
Link NumberId - The ID of the issue link.
- issue
Type String - The type of issue. Valid values are:
issue
,incident
,test_case
. - labels List<String>
- The labels of an issue.
- links Map<String>
- The links of the issue.
- merge
Request NumberTo Resolve Discussions Of - The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
- merge
Requests NumberCount - The number of merge requests associated with the issue.
- milestone
Id Number - The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
- moved
To NumberId - The ID of the issue that was moved to.
- project String
- The name or ID of the project.
- references Map<String>
- The references of the issue.
- state String
- The state of the issue. Valid values are:
opened
,closed
. - subscribed Boolean
- Whether the authenticated user is subscribed to the issue or not.
- task
Completion List<Property Map>Statuses - The task completion status. It's always a one element list.
- time
Estimate Number - The time estimate of the issue.
- title String
- The title of the issue.
- total
Time NumberSpent - The total time spent of the issue.
- updated
At String - When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
- upvotes Number
- The number of upvotes the issue has received.
- user
Notes NumberCount - The number of user notes on the issue.
- web
Url String - The web URL of the issue.
- weight Number
- The weight of the issue. Valid values are greater than or equal to 0.
Supporting Types
GetProjectIssueTaskCompletionStatus
- Completed
Count int - The number of tasks that are completed.
- Count int
- The number of tasks.
- Completed
Count int - The number of tasks that are completed.
- Count int
- The number of tasks.
- completed
Count Integer - The number of tasks that are completed.
- count Integer
- The number of tasks.
- completed
Count number - The number of tasks that are completed.
- count number
- The number of tasks.
- completed_
count int - The number of tasks that are completed.
- count int
- The number of tasks.
- completed
Count Number - The number of tasks that are completed.
- count Number
- The number of tasks.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.