@loopstack/github-module 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/github-oauth.provider.js +9 -12
- package/dist/github-oauth.provider.js.map +1 -1
- package/dist/github.module.js +59 -62
- package/dist/github.module.js.map +1 -1
- package/dist/index.d.ts +27 -27
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -43
- package/dist/index.js.map +1 -1
- package/dist/tools/actions/github-get-workflow-run.tool.js +15 -18
- package/dist/tools/actions/github-get-workflow-run.tool.js.map +1 -1
- package/dist/tools/actions/github-list-workflow-runs.tool.js +18 -21
- package/dist/tools/actions/github-list-workflow-runs.tool.js.map +1 -1
- package/dist/tools/actions/github-trigger-workflow.tool.js +17 -20
- package/dist/tools/actions/github-trigger-workflow.tool.js.map +1 -1
- package/dist/tools/content/github-create-or-update-file.tool.js +19 -22
- package/dist/tools/content/github-create-or-update-file.tool.js.map +1 -1
- package/dist/tools/content/github-get-commit.tool.js +15 -18
- package/dist/tools/content/github-get-commit.tool.js.map +1 -1
- package/dist/tools/content/github-get-file-content.tool.js +16 -19
- package/dist/tools/content/github-get-file-content.tool.js.map +1 -1
- package/dist/tools/content/github-list-directory.tool.js +16 -19
- package/dist/tools/content/github-list-directory.tool.js.map +1 -1
- package/dist/tools/issues/github-create-issue-comment.tool.js +16 -19
- package/dist/tools/issues/github-create-issue-comment.tool.js.map +1 -1
- package/dist/tools/issues/github-create-issue.tool.js +18 -21
- package/dist/tools/issues/github-create-issue.tool.js.map +1 -1
- package/dist/tools/issues/github-get-issue.tool.js +15 -18
- package/dist/tools/issues/github-get-issue.tool.js.map +1 -1
- package/dist/tools/issues/github-list-issues.tool.js +19 -22
- package/dist/tools/issues/github-list-issues.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-create-pull-request.tool.js +19 -22
- package/dist/tools/pull-requests/github-create-pull-request.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-get-pull-request.tool.js +15 -18
- package/dist/tools/pull-requests/github-get-pull-request.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-list-pr-reviews.tool.js +15 -18
- package/dist/tools/pull-requests/github-list-pr-reviews.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-list-pull-requests.tool.js +18 -21
- package/dist/tools/pull-requests/github-list-pull-requests.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-merge-pull-request.tool.js +18 -21
- package/dist/tools/pull-requests/github-merge-pull-request.tool.js.map +1 -1
- package/dist/tools/repos/github-create-repo.tool.js +16 -19
- package/dist/tools/repos/github-create-repo.tool.js.map +1 -1
- package/dist/tools/repos/github-get-repo.tool.js +14 -17
- package/dist/tools/repos/github-get-repo.tool.js.map +1 -1
- package/dist/tools/repos/github-list-branches.tool.js +15 -18
- package/dist/tools/repos/github-list-branches.tool.js.map +1 -1
- package/dist/tools/repos/github-list-repos.tool.js +16 -19
- package/dist/tools/repos/github-list-repos.tool.js.map +1 -1
- package/dist/tools/search/github-search-code.tool.js +15 -18
- package/dist/tools/search/github-search-code.tool.js.map +1 -1
- package/dist/tools/search/github-search-issues.tool.js +16 -19
- package/dist/tools/search/github-search-issues.tool.js.map +1 -1
- package/dist/tools/search/github-search-repos.tool.js +16 -19
- package/dist/tools/search/github-search-repos.tool.js.map +1 -1
- package/dist/tools/users/github-get-authenticated-user.tool.d.ts +1 -1
- package/dist/tools/users/github-get-authenticated-user.tool.d.ts.map +1 -1
- package/dist/tools/users/github-get-authenticated-user.tool.js +12 -15
- package/dist/tools/users/github-get-authenticated-user.tool.js.map +1 -1
- package/dist/tools/users/github-list-user-orgs.tool.js +13 -16
- package/dist/tools/users/github-list-user-orgs.tool.js.map +1 -1
- package/package.json +8 -26
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -9,15 +8,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
10
|
var GitHubOAuthProvider_1;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const config_1 = require("@nestjs/config");
|
|
16
|
-
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
11
|
+
import { Injectable, Logger } from '@nestjs/common';
|
|
12
|
+
import { ConfigService } from '@nestjs/config';
|
|
13
|
+
import { OAuthProviderRegistry } from '@loopstack/oauth-module';
|
|
17
14
|
let GitHubOAuthProvider = GitHubOAuthProvider_1 = class GitHubOAuthProvider {
|
|
18
15
|
configService;
|
|
19
16
|
providerRegistry;
|
|
20
|
-
logger = new
|
|
17
|
+
logger = new Logger(GitHubOAuthProvider_1.name);
|
|
21
18
|
providerId = 'github';
|
|
22
19
|
defaultScopes = ['repo', 'user', 'workflow', 'read:org'];
|
|
23
20
|
constructor(configService, providerRegistry) {
|
|
@@ -82,10 +79,10 @@ let GitHubOAuthProvider = GitHubOAuthProvider_1 = class GitHubOAuthProvider {
|
|
|
82
79
|
throw new Error('GitHub tokens do not expire and cannot be refreshed.');
|
|
83
80
|
}
|
|
84
81
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
(
|
|
88
|
-
|
|
89
|
-
oauth_module_1.OAuthProviderRegistry])
|
|
82
|
+
GitHubOAuthProvider = GitHubOAuthProvider_1 = __decorate([
|
|
83
|
+
Injectable(),
|
|
84
|
+
__metadata("design:paramtypes", [ConfigService,
|
|
85
|
+
OAuthProviderRegistry])
|
|
90
86
|
], GitHubOAuthProvider);
|
|
87
|
+
export { GitHubOAuthProvider };
|
|
91
88
|
//# sourceMappingURL=github-oauth.provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-oauth.provider.js","sourceRoot":"","sources":["../src/github-oauth.provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-oauth.provider.js","sourceRoot":"","sources":["../src/github-oauth.provider.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAgB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAA0B,qBAAqB,EAAiB,MAAM,yBAAyB,CAAC;AAGhG,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAOX;IACA;IAPF,MAAM,GAAG,IAAI,MAAM,CAAC,qBAAmB,CAAC,IAAI,CAAC,CAAC;IAEtD,UAAU,GAAG,QAAQ,CAAC;IACtB,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAElE,YACmB,aAA4B,EAC5B,gBAAuC;QADvC,kBAAa,GAAb,aAAa,CAAe;QAC5B,qBAAgB,GAAhB,gBAAgB,CAAuB;IACvD,CAAC;IAEJ,YAAY;QACV,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IAED,IAAY,QAAQ;QAClB,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,kBAAkB,CAAC,CAAC;QAC9D,IAAI,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QAC/D,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAY,YAAY;QACtB,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,sBAAsB,CAAC,CAAC;QACtE,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,C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pC,CAAC;QAEF,OAAO;YACL,WAAW,EAAE,MAAM,CAAC,YAAY;YAChC,SAAS,EAAE,SAAS;YACpB,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC;IACJ,CAAC;IAED,YAAY;QACV,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;CACF,CAAA;AA/EY,mBAAmB;IAD/B,UAAU,EAAE;qCAQuB,aAAa;QACV,qBAAqB;GAR/C,mBAAmB,CA+E/B"}
|
package/dist/github.module.js
CHANGED
|
@@ -1,75 +1,72 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const github_get_authenticated_user_tool_1 = require("./tools/users/github-get-authenticated-user.tool");
|
|
37
|
-
const github_list_user_orgs_tool_1 = require("./tools/users/github-list-user-orgs.tool");
|
|
7
|
+
import { Module } from '@nestjs/common';
|
|
8
|
+
import { OAuthModule } from '@loopstack/oauth-module';
|
|
9
|
+
import { GitHubOAuthProvider } from './github-oauth.provider.js';
|
|
10
|
+
import { GitHubGetWorkflowRunTool } from './tools/actions/github-get-workflow-run.tool.js';
|
|
11
|
+
import { GitHubListWorkflowRunsTool } from './tools/actions/github-list-workflow-runs.tool.js';
|
|
12
|
+
import { GitHubTriggerWorkflowTool } from './tools/actions/github-trigger-workflow.tool.js';
|
|
13
|
+
import { GitHubCreateOrUpdateFileTool } from './tools/content/github-create-or-update-file.tool.js';
|
|
14
|
+
import { GitHubGetCommitTool } from './tools/content/github-get-commit.tool.js';
|
|
15
|
+
import { GitHubGetFileContentTool } from './tools/content/github-get-file-content.tool.js';
|
|
16
|
+
import { GitHubListDirectoryTool } from './tools/content/github-list-directory.tool.js';
|
|
17
|
+
import { GitHubCreateIssueCommentTool } from './tools/issues/github-create-issue-comment.tool.js';
|
|
18
|
+
import { GitHubCreateIssueTool } from './tools/issues/github-create-issue.tool.js';
|
|
19
|
+
import { GitHubGetIssueTool } from './tools/issues/github-get-issue.tool.js';
|
|
20
|
+
import { GitHubListIssuesTool } from './tools/issues/github-list-issues.tool.js';
|
|
21
|
+
import { GitHubCreatePullRequestTool } from './tools/pull-requests/github-create-pull-request.tool.js';
|
|
22
|
+
import { GitHubGetPullRequestTool } from './tools/pull-requests/github-get-pull-request.tool.js';
|
|
23
|
+
import { GitHubListPrReviewsTool } from './tools/pull-requests/github-list-pr-reviews.tool.js';
|
|
24
|
+
import { GitHubListPullRequestsTool } from './tools/pull-requests/github-list-pull-requests.tool.js';
|
|
25
|
+
import { GitHubMergePullRequestTool } from './tools/pull-requests/github-merge-pull-request.tool.js';
|
|
26
|
+
import { GitHubCreateRepoTool } from './tools/repos/github-create-repo.tool.js';
|
|
27
|
+
import { GitHubGetRepoTool } from './tools/repos/github-get-repo.tool.js';
|
|
28
|
+
import { GitHubListBranchesTool } from './tools/repos/github-list-branches.tool.js';
|
|
29
|
+
import { GitHubListReposTool } from './tools/repos/github-list-repos.tool.js';
|
|
30
|
+
import { GitHubSearchCodeTool } from './tools/search/github-search-code.tool.js';
|
|
31
|
+
import { GitHubSearchIssuesTool } from './tools/search/github-search-issues.tool.js';
|
|
32
|
+
import { GitHubSearchReposTool } from './tools/search/github-search-repos.tool.js';
|
|
33
|
+
import { GitHubGetAuthenticatedUserTool } from './tools/users/github-get-authenticated-user.tool.js';
|
|
34
|
+
import { GitHubListUserOrgsTool } from './tools/users/github-list-user-orgs.tool.js';
|
|
38
35
|
const tools = [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
36
|
+
GitHubListReposTool,
|
|
37
|
+
GitHubGetRepoTool,
|
|
38
|
+
GitHubCreateRepoTool,
|
|
39
|
+
GitHubListBranchesTool,
|
|
40
|
+
GitHubListIssuesTool,
|
|
41
|
+
GitHubGetIssueTool,
|
|
42
|
+
GitHubCreateIssueTool,
|
|
43
|
+
GitHubCreateIssueCommentTool,
|
|
44
|
+
GitHubListPullRequestsTool,
|
|
45
|
+
GitHubGetPullRequestTool,
|
|
46
|
+
GitHubCreatePullRequestTool,
|
|
47
|
+
GitHubMergePullRequestTool,
|
|
48
|
+
GitHubListPrReviewsTool,
|
|
49
|
+
GitHubGetFileContentTool,
|
|
50
|
+
GitHubCreateOrUpdateFileTool,
|
|
51
|
+
GitHubListDirectoryTool,
|
|
52
|
+
GitHubGetCommitTool,
|
|
53
|
+
GitHubListWorkflowRunsTool,
|
|
54
|
+
GitHubTriggerWorkflowTool,
|
|
55
|
+
GitHubGetWorkflowRunTool,
|
|
56
|
+
GitHubSearchCodeTool,
|
|
57
|
+
GitHubSearchReposTool,
|
|
58
|
+
GitHubSearchIssuesTool,
|
|
59
|
+
GitHubGetAuthenticatedUserTool,
|
|
60
|
+
GitHubListUserOrgsTool,
|
|
64
61
|
];
|
|
65
62
|
let GitHubModule = class GitHubModule {
|
|
66
63
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
exports: [github_oauth_provider_1.GitHubOAuthProvider, ...tools],
|
|
64
|
+
GitHubModule = __decorate([
|
|
65
|
+
Module({
|
|
66
|
+
imports: [OAuthModule],
|
|
67
|
+
providers: [GitHubOAuthProvider, ...tools],
|
|
68
|
+
exports: [GitHubOAuthProvider, ...tools],
|
|
73
69
|
})
|
|
74
70
|
], GitHubModule);
|
|
71
|
+
export { GitHubModule };
|
|
75
72
|
//# sourceMappingURL=github.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.module.js","sourceRoot":"","sources":["../src/github.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github.module.js","sourceRoot":"","sources":["../src/github.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,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wB;IACxB,4BAA4B;IAC5B,uBAAuB;IACvB,mBAAmB;IACnB,0BAA0B;IAC1B,yBAAyB;IACzB,wBAAwB;IACxB,oBAAoB;IACpB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,sBAAsB;CACvB,CAAC;AAOK,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,YAAY;IALxB,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,WAAW,CAAC;QACtB,SAAS,EAAE,CAAC,mBAAmB,EAAE,GAAG,KAAK,CAAC;QAC1C,OAAO,EAAE,CAAC,mBAAmB,EAAE,GAAG,KAAK,CAAC;KACzC,CAAC;GACW,YAAY,CAAG"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export * from './github.module';
|
|
2
|
-
export * from './github-oauth.provider';
|
|
3
|
-
export * from './tools/repos/github-list-repos.tool';
|
|
4
|
-
export * from './tools/repos/github-get-repo.tool';
|
|
5
|
-
export * from './tools/repos/github-create-repo.tool';
|
|
6
|
-
export * from './tools/repos/github-list-branches.tool';
|
|
7
|
-
export * from './tools/issues/github-list-issues.tool';
|
|
8
|
-
export * from './tools/issues/github-get-issue.tool';
|
|
9
|
-
export * from './tools/issues/github-create-issue.tool';
|
|
10
|
-
export * from './tools/issues/github-create-issue-comment.tool';
|
|
11
|
-
export * from './tools/pull-requests/github-list-pull-requests.tool';
|
|
12
|
-
export * from './tools/pull-requests/github-get-pull-request.tool';
|
|
13
|
-
export * from './tools/pull-requests/github-create-pull-request.tool';
|
|
14
|
-
export * from './tools/pull-requests/github-merge-pull-request.tool';
|
|
15
|
-
export * from './tools/pull-requests/github-list-pr-reviews.tool';
|
|
16
|
-
export * from './tools/content/github-get-file-content.tool';
|
|
17
|
-
export * from './tools/content/github-create-or-update-file.tool';
|
|
18
|
-
export * from './tools/content/github-list-directory.tool';
|
|
19
|
-
export * from './tools/content/github-get-commit.tool';
|
|
20
|
-
export * from './tools/actions/github-list-workflow-runs.tool';
|
|
21
|
-
export * from './tools/actions/github-trigger-workflow.tool';
|
|
22
|
-
export * from './tools/actions/github-get-workflow-run.tool';
|
|
23
|
-
export * from './tools/search/github-search-code.tool';
|
|
24
|
-
export * from './tools/search/github-search-repos.tool';
|
|
25
|
-
export * from './tools/search/github-search-issues.tool';
|
|
26
|
-
export * from './tools/users/github-get-authenticated-user.tool';
|
|
27
|
-
export * from './tools/users/github-list-user-orgs.tool';
|
|
1
|
+
export * from './github.module.js';
|
|
2
|
+
export * from './github-oauth.provider.js';
|
|
3
|
+
export * from './tools/repos/github-list-repos.tool.js';
|
|
4
|
+
export * from './tools/repos/github-get-repo.tool.js';
|
|
5
|
+
export * from './tools/repos/github-create-repo.tool.js';
|
|
6
|
+
export * from './tools/repos/github-list-branches.tool.js';
|
|
7
|
+
export * from './tools/issues/github-list-issues.tool.js';
|
|
8
|
+
export * from './tools/issues/github-get-issue.tool.js';
|
|
9
|
+
export * from './tools/issues/github-create-issue.tool.js';
|
|
10
|
+
export * from './tools/issues/github-create-issue-comment.tool.js';
|
|
11
|
+
export * from './tools/pull-requests/github-list-pull-requests.tool.js';
|
|
12
|
+
export * from './tools/pull-requests/github-get-pull-request.tool.js';
|
|
13
|
+
export * from './tools/pull-requests/github-create-pull-request.tool.js';
|
|
14
|
+
export * from './tools/pull-requests/github-merge-pull-request.tool.js';
|
|
15
|
+
export * from './tools/pull-requests/github-list-pr-reviews.tool.js';
|
|
16
|
+
export * from './tools/content/github-get-file-content.tool.js';
|
|
17
|
+
export * from './tools/content/github-create-or-update-file.tool.js';
|
|
18
|
+
export * from './tools/content/github-list-directory.tool.js';
|
|
19
|
+
export * from './tools/content/github-get-commit.tool.js';
|
|
20
|
+
export * from './tools/actions/github-list-workflow-runs.tool.js';
|
|
21
|
+
export * from './tools/actions/github-trigger-workflow.tool.js';
|
|
22
|
+
export * from './tools/actions/github-get-workflow-run.tool.js';
|
|
23
|
+
export * from './tools/search/github-search-code.tool.js';
|
|
24
|
+
export * from './tools/search/github-search-repos.tool.js';
|
|
25
|
+
export * from './tools/search/github-search-issues.tool.js';
|
|
26
|
+
export * from './tools/users/github-get-authenticated-user.tool.js';
|
|
27
|
+
export * from './tools/users/github-list-user-orgs.tool.js';
|
|
28
28
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oDAAoD,CAAC;AACnE,cAAc,yDAAyD,CAAC;AACxE,cAAc,uDAAuD,CAAC;AACtE,cAAc,0DAA0D,CAAC;AACzE,cAAc,yDAAyD,CAAC;AACxE,cAAc,sDAAsD,CAAC;AACrE,cAAc,iDAAiD,CAAC;AAChE,cAAc,sDAAsD,CAAC;AACrE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,iDAAiD,CAAC;AAChE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qDAAqD,CAAC;AACpE,cAAc,6CAA6C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,44 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
__exportStar(require("./tools/pull-requests/github-get-pull-request.tool"), exports);
|
|
29
|
-
__exportStar(require("./tools/pull-requests/github-create-pull-request.tool"), exports);
|
|
30
|
-
__exportStar(require("./tools/pull-requests/github-merge-pull-request.tool"), exports);
|
|
31
|
-
__exportStar(require("./tools/pull-requests/github-list-pr-reviews.tool"), exports);
|
|
32
|
-
__exportStar(require("./tools/content/github-get-file-content.tool"), exports);
|
|
33
|
-
__exportStar(require("./tools/content/github-create-or-update-file.tool"), exports);
|
|
34
|
-
__exportStar(require("./tools/content/github-list-directory.tool"), exports);
|
|
35
|
-
__exportStar(require("./tools/content/github-get-commit.tool"), exports);
|
|
36
|
-
__exportStar(require("./tools/actions/github-list-workflow-runs.tool"), exports);
|
|
37
|
-
__exportStar(require("./tools/actions/github-trigger-workflow.tool"), exports);
|
|
38
|
-
__exportStar(require("./tools/actions/github-get-workflow-run.tool"), exports);
|
|
39
|
-
__exportStar(require("./tools/search/github-search-code.tool"), exports);
|
|
40
|
-
__exportStar(require("./tools/search/github-search-repos.tool"), exports);
|
|
41
|
-
__exportStar(require("./tools/search/github-search-issues.tool"), exports);
|
|
42
|
-
__exportStar(require("./tools/users/github-get-authenticated-user.tool"), exports);
|
|
43
|
-
__exportStar(require("./tools/users/github-list-user-orgs.tool"), exports);
|
|
1
|
+
export * from './github.module.js';
|
|
2
|
+
export * from './github-oauth.provider.js';
|
|
3
|
+
export * from './tools/repos/github-list-repos.tool.js';
|
|
4
|
+
export * from './tools/repos/github-get-repo.tool.js';
|
|
5
|
+
export * from './tools/repos/github-create-repo.tool.js';
|
|
6
|
+
export * from './tools/repos/github-list-branches.tool.js';
|
|
7
|
+
export * from './tools/issues/github-list-issues.tool.js';
|
|
8
|
+
export * from './tools/issues/github-get-issue.tool.js';
|
|
9
|
+
export * from './tools/issues/github-create-issue.tool.js';
|
|
10
|
+
export * from './tools/issues/github-create-issue-comment.tool.js';
|
|
11
|
+
export * from './tools/pull-requests/github-list-pull-requests.tool.js';
|
|
12
|
+
export * from './tools/pull-requests/github-get-pull-request.tool.js';
|
|
13
|
+
export * from './tools/pull-requests/github-create-pull-request.tool.js';
|
|
14
|
+
export * from './tools/pull-requests/github-merge-pull-request.tool.js';
|
|
15
|
+
export * from './tools/pull-requests/github-list-pr-reviews.tool.js';
|
|
16
|
+
export * from './tools/content/github-get-file-content.tool.js';
|
|
17
|
+
export * from './tools/content/github-create-or-update-file.tool.js';
|
|
18
|
+
export * from './tools/content/github-list-directory.tool.js';
|
|
19
|
+
export * from './tools/content/github-get-commit.tool.js';
|
|
20
|
+
export * from './tools/actions/github-list-workflow-runs.tool.js';
|
|
21
|
+
export * from './tools/actions/github-trigger-workflow.tool.js';
|
|
22
|
+
export * from './tools/actions/github-get-workflow-run.tool.js';
|
|
23
|
+
export * from './tools/search/github-search-code.tool.js';
|
|
24
|
+
export * from './tools/search/github-search-repos.tool.js';
|
|
25
|
+
export * from './tools/search/github-search-issues.tool.js';
|
|
26
|
+
export * from './tools/users/github-get-authenticated-user.tool.js';
|
|
27
|
+
export * from './tools/users/github-list-user-orgs.tool.js';
|
|
44
28
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oDAAoD,CAAC;AACnE,cAAc,yDAAyD,CAAC;AACxE,cAAc,uDAAuD,CAAC;AACtE,cAAc,0DAA0D,CAAC;AACzE,cAAc,yDAAyD,CAAC;AACxE,cAAc,sDAAsD,CAAC;AACrE,cAAc,iDAAiD,CAAC;AAChE,cAAc,sDAAsD,CAAC;AACrE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,iDAAiD,CAAC;AAChE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qDAAqD,CAAC;AACpE,cAAc,6CAA6C,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -9,21 +8,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
10
|
var GitHubGetWorkflowRunTool_1;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
18
|
-
const inputSchema = zod_1.z
|
|
11
|
+
import { Inject, Logger } from '@nestjs/common';
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
import { BaseTool, Tool } from '@loopstack/common';
|
|
14
|
+
import { OAuthTokenStore } from '@loopstack/oauth-module';
|
|
15
|
+
const inputSchema = z
|
|
19
16
|
.object({
|
|
20
|
-
owner:
|
|
21
|
-
repo:
|
|
22
|
-
runId:
|
|
17
|
+
owner: z.string(),
|
|
18
|
+
repo: z.string(),
|
|
19
|
+
runId: z.number(),
|
|
23
20
|
})
|
|
24
21
|
.strict();
|
|
25
|
-
let GitHubGetWorkflowRunTool = GitHubGetWorkflowRunTool_1 = class GitHubGetWorkflowRunTool extends
|
|
26
|
-
logger = new
|
|
22
|
+
let GitHubGetWorkflowRunTool = GitHubGetWorkflowRunTool_1 = class GitHubGetWorkflowRunTool extends BaseTool {
|
|
23
|
+
logger = new Logger(GitHubGetWorkflowRunTool_1.name);
|
|
27
24
|
tokenStore;
|
|
28
25
|
async call(args) {
|
|
29
26
|
const accessToken = await this.tokenStore.getValidAccessToken(this.ctx.context.userId, 'github');
|
|
@@ -85,17 +82,17 @@ let GitHubGetWorkflowRunTool = GitHubGetWorkflowRunTool_1 = class GitHubGetWorkf
|
|
|
85
82
|
};
|
|
86
83
|
}
|
|
87
84
|
};
|
|
88
|
-
exports.GitHubGetWorkflowRunTool = GitHubGetWorkflowRunTool;
|
|
89
85
|
__decorate([
|
|
90
|
-
|
|
91
|
-
__metadata("design:type",
|
|
86
|
+
Inject(),
|
|
87
|
+
__metadata("design:type", OAuthTokenStore)
|
|
92
88
|
], GitHubGetWorkflowRunTool.prototype, "tokenStore", void 0);
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
GitHubGetWorkflowRunTool = GitHubGetWorkflowRunTool_1 = __decorate([
|
|
90
|
+
Tool({
|
|
95
91
|
uiConfig: {
|
|
96
92
|
description: 'Gets detailed information about a specific GitHub Actions workflow run. Returns { error: "unauthorized" } if no valid token is available.',
|
|
97
93
|
},
|
|
98
94
|
schema: inputSchema,
|
|
99
95
|
})
|
|
100
96
|
], GitHubGetWorkflowRunTool);
|
|
97
|
+
export { GitHubGetWorkflowRunTool };
|
|
101
98
|
//# sourceMappingURL=github-get-workflow-run.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-get-workflow-run.tool.js","sourceRoot":"","sources":["../../../src/tools/actions/github-get-workflow-run.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-get-workflow-run.tool.js","sourceRoot":"","sources":["../../../src/tools/actions/github-get-workflow-run.tool.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAc,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC;KACD,MAAM,EAAE,CAAC;AAWL,IAAM,wBAAwB,gCAA9B,MAAM,wBAAyB,SAAQ,QAAQ;IACnC,MAAM,GAAG,IAAI,MAAM,CAAC,0BAAwB,CAAC,IAAI,CAAC,CAAC;IAG5D,UAAU,CAAkB;IAEpC,KAAK,CAAC,IAAI,CAAC,IAA8B;QACvC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEjG,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO;gBACL,IAAI,EAAE;oBACJ,KAAK,EAAE,cAAc;oBACrB,OAAO,EA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BACV,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,MAAM,EAAE,GAAG,CAAC,MAAM;oBAClB,UAAU,EAAE,GAAG,CAAC,UAAU;oBAC1B,UAAU,EAAE,GAAG,CAAC,WAAW;oBAC3B,OAAO,EAAE,GAAG,CAAC,QAAQ;oBACrB,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,UAAU,EAAE,GAAG,CAAC,WAAW;oBAC3B,SAAS,EAAE,GAAG,CAAC,UAAU;oBACzB,UAAU,EAAE,GAAG,CAAC,WAAW;oBAC3B,SAAS,EAAE,GAAG,CAAC,UAAU;oBACzB,SAAS,EAAE,GAAG,CAAC,UAAU;oBACzB,YAAY,EAAE,GAAG,CAAC,cAAc;oBAChC,OAAO,EAAE,GAAG,CAAC,QAAQ;iBACtB;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAlFS;IADP,MAAM,EAAE;8BACW,eAAe;4DAAC;AAJzB,wBAAwB;IAPpC,IAAI,CAAC;QACJ,QAAQ,EAAE;YACR,WAAW,EACT,2IAA2I;SAC9I;QACD,MAAM,EAAE,WAAW;KACpB,CAAC;GACW,wBAAwB,CAsFpC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -9,18 +8,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
10
|
var GitHubListWorkflowRunsTool_1;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
18
|
-
const inputSchema = zod_1.z
|
|
11
|
+
import { Inject, Logger } from '@nestjs/common';
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
import { BaseTool, Tool } from '@loopstack/common';
|
|
14
|
+
import { OAuthTokenStore } from '@loopstack/oauth-module';
|
|
15
|
+
const inputSchema = z
|
|
19
16
|
.object({
|
|
20
|
-
owner:
|
|
21
|
-
repo:
|
|
22
|
-
branch:
|
|
23
|
-
status:
|
|
17
|
+
owner: z.string(),
|
|
18
|
+
repo: z.string(),
|
|
19
|
+
branch: z.string().optional(),
|
|
20
|
+
status: z
|
|
24
21
|
.enum([
|
|
25
22
|
'completed',
|
|
26
23
|
'action_required',
|
|
@@ -38,12 +35,12 @@ const inputSchema = zod_1.z
|
|
|
38
35
|
'pending',
|
|
39
36
|
])
|
|
40
37
|
.optional(),
|
|
41
|
-
perPage:
|
|
42
|
-
page:
|
|
38
|
+
perPage: z.number().default(30),
|
|
39
|
+
page: z.number().default(1),
|
|
43
40
|
})
|
|
44
41
|
.strict();
|
|
45
|
-
let GitHubListWorkflowRunsTool = GitHubListWorkflowRunsTool_1 = class GitHubListWorkflowRunsTool extends
|
|
46
|
-
logger = new
|
|
42
|
+
let GitHubListWorkflowRunsTool = GitHubListWorkflowRunsTool_1 = class GitHubListWorkflowRunsTool extends BaseTool {
|
|
43
|
+
logger = new Logger(GitHubListWorkflowRunsTool_1.name);
|
|
47
44
|
tokenStore;
|
|
48
45
|
async call(args) {
|
|
49
46
|
const accessToken = await this.tokenStore.getValidAccessToken(this.ctx.context.userId, 'github');
|
|
@@ -108,17 +105,17 @@ let GitHubListWorkflowRunsTool = GitHubListWorkflowRunsTool_1 = class GitHubList
|
|
|
108
105
|
};
|
|
109
106
|
}
|
|
110
107
|
};
|
|
111
|
-
exports.GitHubListWorkflowRunsTool = GitHubListWorkflowRunsTool;
|
|
112
108
|
__decorate([
|
|
113
|
-
|
|
114
|
-
__metadata("design:type",
|
|
109
|
+
Inject(),
|
|
110
|
+
__metadata("design:type", OAuthTokenStore)
|
|
115
111
|
], GitHubListWorkflowRunsTool.prototype, "tokenStore", void 0);
|
|
116
|
-
|
|
117
|
-
|
|
112
|
+
GitHubListWorkflowRunsTool = GitHubListWorkflowRunsTool_1 = __decorate([
|
|
113
|
+
Tool({
|
|
118
114
|
uiConfig: {
|
|
119
115
|
description: 'Lists workflow runs for a GitHub repository. Returns { error: "unauthorized" } if no valid token is available.',
|
|
120
116
|
},
|
|
121
117
|
schema: inputSchema,
|
|
122
118
|
})
|
|
123
119
|
], GitHubListWorkflowRunsTool);
|
|
120
|
+
export { GitHubListWorkflowRunsTool };
|
|
124
121
|
//# sourceMappingURL=github-list-workflow-runs.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-list-workflow-runs.tool.js","sourceRoot":"","sources":["../../../src/tools/actions/github-list-workflow-runs.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-list-workflow-runs.tool.js","sourceRoot":"","sources":["../../../src/tools/actions/github-list-workflow-runs.tool.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAc,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,CAAC;SACN,IAAI,CAAC;QACJ,WAAW;QACX,iBAAiB;QACjB,WAAW;QACX,SAAS;QACT,SAAS;QACT,SAA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M,EAAE,GAAG,CAAC,MAAM;YAClB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,UAAU,EAAE,GAAG,CAAC,WAAW;YAC3B,OAAO,EAAE,GAAG,CAAC,QAAQ;YACrB,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,SAAS,EAAE,GAAG,CAAC,UAAU;YACzB,SAAS,EAAE,GAAG,CAAC,UAAU;YACzB,OAAO,EAAE,GAAG,CAAC,QAAQ;SACtB,CAAC,CAAC,CAAC;QAEJ,OAAO;YACL,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE;SAC7C,CAAC;IACJ,CAAC;CACF,CAAA;AArFS;IADP,MAAM,EAAE;8BACW,eAAe;8DAAC;AAJzB,0BAA0B;IAPtC,IAAI,CAAC;QACJ,QAAQ,EAAE;YACR,WAAW,EACT,gHAAgH;SACnH;QACD,MAAM,EAAE,WAAW;KACpB,CAAC;GACW,0BAA0B,CAyFtC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -9,23 +8,21 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
10
|
var GitHubTriggerWorkflowTool_1;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
18
|
-
const inputSchema = zod_1.z
|
|
11
|
+
import { Inject, Logger } from '@nestjs/common';
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
import { BaseTool, Tool } from '@loopstack/common';
|
|
14
|
+
import { OAuthTokenStore } from '@loopstack/oauth-module';
|
|
15
|
+
const inputSchema = z
|
|
19
16
|
.object({
|
|
20
|
-
owner:
|
|
21
|
-
repo:
|
|
22
|
-
workflowId:
|
|
23
|
-
ref:
|
|
24
|
-
inputs:
|
|
17
|
+
owner: z.string(),
|
|
18
|
+
repo: z.string(),
|
|
19
|
+
workflowId: z.string(),
|
|
20
|
+
ref: z.string(),
|
|
21
|
+
inputs: z.record(z.string(), z.string()).optional(),
|
|
25
22
|
})
|
|
26
23
|
.strict();
|
|
27
|
-
let GitHubTriggerWorkflowTool = GitHubTriggerWorkflowTool_1 = class GitHubTriggerWorkflowTool extends
|
|
28
|
-
logger = new
|
|
24
|
+
let GitHubTriggerWorkflowTool = GitHubTriggerWorkflowTool_1 = class GitHubTriggerWorkflowTool extends BaseTool {
|
|
25
|
+
logger = new Logger(GitHubTriggerWorkflowTool_1.name);
|
|
29
26
|
tokenStore;
|
|
30
27
|
async call(args) {
|
|
31
28
|
const accessToken = await this.tokenStore.getValidAccessToken(this.ctx.context.userId, 'github');
|
|
@@ -80,17 +77,17 @@ let GitHubTriggerWorkflowTool = GitHubTriggerWorkflowTool_1 = class GitHubTrigge
|
|
|
80
77
|
};
|
|
81
78
|
}
|
|
82
79
|
};
|
|
83
|
-
exports.GitHubTriggerWorkflowTool = GitHubTriggerWorkflowTool;
|
|
84
80
|
__decorate([
|
|
85
|
-
|
|
86
|
-
__metadata("design:type",
|
|
81
|
+
Inject(),
|
|
82
|
+
__metadata("design:type", OAuthTokenStore)
|
|
87
83
|
], GitHubTriggerWorkflowTool.prototype, "tokenStore", void 0);
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
GitHubTriggerWorkflowTool = GitHubTriggerWorkflowTool_1 = __decorate([
|
|
85
|
+
Tool({
|
|
90
86
|
uiConfig: {
|
|
91
87
|
description: 'Triggers a GitHub Actions workflow dispatch event. Returns 204 No Content on success. Returns { error: "unauthorized" } if no valid token is available.',
|
|
92
88
|
},
|
|
93
89
|
schema: inputSchema,
|
|
94
90
|
})
|
|
95
91
|
], GitHubTriggerWorkflowTool);
|
|
92
|
+
export { GitHubTriggerWorkflowTool };
|
|
96
93
|
//# sourceMappingURL=github-trigger-workflow.tool.js.map
|