gitlab-cloud-connector 0.1.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +9 -0
- data/Makefile +1 -1
- data/README.md +12 -20
- data/config/backend_services/observability.yml +5 -0
- data/config/backend_services/security_gateway.yml +5 -0
- data/config/schemas/add_on_schema.json +15 -0
- data/config/schemas/backend_service_schema.json +26 -0
- data/config/schemas/license_type_schema.json +15 -0
- data/config/schemas/unit_primitive_schema.json +97 -0
- data/config/unit_primitives/ask_build.yml +15 -0
- data/config/unit_primitives/ask_commit.yml +15 -0
- data/config/unit_primitives/ask_epic.yml +15 -0
- data/config/unit_primitives/ask_issue.yml +15 -0
- data/config/unit_primitives/complete_code.yml +19 -0
- data/config/{config/unit_primitives → unit_primitives}/documentation_search.yml +1 -1
- data/config/{config/unit_primitives → unit_primitives}/duo_chat.yml +1 -1
- data/config/unit_primitives/duo_workflow_execute_workflow.yml +13 -0
- data/config/unit_primitives/explain_code.yml +17 -0
- data/config/{config/unit_primitives → unit_primitives}/explain_vulnerability.yml +1 -3
- data/config/unit_primitives/fix_code.yml +17 -0
- data/config/unit_primitives/generate_code.yml +19 -0
- data/config/{config/unit_primitives → unit_primitives}/generate_commit_message.yml +1 -3
- data/config/unit_primitives/generate_issue_description.yml +15 -0
- data/config/{config/unit_primitives → unit_primitives}/glab_ask_git_command.yml +1 -3
- data/config/unit_primitives/include_dependency_context.yml +15 -0
- data/config/unit_primitives/include_file_context.yml +17 -0
- data/config/unit_primitives/include_issue_context.yml +15 -0
- data/config/unit_primitives/include_merge_request_context.yml +15 -0
- data/config/unit_primitives/include_snippet_context.yml +17 -0
- data/config/unit_primitives/observability_all.yml +14 -0
- data/config/unit_primitives/refactor_code.yml +17 -0
- data/config/{config/unit_primitives → unit_primitives}/resolve_vulnerability.yml +1 -3
- data/config/unit_primitives/security_scans.yml +13 -0
- data/config/{config/unit_primitives → unit_primitives}/summarize_comments.yml +3 -5
- data/config/unit_primitives/summarize_review.yml +15 -0
- data/config/{config/unit_primitives → unit_primitives}/troubleshoot_job.yml +1 -3
- data/config/unit_primitives/write_tests.yml +17 -0
- data/lib/cloud_connector.rb +10 -0
- data/lib/gitlab/cloud_connector/json_web_token.rb +59 -0
- data/lib/gitlab/cloud_connector/version.rb +1 -1
- metadata +73 -18
- data/CHANGELOG.md +0 -5
- /data/config/{config/add_ons → add_ons}/duo_enterprise.yml +0 -0
- /data/config/{config/add_ons → add_ons}/duo_pro.yml +0 -0
- /data/config/{config/backend_services → backend_services}/ai_gateway.yml +0 -0
- /data/config/{config/backend_services → backend_services}/duo_workflow_service.yml +0 -0
- /data/config/{config/license_types → license_types}/premium.yml +0 -0
- /data/config/{config/license_types → license_types}/ultimate.yml +0 -0
- /data/config/{config/unit_primitives → unit_primitives}/code_suggestions.yml +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 770d5e1b4415c2544e4fb0be3d99fa19b05ab8f7969fc0f6c2c1fc5ea6fb0fb9
|
4
|
+
data.tar.gz: 04e860d904164310a5cabce27bea3896f0d93e6bd66a24fae7e56610f5eaef0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a355ece375da0c859f01cddea2adbd9e1a94800b314e1fc649358c607b1f1b109aa38552c36afd341d02e6aff10f1fb86cf48242fecb068edf47119d59d5f62
|
7
|
+
data.tar.gz: 4b2e636501b08c3a2ba6d4dee1eb9599d73e9da252035ada0c7c5ae4aa6b7aa843c2119d5f7db2afdfb908ee3fab8b96648784ec0e28bd3a5c569699fb96f895
|
data/CONTRIBUTING.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## Making changes to this repository
|
2
|
+
|
3
|
+
We welcome contributions. When making changes:
|
4
|
+
|
5
|
+
1. Follow good git commit practices. Summarize the change concisely in the commit title,
|
6
|
+
and add relevant details in the commit body.
|
7
|
+
1. Add a [changelog trailer](https://docs.gitlab.com/ee/user/project/changelogs.html) where it applies.
|
8
|
+
1. Open a merge request.
|
9
|
+
|
1
10
|
## Developer Certificate of Origin and License
|
2
11
|
|
3
12
|
By contributing to GitLab B.V., you accept and agree to the following terms and
|
data/Makefile
CHANGED
@@ -21,7 +21,7 @@ copy-assets:
|
|
21
21
|
@if [ -d "${RUBY_DIR}/config" ]; then rm -rf ${RUBY_DIR}/config; fi
|
22
22
|
# Copy required assets
|
23
23
|
@mkdir -p ${RUBY_DIR}/config
|
24
|
-
@cp -r ${ROOT_DIR}/config ${RUBY_DIR}/config
|
24
|
+
@cp -r ${ROOT_DIR}/config/* ${RUBY_DIR}/config
|
25
25
|
@cp ${ROOT_DIR}/LICENSE ${RUBY_DIR}/
|
26
26
|
@cp ${ROOT_DIR}/CONTRIBUTING.md ${RUBY_DIR}/
|
27
27
|
|
data/README.md
CHANGED
@@ -1,29 +1,21 @@
|
|
1
|
-
#
|
1
|
+
# gitlab-cloud-connector (Ruby)
|
2
2
|
|
3
|
-
|
3
|
+
Ruby gem containing shared code for Cloud Connector token issuers (GitLab, CustomersDot).
|
4
4
|
|
5
|
-
##
|
5
|
+
## Usage
|
6
6
|
|
7
|
-
|
7
|
+
We expect Bundler is used to manage dependencies. To add the dependency, add it to `Gemfile`:
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
$ gem install gitlab-cloud-connector
|
9
|
+
```Gemfile
|
10
|
+
gem "gitlab-cloud-connector", "~> 0.1.1", require: 'cloud_connector'
|
11
|
+
```
|
14
12
|
|
15
13
|
## Release Process
|
16
14
|
|
17
|
-
|
18
|
-
we release, we just release when we make a change - no matter the size of the
|
19
|
-
change.
|
15
|
+
See [Release Process](../../README.md#release-process)
|
20
16
|
|
21
|
-
|
17
|
+
Once the new gem version is visible on [RubyGems.org](https://rubygems.org/gems/gitlab-cloud-connector),
|
18
|
+
it is recommended to update [GitLab's `Gemfile`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/Gemfile)
|
19
|
+
and [Customers Dot's `Gemfile`](https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/main/Gemfile) to bump the `gitlab-cloud-connector`
|
20
|
+
Ruby gem to the new version also. See [Usage](#usage) for how to do this.
|
22
21
|
|
23
|
-
1. Create a Merge Request.
|
24
|
-
1. Use Merge Request template [Release.md](https://gitlab.com/gitlab-org/ruby/gems/gitlab-cloud-connector/-/blob/master/.gitlab/merge_request_templates/Release.md).
|
25
|
-
1. Follow the instructions.
|
26
|
-
1. After the Merge Request has been merged, a new gem version is [published automatically](https://gitlab.com/gitlab-org/components/gem-release).
|
27
|
-
1. Once the new gem version is visible on [RubyGems.org](https://rubygems.org/gems/gitlab-cloud-connector),
|
28
|
-
it is recommended to update [GitLab's `Gemfile`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/Gemfile)
|
29
|
-
and [Customers Dot's `Gemfile`](https://gitlab.com/gitlab-org/customers-gitlab-com) to bump the `gitlab-cloud-connector` Ruby gem to the new version also.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-06/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"required": ["name"],
|
5
|
+
"properties": {
|
6
|
+
"name": {
|
7
|
+
"type": "string",
|
8
|
+
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
|
9
|
+
},
|
10
|
+
"description": {
|
11
|
+
"type": "string"
|
12
|
+
}
|
13
|
+
},
|
14
|
+
"additionalProperties": false
|
15
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-06/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"required": ["name", "project_url", "jwt_aud"],
|
5
|
+
"properties": {
|
6
|
+
"name": {
|
7
|
+
"type": "string",
|
8
|
+
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*"
|
9
|
+
},
|
10
|
+
"description": {
|
11
|
+
"type": "string"
|
12
|
+
},
|
13
|
+
"project_url": {
|
14
|
+
"type": "string",
|
15
|
+
"format": "url"
|
16
|
+
},
|
17
|
+
"group": {
|
18
|
+
"type": "string"
|
19
|
+
},
|
20
|
+
"jwt_aud": {
|
21
|
+
"type": "string",
|
22
|
+
"pattern": "^gitlab-[a-z0-9]+(-[a-z0-9]+)*$"
|
23
|
+
}
|
24
|
+
},
|
25
|
+
"additionalProperties": false
|
26
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-06/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"required": ["name"],
|
5
|
+
"properties": {
|
6
|
+
"name": {
|
7
|
+
"type": "string",
|
8
|
+
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
|
9
|
+
},
|
10
|
+
"description": {
|
11
|
+
"type": "string"
|
12
|
+
}
|
13
|
+
},
|
14
|
+
"additionalProperties": false
|
15
|
+
}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-06/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"required": ["name", "description", "group", "feature_category", "backend_services", "license_types"],
|
5
|
+
"properties": {
|
6
|
+
"name": {
|
7
|
+
"description": "Name of the unit primitive",
|
8
|
+
"type": "string",
|
9
|
+
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
|
10
|
+
},
|
11
|
+
"description": {
|
12
|
+
"description": "Description of the unit primitive",
|
13
|
+
"type": ["string", "null"]
|
14
|
+
},
|
15
|
+
"group": {
|
16
|
+
"description": "The group that introduced the unit primitive",
|
17
|
+
"type": ["string", "null"]
|
18
|
+
},
|
19
|
+
"feature_category": {
|
20
|
+
"description": "The feature category that introduced the unit primitive",
|
21
|
+
"type": ["string", "null"]
|
22
|
+
},
|
23
|
+
"unit_primitive_issue_url": {
|
24
|
+
"description": "Url of original unit primitive issue",
|
25
|
+
"type": ["string", "null"]
|
26
|
+
},
|
27
|
+
"introduced_by_url": {
|
28
|
+
"description": "URL of merge request introducing the Unit Primitive",
|
29
|
+
"type": ["string", "null"]
|
30
|
+
},
|
31
|
+
"documentation_url": {
|
32
|
+
"description": "URL of documentation for introduced Unit Primitive",
|
33
|
+
"type": ["string", "null"]
|
34
|
+
},
|
35
|
+
"milestone": {
|
36
|
+
"description": "Milestone in which the Unit Primitive was introduced",
|
37
|
+
"type": ["string", "null"]
|
38
|
+
},
|
39
|
+
"cut_off_date": {
|
40
|
+
"description": "After this date, unit primitive has no free access",
|
41
|
+
"anyOf": [
|
42
|
+
{
|
43
|
+
"type": "null"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"type": "time",
|
47
|
+
"format": "date-time"
|
48
|
+
}
|
49
|
+
]
|
50
|
+
},
|
51
|
+
"min_gitlab_version": {
|
52
|
+
"description": "Minimum gitlab version required to use this Unit Primitive",
|
53
|
+
"type": ["string", "null"],
|
54
|
+
"pattern": "\\A(\\d+\\.\\d+)"
|
55
|
+
},
|
56
|
+
"min_gitlab_version_for_free_access": {
|
57
|
+
"description": "Minimum gitlab version required to use this Unit Primitive while it has free access",
|
58
|
+
"type": ["string", "null"],
|
59
|
+
"pattern": "\\A(\\d+\\.\\d+)"
|
60
|
+
},
|
61
|
+
"backend_services": {
|
62
|
+
"type": "array",
|
63
|
+
"items": {
|
64
|
+
"type": "string"
|
65
|
+
}
|
66
|
+
},
|
67
|
+
"add_ons": {
|
68
|
+
"anyOf": [
|
69
|
+
{
|
70
|
+
"type": "array",
|
71
|
+
"items": {
|
72
|
+
"type": "string"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"type": "null"
|
77
|
+
}
|
78
|
+
]
|
79
|
+
},
|
80
|
+
"license_types": {
|
81
|
+
"type": "array",
|
82
|
+
"items": {
|
83
|
+
"type": "string"
|
84
|
+
}
|
85
|
+
},
|
86
|
+
"deprecated": {
|
87
|
+
"description": "Indicates if the unit primitive is deprecated",
|
88
|
+
"type": "boolean",
|
89
|
+
"default": false
|
90
|
+
},
|
91
|
+
"deprecation_message": {
|
92
|
+
"description": "Message explaining why the unit primitive is deprecated and any additional context",
|
93
|
+
"type": ["string", "null"]
|
94
|
+
}
|
95
|
+
},
|
96
|
+
"additionalProperties": false
|
97
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: ask_build
|
3
|
+
description: Ask questions about GitLab builds.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: ask_commit
|
3
|
+
description: Ask questions about GitLab commits.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: ask_epic
|
3
|
+
description: Ask questions about GitLab epics.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: ask_issue
|
3
|
+
description: Ask questions about GitLab issues.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
name: complete_code
|
3
|
+
description: Helps you write code more efficiently by showing code suggestions as you type.
|
4
|
+
cut_off_date: 2024-02-15T00:00:00+00:00
|
5
|
+
min_gitlab_version_for_free_access:
|
6
|
+
min_gitlab_version: "16.8"
|
7
|
+
unit_primitive_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/497813
|
8
|
+
introduced_by_url: https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector/-/merge_requests/46
|
9
|
+
documentation_url: https://docs.gitlab.com/ee/user/project/repository/code_suggestions/#code-completion
|
10
|
+
group: group::code suggestions
|
11
|
+
feature_category: code_suggestions
|
12
|
+
backend_services:
|
13
|
+
- ai_gateway
|
14
|
+
add_ons:
|
15
|
+
- duo_pro
|
16
|
+
- duo_enterprise
|
17
|
+
license_types:
|
18
|
+
- premium
|
19
|
+
- ultimate
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
name: documentation_search
|
3
3
|
description: Perform semantic search on gitlab documentations for a given query.
|
4
|
-
cut_off_date:
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
5
|
min_gitlab_version_for_free_access: '16.8'
|
6
6
|
min_gitlab_version: '16.9'
|
7
7
|
unit_primitive_issue_url:
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
name: duo_workflow_execute_workflow
|
3
|
+
description: Automate tasks and help increase productivity in your development workflow by using GitLab Duo Workflow.
|
4
|
+
cut_off_date:
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo workflow
|
9
|
+
feature_category: duo_workflow
|
10
|
+
backend_services:
|
11
|
+
- duo_workflow_service
|
12
|
+
license_types:
|
13
|
+
- ultimate
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
name: explain_code
|
3
|
+
description: Explain function or method of the selected code.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::source code
|
9
|
+
feature_category: source_code_management
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
- duo_pro
|
15
|
+
license_types:
|
16
|
+
- premium
|
17
|
+
- ultimate
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
name: explain_vulnerability
|
3
3
|
description: Explain a security vulnerability of the given CVE or code.
|
4
|
-
cut_off_date:
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
5
|
min_gitlab_version_for_free_access: '17.2'
|
6
6
|
min_gitlab_version: '17.2'
|
7
7
|
unit_primitive_issue_url:
|
@@ -12,8 +12,6 @@ feature_category: vulnerability_management
|
|
12
12
|
backend_services:
|
13
13
|
- ai_gateway
|
14
14
|
add_ons:
|
15
|
-
- duo_pro
|
16
15
|
- duo_enterprise
|
17
16
|
license_types:
|
18
|
-
- premium
|
19
17
|
- ultimate
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
name: fix_code
|
3
|
+
description: Fix the selected code.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
- duo_pro
|
15
|
+
license_types:
|
16
|
+
- premium
|
17
|
+
- ultimate
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
name: generate_code
|
3
|
+
description: Helps you write code more efficiently by generating code as you type.
|
4
|
+
cut_off_date: 2024-02-15T00:00:00+00:00
|
5
|
+
min_gitlab_version_for_free_access:
|
6
|
+
min_gitlab_version: "16.8"
|
7
|
+
unit_primitive_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/497813
|
8
|
+
introduced_by_url: https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector/-/merge_requests/46
|
9
|
+
documentation_url: https://docs.gitlab.com/ee/user/project/repository/code_suggestions/#code-generation
|
10
|
+
group: group::code suggestions
|
11
|
+
feature_category: code_suggestions
|
12
|
+
backend_services:
|
13
|
+
- ai_gateway
|
14
|
+
add_ons:
|
15
|
+
- duo_pro
|
16
|
+
- duo_enterprise
|
17
|
+
license_types:
|
18
|
+
- premium
|
19
|
+
- ultimate
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
name: generate_commit_message
|
3
3
|
description: Generate a Git commit message.
|
4
|
-
cut_off_date:
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
5
|
min_gitlab_version_for_free_access: '17.2'
|
6
6
|
min_gitlab_version: '17.2'
|
7
7
|
unit_primitive_issue_url:
|
@@ -12,8 +12,6 @@ feature_category: code_review_workflow
|
|
12
12
|
backend_services:
|
13
13
|
- ai_gateway
|
14
14
|
add_ons:
|
15
|
-
- duo_pro
|
16
15
|
- duo_enterprise
|
17
16
|
license_types:
|
18
|
-
- premium
|
19
17
|
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: generate_issue_description
|
3
|
+
description: Generate an issue description.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::project management
|
9
|
+
feature_category: team_planning
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
name: glab_ask_git_command
|
3
3
|
description: Discover or recall git commands when and where you need them.
|
4
|
-
cut_off_date:
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
5
|
min_gitlab_version_for_free_access: '17.2'
|
6
6
|
min_gitlab_version: '17.2'
|
7
7
|
unit_primitive_issue_url:
|
@@ -12,8 +12,6 @@ feature_category: code_review_workflow
|
|
12
12
|
backend_services:
|
13
13
|
- ai_gateway
|
14
14
|
add_ons:
|
15
|
-
- duo_pro
|
16
15
|
- duo_enterprise
|
17
16
|
license_types:
|
18
|
-
- premium
|
19
17
|
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: include_dependency_context
|
3
|
+
description: Include dependency context in the prompt.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
name: include_file_context
|
3
|
+
description: Include file context in the prompt.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
- duo_pro
|
15
|
+
license_types:
|
16
|
+
- premium
|
17
|
+
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: include_issue_context
|
3
|
+
description: Include issue context in the prompt.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: include_merge_request_context
|
3
|
+
description: Include merge request context in the prompt.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
name: include_snippet_context
|
3
|
+
description: Include snippet context in the prompt.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
- duo_pro
|
15
|
+
license_types:
|
16
|
+
- premium
|
17
|
+
- ultimate
|
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
name: observability_all
|
3
|
+
description: Observability unit primitive.
|
4
|
+
cut_off_date:
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::platform insights
|
9
|
+
feature_category: observability
|
10
|
+
backend_services:
|
11
|
+
- observability
|
12
|
+
license_types:
|
13
|
+
- premium
|
14
|
+
- ultimate
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
name: refactor_code
|
3
|
+
description: Refactor the selected code.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
- duo_pro
|
15
|
+
license_types:
|
16
|
+
- premium
|
17
|
+
- ultimate
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
name: resolve_vulnerability
|
3
3
|
description: Write code that fixes the vulnerability.
|
4
|
-
cut_off_date:
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
5
|
min_gitlab_version_for_free_access: '17.2'
|
6
6
|
min_gitlab_version: '17.2'
|
7
7
|
unit_primitive_issue_url:
|
@@ -12,8 +12,6 @@ feature_category: vulnerability_management
|
|
12
12
|
backend_services:
|
13
13
|
- ai_gateway
|
14
14
|
add_ons:
|
15
|
-
- duo_pro
|
16
15
|
- duo_enterprise
|
17
16
|
license_types:
|
18
|
-
- premium
|
19
17
|
- ultimate
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
name: security_scans
|
3
|
+
description: Used to check your source code for known vulnerabilities.
|
4
|
+
cut_off_date:
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::static analysis
|
9
|
+
feature_category: static_application_security_testing
|
10
|
+
backend_services:
|
11
|
+
- security_gateway
|
12
|
+
license_types:
|
13
|
+
- ultimate
|
@@ -1,19 +1,17 @@
|
|
1
1
|
---
|
2
2
|
name: summarize_comments
|
3
3
|
description: Summarize comments of the issue or epic.
|
4
|
-
cut_off_date:
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
5
|
min_gitlab_version_for_free_access: '17.2'
|
6
6
|
min_gitlab_version: '17.2'
|
7
7
|
unit_primitive_issue_url:
|
8
8
|
introduced_by_url:
|
9
9
|
documentation_url:
|
10
|
-
group: group::
|
11
|
-
feature_category:
|
10
|
+
group: group::project management
|
11
|
+
feature_category: team_planning
|
12
12
|
backend_services:
|
13
13
|
- ai_gateway
|
14
14
|
add_ons:
|
15
|
-
- duo_pro
|
16
15
|
- duo_enterprise
|
17
16
|
license_types:
|
18
|
-
- premium
|
19
17
|
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: summarize_review
|
3
|
+
description: Summarize open reviews in merge requests.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::code review
|
9
|
+
feature_category: code_review_workflow
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
name: troubleshoot_job
|
3
3
|
description: Troubleshoot why a GitLab CI job failed and suggest a fix for it.
|
4
|
-
cut_off_date:
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
5
|
min_gitlab_version_for_free_access: '17.2'
|
6
6
|
min_gitlab_version: '17.2'
|
7
7
|
unit_primitive_issue_url:
|
@@ -12,8 +12,6 @@ feature_category: continuous_integration
|
|
12
12
|
backend_services:
|
13
13
|
- ai_gateway
|
14
14
|
add_ons:
|
15
|
-
- duo_pro
|
16
15
|
- duo_enterprise
|
17
16
|
license_types:
|
18
|
-
- premium
|
19
17
|
- ultimate
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
name: write_tests
|
3
|
+
description: Write tests for the selected code.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_pro
|
14
|
+
- duo_enterprise
|
15
|
+
license_types:
|
16
|
+
- premium
|
17
|
+
- ultimate
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'jwt'
|
4
|
+
|
5
|
+
module Gitlab
|
6
|
+
module CloudConnector
|
7
|
+
class JsonWebToken
|
8
|
+
SIGNING_ALGORITHM = 'RS256'
|
9
|
+
NOT_BEFORE_TIME_SEC = 5.seconds.to_i
|
10
|
+
|
11
|
+
attr_reader :issued_at, :expires_at
|
12
|
+
|
13
|
+
def initialize(issuer:, audience:, subject:, realm:, scopes:, ttl:, extra_claims: {})
|
14
|
+
@id = SecureRandom.uuid
|
15
|
+
@audience = audience
|
16
|
+
@subject = subject
|
17
|
+
@issuer = issuer
|
18
|
+
@issued_at = Time.current.to_i
|
19
|
+
@not_before = @issued_at - NOT_BEFORE_TIME_SEC
|
20
|
+
@expires_at = (@issued_at + ttl).to_i
|
21
|
+
@realm = realm
|
22
|
+
@scopes = scopes
|
23
|
+
@extra_claims = extra_claims
|
24
|
+
end
|
25
|
+
|
26
|
+
# jwk:
|
27
|
+
# The key (pair) as an instance of JWT::JWK.
|
28
|
+
#
|
29
|
+
# Returns a signed and Base64-encoded JSON Web Token string, to be
|
30
|
+
# written to the HTTP Authorization header field.
|
31
|
+
def encode(jwk)
|
32
|
+
header_fields = { typ: 'JWT', kid: jwk.kid }
|
33
|
+
|
34
|
+
JWT.encode(payload, jwk.signing_key, SIGNING_ALGORITHM, header_fields)
|
35
|
+
end
|
36
|
+
|
37
|
+
def payload
|
38
|
+
{
|
39
|
+
jti: @id,
|
40
|
+
aud: @audience,
|
41
|
+
sub: @subject,
|
42
|
+
iss: @issuer,
|
43
|
+
iat: @issued_at,
|
44
|
+
nbf: @not_before,
|
45
|
+
exp: @expires_at
|
46
|
+
}.merge(cloud_connector_claims)
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def cloud_connector_claims
|
52
|
+
{
|
53
|
+
gitlab_realm: @realm,
|
54
|
+
scopes: @scopes
|
55
|
+
}.merge(@extra_claims)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-cloud-connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikola Milojevic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '7.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '7.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jwt
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.9.3
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.9.3
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: gitlab-styles
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,27 +90,54 @@ extra_rdoc_files: []
|
|
62
90
|
files:
|
63
91
|
- ".rspec"
|
64
92
|
- ".rubocop.yml"
|
65
|
-
- CHANGELOG.md
|
66
93
|
- CONTRIBUTING.md
|
67
94
|
- LICENSE
|
68
95
|
- Makefile
|
69
96
|
- README.md
|
70
97
|
- Rakefile
|
71
|
-
- config/
|
72
|
-
- config/
|
73
|
-
- config/
|
74
|
-
- config/
|
75
|
-
- config/
|
76
|
-
- config/
|
77
|
-
- config/
|
78
|
-
- config/
|
79
|
-
- config/
|
80
|
-
- config/
|
81
|
-
- config/
|
82
|
-
- config/
|
83
|
-
- config/
|
84
|
-
- config/
|
85
|
-
- config/
|
98
|
+
- config/add_ons/duo_enterprise.yml
|
99
|
+
- config/add_ons/duo_pro.yml
|
100
|
+
- config/backend_services/ai_gateway.yml
|
101
|
+
- config/backend_services/duo_workflow_service.yml
|
102
|
+
- config/backend_services/observability.yml
|
103
|
+
- config/backend_services/security_gateway.yml
|
104
|
+
- config/license_types/premium.yml
|
105
|
+
- config/license_types/ultimate.yml
|
106
|
+
- config/schemas/add_on_schema.json
|
107
|
+
- config/schemas/backend_service_schema.json
|
108
|
+
- config/schemas/license_type_schema.json
|
109
|
+
- config/schemas/unit_primitive_schema.json
|
110
|
+
- config/unit_primitives/ask_build.yml
|
111
|
+
- config/unit_primitives/ask_commit.yml
|
112
|
+
- config/unit_primitives/ask_epic.yml
|
113
|
+
- config/unit_primitives/ask_issue.yml
|
114
|
+
- config/unit_primitives/code_suggestions.yml
|
115
|
+
- config/unit_primitives/complete_code.yml
|
116
|
+
- config/unit_primitives/documentation_search.yml
|
117
|
+
- config/unit_primitives/duo_chat.yml
|
118
|
+
- config/unit_primitives/duo_workflow_execute_workflow.yml
|
119
|
+
- config/unit_primitives/explain_code.yml
|
120
|
+
- config/unit_primitives/explain_vulnerability.yml
|
121
|
+
- config/unit_primitives/fix_code.yml
|
122
|
+
- config/unit_primitives/generate_code.yml
|
123
|
+
- config/unit_primitives/generate_commit_message.yml
|
124
|
+
- config/unit_primitives/generate_issue_description.yml
|
125
|
+
- config/unit_primitives/glab_ask_git_command.yml
|
126
|
+
- config/unit_primitives/include_dependency_context.yml
|
127
|
+
- config/unit_primitives/include_file_context.yml
|
128
|
+
- config/unit_primitives/include_issue_context.yml
|
129
|
+
- config/unit_primitives/include_merge_request_context.yml
|
130
|
+
- config/unit_primitives/include_snippet_context.yml
|
131
|
+
- config/unit_primitives/observability_all.yml
|
132
|
+
- config/unit_primitives/refactor_code.yml
|
133
|
+
- config/unit_primitives/resolve_vulnerability.yml
|
134
|
+
- config/unit_primitives/security_scans.yml
|
135
|
+
- config/unit_primitives/summarize_comments.yml
|
136
|
+
- config/unit_primitives/summarize_review.yml
|
137
|
+
- config/unit_primitives/troubleshoot_job.yml
|
138
|
+
- config/unit_primitives/write_tests.yml
|
139
|
+
- lib/cloud_connector.rb
|
140
|
+
- lib/gitlab/cloud_connector/json_web_token.rb
|
86
141
|
- lib/gitlab/cloud_connector/version.rb
|
87
142
|
homepage: https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector
|
88
143
|
licenses:
|
data/CHANGELOG.md
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|