Skip to content

Commit ae6a01a

Browse files
aj-emerichMalaydewangan09
authored andcommitted
docs(gitlab): add descriptions
1 parent b09a578 commit ae6a01a

File tree

4 files changed

+39
-30
lines changed

4 files changed

+39
-30
lines changed

src/main/java/io/kestra/plugin/gitlab/AbstractGitLabTask.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,31 @@
2121
@NoArgsConstructor
2222
public abstract class AbstractGitLabTask extends Task {
2323

24-
@Schema(title = "GitLab host name", description = "The host name of the GitLab instance.")
24+
@Schema(
25+
title = "GitLab API base URL",
26+
description = "Base URL of the GitLab instance; defaults to `https://gitlab.com`. Override for self-hosted installations."
27+
)
2528
@Builder.Default
2629
private Property<String> url = Property.ofValue("https://gitlab.com");
2730

28-
@Schema(title = "Personal, Project or Group Access Token", description = "GitLab Personal, Project or Group Access Token. More information on the [GitLab documentation](https://docs.gitlab.com/api/rest/authentication/).")
31+
@Schema(
32+
title = "Access token used for API calls",
33+
description = "GitLab Personal/Project/Group Access Token sent as the PRIVATE-TOKEN header; requires scopes that cover the requested API operations. See the [GitLab Authentication docs](https://docs.gitlab.com/api/rest/authentication/)."
34+
)
2935
@NotNull
3036
private Property<String> token;
3137

32-
@Schema(title = "Project ID", description = "The global ID or URL-encoded path of the project.")
38+
@Schema(
39+
title = "Project ID or path",
40+
description = "Numeric project ID or URL-encoded project path rendered from the context to build API endpoints."
41+
)
3342
@NotNull
3443
private Property<String> projectId;
3544

36-
@Schema(title = "API Path", description = "Custom API path for GitLab API endpoints")
45+
@Schema(
46+
title = "Projects API path",
47+
description = "Projects API prefix appended before the project ID; defaults to `/api/v4/projects`. Override when fronting GitLab with a proxy or custom base path."
48+
)
3749
@Builder.Default
3850
private Property<String> apiPath = Property.ofValue("/api/v4/projects");
3951

src/main/java/io/kestra/plugin/gitlab/issues/Create.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
@Getter
2727
@NoArgsConstructor
2828
@Schema(
29-
title = "Create a GitLab issue.",
30-
description = "Create a new issue in a GitLab project. " +
31-
"You need to provide a valid GitLab project ID and an access token with the necessary permissions."
29+
title = "Create issue in a project",
30+
description = "Creates an issue through the GitLab REST API for the specified project. Requires `projectId`, `token`, and `title`; description and labels are optional. Supports custom `url` and `apiPath` for self-hosted GitLab and renders templated values before sending."
3231
)
3332
@Plugin(examples = {
3433
@Example(
@@ -71,14 +70,14 @@
7170
})
7271
public class Create extends AbstractGitLabTask implements RunnableTask<Create.Output> {
7372

74-
@Schema(title = "Issue title")
73+
@Schema(title = "Issue title", description = "Title text for the new issue (required).")
7574
@NotNull
7675
private Property<String> title;
7776

78-
@Schema(title = "Issue description")
77+
@Schema(title = "Issue description", description = "Optional Markdown or text body for the issue.")
7978
private Property<String> issueDescription;
8079

81-
@Schema(title = "Labels to assign to the issue")
80+
@Schema(title = "Labels to assign to the issue", description = "Rendered list of labels applied to the issue.")
8281
private Property<List<String>> labels;
8382

8483
@Override
@@ -123,10 +122,10 @@ public static class Output implements io.kestra.core.models.tasks.Output {
123122
@Schema(title = "Issue ID")
124123
private String issueId;
125124

126-
@Schema(title = "Issue URL")
125+
@Schema(title = "Issue URL", description = "Web URL of the created issue.")
127126
private String webUrl;
128127

129-
@Schema(title = "HTTP status code")
128+
@Schema(title = "HTTP status code", description = "HTTP response code from the GitLab API.")
130129
private Integer statusCode;
131130
}
132-
}
131+
}

src/main/java/io/kestra/plugin/gitlab/issues/Search.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
@Getter
2626
@NoArgsConstructor
2727
@Schema(
28-
title = "Search GitLab issues.",
29-
description = "Search for issues in a GitLab project. " +
30-
"You need to provide a valid GitLab project ID and an access token with the necessary permissions."
28+
title = "Search issues in a project",
29+
description = "Queries GitLab issues for the target project via the REST API. Requires `projectId` and `token`; `state` defaults to `opened`. Supports custom `url` and `apiPath` for self-hosted GitLab and renders templated values before the request."
3130
)
3231
@Plugin(examples = {
3332
@Example(
@@ -73,14 +72,14 @@
7372
})
7473
public class Search extends AbstractGitLabTask implements RunnableTask<Search.Output> {
7574

76-
@Schema(title = "Search query")
75+
@Schema(title = "Search query", description = "Free-text query matched against issue title and description.")
7776
private Property<String> search;
7877

79-
@Schema(title = "Issue state", description = "opened, closed or all")
78+
@Schema(title = "Issue state", description = "Filter by state: opened, closed, or all; defaults to opened when not provided.")
8079
@Builder.Default
8180
private Property<String> state = Property.ofValue("opened");
8281

83-
@Schema(title = "Labels to filter by")
82+
@Schema(title = "Labels to filter by", description = "Labels rendered from the context and comma-joined for the GitLab API.")
8483
private Property<List<String>> labels;
8584

8685
@Override
@@ -126,10 +125,10 @@ public static class Output implements io.kestra.core.models.tasks.Output {
126125
@Schema(title = "Found issues")
127126
private List<Map<String, Object>> issues;
128127

129-
@Schema(title = "Number of issues found")
128+
@Schema(title = "Number of issues found", description = "Count of issues returned by the request.")
130129
private Integer count;
131130

132-
@Schema(title = "HTTP status code")
131+
@Schema(title = "HTTP status code", description = "HTTP response code from the GitLab API.")
133132
private Integer statusCode;
134133
}
135134
}

src/main/java/io/kestra/plugin/gitlab/mergerequests/Create.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
@Getter
2626
@NoArgsConstructor
2727
@Schema(
28-
title = "Create a GitLab merge request.",
29-
description = "Create a new merge request in a GitLab project. " +
30-
"You need to provide a valid GitLab project ID and an access token with the necessary permissions."
28+
title = "Open a project merge request",
29+
description = "Creates a merge request through the GitLab REST API for the target project. Requires `projectId`, `token`, `sourceBranch`, `targetBranch`, and `title`; description is optional. Supports custom `url` and `apiPath` for self-hosted GitLab and renders templated values before sending."
3130
)
3231
@Plugin(
3332
examples = {
@@ -73,19 +72,19 @@
7372
)
7473
public class Create extends AbstractGitLabTask implements RunnableTask<Create.Output> {
7574

76-
@Schema(title = "Merge request title")
75+
@Schema(title = "Merge request title", description = "Title shown on the merge request (required).")
7776
@NotNull
7877
private Property<String> title;
7978

80-
@Schema(title = "Source branch")
79+
@Schema(title = "Source branch", description = "Branch name to merge from (required).")
8180
@NotNull
8281
private Property<String> sourceBranch;
8382

84-
@Schema(title = "Target branch")
83+
@Schema(title = "Target branch", description = "Branch name to merge into (required).")
8584
@NotNull
8685
private Property<String> targetBranch;
8786

88-
@Schema(title = "Merge request description")
87+
@Schema(title = "Merge request description", description = "Optional Markdown or text body for the merge request.")
8988
private Property<String> mergeRequestDescription;
9089

9190
@Override
@@ -132,10 +131,10 @@ public static class Output implements io.kestra.core.models.tasks.Output {
132131
@Schema(title = "Merge Request ID")
133132
private String mergeReqID;
134133

135-
@Schema(title = "Merge Request URL")
134+
@Schema(title = "Merge Request URL", description = "Web URL of the created merge request.")
136135
private String webUrl;
137136

138-
@Schema(title = "HTTP status code")
137+
@Schema(title = "HTTP status code", description = "HTTP response code from the GitLab API.")
139138
private Integer statusCode;
140139
}
141140

0 commit comments

Comments
 (0)