Skip to content

Commit 6207963

Browse files
authored
docs(examples): update property descriptions (#24)
* fix: update properties * fix: descriptions * fix: generic token
1 parent d367c17 commit 6207963

File tree

9 files changed

+59
-22
lines changed

9 files changed

+59
-22
lines changed

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

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

24-
@Schema(title = "GitLab URL", description = "GitLab URL")
24+
@Schema(title = "GitLab host name", description = "The host name of the GitLab instance.")
2525
@Builder.Default
2626
private Property<String> url = Property.ofValue("https://gitlab.com");
2727

28-
@Schema(title = "Personal Access Token", description = "GitLab Personal Access Token")
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/).")
2929
@NotNull
3030
private Property<String> token;
3131

32-
@Schema(title = "Project ID", description = "GitLab project ID")
32+
@Schema(title = "Project ID", description = "The global ID or URL-encoded path of the project.")
3333
@NotNull
3434
private Property<String> projectId;
3535

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
@Schema(
2929
title = "Create a GitLab issue.",
3030
description = "Create a new issue in a GitLab project. " +
31-
"You need to provide a valid GitLab project ID and a personal access token with the necessary permissions."
31+
"You need to provide a valid GitLab project ID and an access token with the necessary permissions."
3232
)
3333
@Plugin(examples = {
3434
@Example(
35-
title = "Create an issue in a GitLab project using a project access token.",
35+
title = "Create an issue in a GitLab project using an access token.",
3636
full = true,
3737
code = """
3838
id: gitlab_create_issue
@@ -41,7 +41,6 @@
4141
tasks:
4242
- id: create_issue
4343
type: io.kestra.plugin.gitlab.issues.Create
44-
url: https://gitlab.example.com
4544
token: "{{ secret('GITLAB_TOKEN') }}"
4645
projectId: "123"
4746
title: "Bug report"
@@ -55,7 +54,7 @@
5554
title = "Create an issue with custom API path for self-hosted GitLab.",
5655
full = true,
5756
code = """
58-
id: gitlab_create_issue_custom
57+
id: gitlab_create_issue_self_hosted
5958
namespace: company.team
6059
6160
tasks:
@@ -121,10 +120,10 @@ public Output run(RunContext runContext) throws Exception {
121120
@Builder
122121
@Getter
123122
public static class Output implements io.kestra.core.models.tasks.Output {
124-
@Schema(title = "Created issue ID")
123+
@Schema(title = "Issue ID")
125124
private String issueId;
126125

127-
@Schema(title = "Issue web URL")
126+
@Schema(title = "Issue URL")
128127
private String webUrl;
129128

130129
@Schema(title = "HTTP status code")

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

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
@Schema(
2828
title = "Search GitLab issues.",
2929
description = "Search for issues in a GitLab project. " +
30-
"You need to provide a valid GitLab project ID and a personal access token with the necessary permissions."
30+
"You need to provide a valid GitLab project ID and an access token with the necessary permissions."
3131
)
3232
@Plugin(examples = {
3333
@Example(
34-
title = "Search for issues in a GitLab project using a project access token.",
34+
title = "Search for issues in a GitLab project using an access token.",
3535
full = true,
3636
code = """
3737
id: gitlab_search_issues
@@ -40,7 +40,6 @@
4040
tasks:
4141
- id: search_issues
4242
type: io.kestra.plugin.gitlab.issues.Search
43-
url: https://gitlab.example.com
4443
token: "{{ secret('GITLAB_TOKEN') }}"
4544
projectId: "123"
4645
search: "bug"
@@ -49,6 +48,27 @@
4948
- bug
5049
- critical
5150
"""
51+
),
52+
@Example(
53+
title = "Search for issues in a GitLab project with custom API path for self-hosted GitLab.",
54+
full = true,
55+
code = """
56+
id: gitlab_search_issues
57+
namespace: company.team
58+
59+
tasks:
60+
- id: search_issues
61+
type: io.kestra.plugin.gitlab.issues.Search
62+
url: https://gitlab.example.com
63+
apiPath: /api/v4/projects
64+
token: "{{ secret('GITLAB_TOKEN') }}"
65+
projectId: "123"
66+
search: "bug"
67+
state: "opened"
68+
labels:
69+
- bug
70+
- critical
71+
"""
5272
)
5373
})
5474
public class Search extends AbstractGitLabTask implements RunnableTask<Search.Output> {

src/main/java/io/kestra/plugin/gitlab/issues/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@PluginSubGroup(
22
title = "Issues",
3-
description = "This sub-group of plugins contains tasks for using GitLab.\nSet the GitLab host, project ID, and access token to file issues with title/description, add comments or updates, and list or retrieve issue details for triage workflows.",
3+
description = "This sub-group of plugins contains tasks for using GitLab.\nSet the GitLab host name, project ID, and access token to file issues with title/description, add comments or updates, and list or retrieve issue details for triage workflows.",
44
categories = PluginSubGroup.PluginCategory.TOOL
55
)
66
package io.kestra.plugin.gitlab.issues;

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

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
@Schema(
2828
title = "Create a GitLab merge request.",
2929
description = "Create a new merge request in a GitLab project. " +
30-
"You need to provide a valid GitLab project ID and a personal access token with the necessary permissions."
30+
"You need to provide a valid GitLab project ID and an access token with the necessary permissions."
3131
)
3232
@Plugin(
3333
examples = {
3434
@Example(
35-
title = "Create a merge request in a GitLab project using a project access token.",
35+
title = "Create a merge request in a GitLab project using an access token.",
3636
full = true,
3737
code = """
3838
id: gitlab_merge_request
@@ -41,14 +41,32 @@
4141
tasks:
4242
- id: create_merge_request
4343
type: io.kestra.plugin.gitlab.mergerequests.Create
44-
url: https://gitlab.example.com
4544
token: "{{ secret('GITLAB_TOKEN') }}"
4645
projectId: "123"
4746
title: "Feature: Add new functionality"
4847
mergeRequestDescription: "This merge request adds new functionality to the project"
4948
sourceBranch: "feat-testing"
5049
targetBranch: "main"
5150
"""
51+
),
52+
@Example(
53+
title = "Create a merge request with custom API path for self-hosted GitLab.",
54+
full = true,
55+
code = """
56+
id: gitlab_merge_request_self_hosted
57+
namespace: company.team
58+
59+
tasks:
60+
- id: create_merge_request
61+
type: io.kestra.plugin.gitlab.mergerequests.Create
62+
url: https://gitlab.example.com
63+
apiPath: /api/v4/projects
64+
token: "{{ secret('GITLAB_TOKEN') }}"
65+
projectId: "123"
66+
title: "Hotfix: Critical bug fix"
67+
sourceBranch: "hotfix-branch"
68+
targetBranch: "main"
69+
"""
5270
)
5371
},
5472
aliases = "io.kestra.plugin.gitlab.MergeRequest"
@@ -111,10 +129,10 @@ public Output run(RunContext runContext) throws Exception {
111129
@Builder
112130
@Getter
113131
public static class Output implements io.kestra.core.models.tasks.Output {
114-
@Schema(title = "Created merge request ID")
132+
@Schema(title = "Merge Request ID")
115133
private String mergeReqID;
116134

117-
@Schema(title = "web URL")
135+
@Schema(title = "Merge Request URL")
118136
private String webUrl;
119137

120138
@Schema(title = "HTTP status code")

src/main/java/io/kestra/plugin/gitlab/mergerequests/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@PluginSubGroup(
22
title = "Merge Requests",
3-
description = "Tasks that create, update, and fetch GitLab Merge Requests.\nSet the GitLab host, project ID, and access token to handle Merge Requests.",
3+
description = "Tasks that create, update, and fetch GitLab Merge Requests.\nSet the GitLab host name, project ID, and access token to handle Merge Requests.",
44
categories = PluginSubGroup.PluginCategory.TOOL
55
)
66
package io.kestra.plugin.gitlab.mergerequests;

src/main/resources/metadata/index.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ group: io.kestra.plugin.gitlab
22
name: "gitlab"
33
title: "GitLab"
44
description: "Tasks that interact with GitLab projects, commits, and issues via the API."
5-
body: "Provide a GitLab server URL and personal access token with project identifiers to search commits, create or update issues, and retrieve project metadata for CI/CD or governance workflows."
5+
body: "Provide a GitLab host name and access token with project identifiers to search commits, create or update issues, and retrieve project metadata for CI/CD or governance workflows."
66
videos: []
77
createdBy: "Kestra Core Team"
88
managedBy: "Kestra Core Team"

src/main/resources/metadata/issues.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ group: io.kestra.plugin.gitlab.issues
22
name: "issues"
33
title: "Issues"
44
description: "Tasks that create, update, and fetch GitLab issues."
5-
body: "Set the GitLab host, project ID, and access token to file issues with title/description, add comments or updates, and list or retrieve issue details for triage workflows."
5+
body: "Set the GitLab host name, project ID, and access token to file issues with title/description, add comments or updates, and list or retrieve issue details for triage workflows."
66
videos: []
77
createdBy: "Kestra Core Team"
88
managedBy: "Kestra Core Team"

src/main/resources/metadata/mergerequests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ group: io.kestra.plugin.gitlab.mergerequests
22
name: "mergerequests"
33
title: "Merge Requests"
44
description: "Tasks that create, update, and fetch GitLab Merge Requests."
5-
body: "Set the GitLab host, project ID, and access token to handle Merge Requests."
5+
body: "Set the GitLab host name, project ID, and access token to handle Merge Requests."
66
videos: []
77
createdBy: "Kestra Core Team"
88
managedBy: "Kestra Core Team"

0 commit comments

Comments
 (0)