@activepieces/piece-github 0.5.7 → 0.5.9
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/package.json +3 -4
- package/src/i18n/de.json +0 -1
- package/src/i18n/es.json +0 -1
- package/src/i18n/fr.json +0 -1
- package/src/i18n/ja.json +0 -1
- package/src/i18n/nl.json +0 -1
- package/src/i18n/pt.json +0 -1
- package/src/i18n/translation.json +0 -1
- package/src/i18n/zh.json +0 -1
- package/src/index.js +14 -0
- package/src/index.js.map +1 -1
- package/src/lib/actions/add-labels-to-issue.d.ts +11 -0
- package/src/lib/actions/add-labels-to-issue.js +36 -0
- package/src/lib/actions/add-labels-to-issue.js.map +1 -0
- package/src/lib/actions/create-branch.d.ts +11 -0
- package/src/lib/actions/create-branch.js +45 -0
- package/src/lib/actions/create-branch.js.map +1 -0
- package/src/lib/actions/delete-branch.d.ts +10 -0
- package/src/lib/actions/delete-branch.js +31 -0
- package/src/lib/actions/delete-branch.js.map +1 -0
- package/src/lib/actions/find-branch.d.ts +10 -0
- package/src/lib/actions/find-branch.js +50 -0
- package/src/lib/actions/find-branch.js.map +1 -0
- package/src/lib/actions/find-issue.d.ts +11 -0
- package/src/lib/actions/find-issue.js +60 -0
- package/src/lib/actions/find-issue.js.map +1 -0
- package/src/lib/actions/find-user.d.ts +3 -0
- package/src/lib/actions/find-user.js +49 -0
- package/src/lib/actions/find-user.js.map +1 -0
- package/src/lib/actions/update-issue.d.ts +17 -0
- package/src/lib/actions/update-issue.js +81 -0
- package/src/lib/actions/update-issue.js.map +1 -0
- package/src/lib/common/index.d.ts +4 -0
- package/src/lib/common/index.js +122 -0
- package/src/lib/common/index.js.map +1 -1
- package/src/lib/trigger/index.js +13 -1
- package/src/lib/trigger/index.js.map +1 -1
- package/src/lib/trigger/new-branch.d.ts +26 -0
- package/src/lib/trigger/new-branch.js +78 -0
- package/src/lib/trigger/new-branch.js.map +1 -0
- package/src/lib/trigger/new-collaborator.d.ts +26 -0
- package/src/lib/trigger/new-collaborator.js +85 -0
- package/src/lib/trigger/new-collaborator.js.map +1 -0
- package/src/lib/trigger/new-label.d.ts +26 -0
- package/src/lib/trigger/new-label.js +83 -0
- package/src/lib/trigger/new-label.js.map +1 -0
- package/src/lib/trigger/new-milestone.d.ts +26 -0
- package/src/lib/trigger/new-milestone.js +86 -0
- package/src/lib/trigger/new-milestone.js.map +1 -0
- package/src/lib/trigger/new-release.d.ts +26 -0
- package/src/lib/trigger/new-release.js +82 -0
- package/src/lib/trigger/new-release.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-github",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.9",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@sinclair/typebox": "0.34.11",
|
|
6
6
|
"axios": "1.8.3",
|
|
7
7
|
"axios-retry": "4.4.1",
|
|
8
8
|
"deepmerge-ts": "7.1.0",
|
|
9
|
-
"fast-glob": "3.3.3",
|
|
10
9
|
"mime-types": "2.1.35",
|
|
11
10
|
"nanoid": "3.3.8",
|
|
12
11
|
"semver": "7.6.0",
|
|
13
12
|
"zod": "3.25.76",
|
|
14
13
|
"@activepieces/pieces-common": "0.7.0",
|
|
15
|
-
"@activepieces/pieces-framework": "0.
|
|
16
|
-
"@activepieces/shared": "0.
|
|
14
|
+
"@activepieces/pieces-framework": "0.20.1",
|
|
15
|
+
"@activepieces/shared": "0.20.1",
|
|
17
16
|
"tslib": "2.8.1"
|
|
18
17
|
},
|
|
19
18
|
"overrides": {
|
package/src/i18n/de.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"GitHub": "GitHub",
|
|
3
2
|
"Developer platform that allows developers to create, store, manage and share their code": "Entwicklerplattform, die es Entwicklern erlaubt Code zu erstellen, zu speichern, zu verwalten und zu teilen",
|
|
4
3
|
"Create Issue": "Ticket erstellen",
|
|
5
4
|
"Get issue information": "Ticket-Informationen abrufen",
|
package/src/i18n/es.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"GitHub": "GitHub",
|
|
3
2
|
"Developer platform that allows developers to create, store, manage and share their code": "Plataforma de desarrollador que permite a los desarrolladores crear, almacenar, administrar y compartir su código",
|
|
4
3
|
"Create Issue": "Crear asunto",
|
|
5
4
|
"Get issue information": "Obtener información del problema",
|
package/src/i18n/fr.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"GitHub": "GitHub",
|
|
3
2
|
"Developer platform that allows developers to create, store, manage and share their code": "Plateforme de développement qui permet aux développeurs de créer, stocker, gérer et partager leur code",
|
|
4
3
|
"Create Issue": "Créer un problème",
|
|
5
4
|
"Get issue information": "Obtenir des informations sur les tickets",
|
package/src/i18n/ja.json
CHANGED
package/src/i18n/nl.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"GitHub": "GitHub",
|
|
3
2
|
"Developer platform that allows developers to create, store, manage and share their code": "Ontwikkelaars platform waarmee ontwikkelaars hun code kunnen maken, winkelen, beheren en delen",
|
|
4
3
|
"Create Issue": "Probleem aanmaken",
|
|
5
4
|
"Get issue information": "Probleeminformatie ophalen",
|
package/src/i18n/pt.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"GitHub": "GitHub",
|
|
3
2
|
"Developer platform that allows developers to create, store, manage and share their code": "Plataforma de desenvolvedores que permite aos desenvolvedores criar, armazenar, gerenciar e compartilhar seus códigos",
|
|
4
3
|
"Create Issue": "Criar issue",
|
|
5
4
|
"Get issue information": "Obter informações do problema",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"GitHub": "GitHub",
|
|
3
2
|
"Developer platform that allows developers to create, store, manage and share their code": "Developer platform that allows developers to create, store, manage and share their code",
|
|
4
3
|
"Create Issue": "Create Issue",
|
|
5
4
|
"Get issue information": "Get issue information",
|
package/src/i18n/zh.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"GitHub": "GitHub",
|
|
3
2
|
"Developer platform that allows developers to create, store, manage and share their code": "Developer platform that allows developers to create, store, manage and share their code",
|
|
4
3
|
"Create Issue": "Create Issue",
|
|
5
4
|
"Get issue information": "Get issue information",
|
package/src/index.js
CHANGED
|
@@ -15,6 +15,13 @@ const raw_graphql_query_1 = require("./lib/actions/raw-graphql-query");
|
|
|
15
15
|
const create_pull_request_review_comment_1 = require("./lib/actions/create-pull-request-review-comment");
|
|
16
16
|
const create_commit_comment_1 = require("./lib/actions/create-commit-comment");
|
|
17
17
|
const create_discussion_comment_1 = require("./lib/actions/create-discussion-comment");
|
|
18
|
+
const add_labels_to_issue_1 = require("./lib/actions/add-labels-to-issue");
|
|
19
|
+
const create_branch_1 = require("./lib/actions/create-branch");
|
|
20
|
+
const delete_branch_1 = require("./lib/actions/delete-branch");
|
|
21
|
+
const update_issue_1 = require("./lib/actions/update-issue");
|
|
22
|
+
const find_branch_1 = require("./lib/actions/find-branch");
|
|
23
|
+
const find_issue_1 = require("./lib/actions/find-issue");
|
|
24
|
+
const find_user_1 = require("./lib/actions/find-user");
|
|
18
25
|
exports.githubAuth = pieces_framework_1.PieceAuth.OAuth2({
|
|
19
26
|
required: true,
|
|
20
27
|
authUrl: 'https://github.com/login/oauth/authorize',
|
|
@@ -38,6 +45,13 @@ exports.github = (0, pieces_framework_1.createPiece)({
|
|
|
38
45
|
create_pull_request_review_comment_1.githubCreatePullRequestReviewCommentAction,
|
|
39
46
|
create_commit_comment_1.githubCreateCommitCommentAction,
|
|
40
47
|
create_discussion_comment_1.githubCreateDiscussionCommentAction,
|
|
48
|
+
add_labels_to_issue_1.githubAddLabelsToIssueAction,
|
|
49
|
+
create_branch_1.githubCreateBranchAction,
|
|
50
|
+
delete_branch_1.githubDeleteBranchAction,
|
|
51
|
+
update_issue_1.githubUpdateIssueAction,
|
|
52
|
+
find_branch_1.githubFindBranchAction,
|
|
53
|
+
find_issue_1.githubFindIssueAction,
|
|
54
|
+
find_user_1.githubFindUserAction,
|
|
41
55
|
(0, pieces_common_1.createCustomApiCallAction)({
|
|
42
56
|
baseUrl: () => 'https://api.github.com',
|
|
43
57
|
auth: exports.githubAuth,
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/github/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAIwC;AACxC,iDAAqD;AACrD,6DAAqE;AACrE,6DAAqE;AACrE,2CAA+C;AAC/C,+EAAgF;AAChF,uFAAsF;AACtF,yDAAiE;AACjE,uEAAwE;AACxE,yGAA8G;AAC9G,+EAAsF;AACtF,uFAA8F;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/github/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAIwC;AACxC,iDAAqD;AACrD,6DAAqE;AACrE,6DAAqE;AACrE,2CAA+C;AAC/C,+EAAgF;AAChF,uFAAsF;AACtF,yDAAiE;AACjE,uEAAwE;AACxE,yGAA8G;AAC9G,+EAAsF;AACtF,uFAA8F;AAC9F,2EAAiF;AACjF,+DAAuE;AACvE,+DAAuE;AACvE,6DAAqE;AAErE,2DAAmE;AACnE,yDAAiE;AACjE,uDAA+D;AAElD,QAAA,UAAU,GAAG,4BAAS,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,0CAA0C;IACnD,QAAQ,EAAE,6CAA6C;IACvD,KAAK,EAAE,CAAC,iBAAiB,EAAE,WAAW,EAAE,MAAM,CAAC;CAChD,CAAC,CAAC;AAEU,QAAA,MAAM,GAAG,IAAA,8BAAW,EAAC;IAChC,WAAW,EAAE,QAAQ;IACrB,WAAW,EACT,yFAAyF;IAE3F,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,gDAAgD;IACzD,UAAU,EAAE,CAAC,sBAAa,CAAC,eAAe,CAAC;IAC3C,IAAI,EAAE,kBAAU;IAChB,OAAO,EAAE;QACP,sCAAuB;QACvB,iDAAyB;QACzB,uDAA2B;QAC3B,kCAAqB;QACrB,sCAAuB;QACvB,yCAAqB;QACrB,+EAA0C;QAC1C,uDAA+B;QAC/B,+DAAmC;QACnC,kDAA4B;QAC5B,wCAAwB;QACxB,wCAAwB;QACxB,sCAAuB;QACvB,oCAAsB;QACtB,kCAAqB;QACrB,gCAAoB;QACpB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAwB;YACvC,IAAI,EAAE,kBAAU;YAChB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAW,IAA4B,CAAC,YAAY,EAAE;iBACtE,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,OAAO,EAAE;QACP,YAAY;QACZ,WAAW;QACX,sBAAsB;QACtB,eAAe;QACf,UAAU;QACV,cAAc;KACf;IACD,QAAQ,EAAE,wBAAc;CACzB,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const githubAddLabelsToIssueAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
+
repository: import("@activepieces/pieces-framework").DropdownProperty<{
|
|
3
|
+
repo: string;
|
|
4
|
+
owner: string;
|
|
5
|
+
}, false> | import("@activepieces/pieces-framework").DropdownProperty<{
|
|
6
|
+
repo: string;
|
|
7
|
+
owner: string;
|
|
8
|
+
}, true>;
|
|
9
|
+
issue_number: import("@activepieces/pieces-framework").DropdownProperty<number, false> | import("@activepieces/pieces-framework").DropdownProperty<number, true>;
|
|
10
|
+
labels: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true>;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.githubAddLabelsToIssueAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const index_1 = require("../../index");
|
|
6
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
exports.githubAddLabelsToIssueAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.githubAuth,
|
|
11
|
+
name: 'add_labels_to_issue',
|
|
12
|
+
displayName: 'Add Labels to Issue',
|
|
13
|
+
description: 'Adds labels to an existing issue.',
|
|
14
|
+
props: {
|
|
15
|
+
repository: common_1.githubCommon.repositoryDropdown,
|
|
16
|
+
issue_number: common_1.githubCommon.issueDropdown(true),
|
|
17
|
+
labels: common_1.githubCommon.labelDropDown(true),
|
|
18
|
+
},
|
|
19
|
+
run(_a) {
|
|
20
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
21
|
+
const { owner, repo } = propsValue.repository;
|
|
22
|
+
const issue_number = propsValue.issue_number;
|
|
23
|
+
const labels = propsValue.labels;
|
|
24
|
+
const response = yield (0, common_1.githubApiCall)({
|
|
25
|
+
accessToken: auth.access_token,
|
|
26
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
27
|
+
resourceUri: `/repos/${owner}/${repo}/issues/${issue_number}/labels`,
|
|
28
|
+
body: {
|
|
29
|
+
labels: labels,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
return response;
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=add-labels-to-issue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-labels-to-issue.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/github/src/lib/actions/add-labels-to-issue.ts"],"names":[],"mappings":";;;;AAAA,uCAAyC;AACzC,qEAA8D;AAC9D,sCAAwD;AACxD,+DAAyD;AAE5C,QAAA,4BAA4B,GAAG,IAAA,+BAAY,EAAC;IACvD,IAAI,EAAE,kBAAU;IAChB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,mCAAmC;IAChD,KAAK,EAAE;QACL,UAAU,EAAE,qBAAY,CAAC,kBAAkB;QAC3C,YAAY,EAAE,qBAAY,CAAC,aAAa,CAAC,IAAI,CAAC;QAC9C,MAAM,EAAE,qBAAY,CAAC,aAAa,CAAC,IAAI,CAAC;KACzC;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,UAAW,CAAC;YAC/C,MAAM,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;YAC7C,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;YAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAa,EAAC;gBACnC,WAAW,EAAE,IAAI,CAAC,YAAY;gBAC9B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,WAAW,EAAE,UAAU,KAAK,IAAI,IAAI,WAAW,YAAY,SAAS;gBACpE,IAAI,EAAE;oBACJ,MAAM,EAAE,MAAM;iBACf;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const githubCreateBranchAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
+
repository: import("@activepieces/pieces-framework").DropdownProperty<{
|
|
3
|
+
repo: string;
|
|
4
|
+
owner: string;
|
|
5
|
+
}, false> | import("@activepieces/pieces-framework").DropdownProperty<{
|
|
6
|
+
repo: string;
|
|
7
|
+
owner: string;
|
|
8
|
+
}, true>;
|
|
9
|
+
source_branch: import("@activepieces/pieces-framework").DropdownProperty<string, false> | import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
10
|
+
new_branch_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.githubCreateBranchAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
exports.githubCreateBranchAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.githubAuth,
|
|
11
|
+
name: 'create_branch',
|
|
12
|
+
displayName: 'Create Branch',
|
|
13
|
+
description: 'Creates a new branch on a repository.',
|
|
14
|
+
props: {
|
|
15
|
+
repository: common_1.githubCommon.repositoryDropdown,
|
|
16
|
+
source_branch: common_1.githubCommon.branchDropdown('Source Branch', 'The source branch that will be used to create the new branch', true),
|
|
17
|
+
new_branch_name: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'New Branch Name',
|
|
19
|
+
description: "The name for the new branch (e.g., 'feature/new-design').",
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
run(_a) {
|
|
24
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
25
|
+
const { owner, repo } = propsValue.repository;
|
|
26
|
+
const sourceBranchInfo = yield (0, common_1.githubApiCall)({
|
|
27
|
+
accessToken: auth.access_token,
|
|
28
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
29
|
+
resourceUri: `/repos/${owner}/${repo}/branches/${propsValue.source_branch}`,
|
|
30
|
+
});
|
|
31
|
+
const sourceSha = sourceBranchInfo.body.commit.sha;
|
|
32
|
+
const response = yield (0, common_1.githubApiCall)({
|
|
33
|
+
accessToken: auth.access_token,
|
|
34
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
35
|
+
resourceUri: `/repos/${owner}/${repo}/git/refs`,
|
|
36
|
+
body: {
|
|
37
|
+
ref: `refs/heads/${propsValue.new_branch_name}`,
|
|
38
|
+
sha: sourceSha,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
return response;
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=create-branch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-branch.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/github/src/lib/actions/create-branch.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAyC;AACzC,sCAAwD;AACxD,+DAAyD;AAE5C,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,kBAAU;IAChB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,uCAAuC;IACpD,KAAK,EAAE;QACL,UAAU,EAAE,qBAAY,CAAC,kBAAkB;QAC3C,aAAa,EAAE,qBAAY,CAAC,cAAc,CACxC,eAAe,EACf,8DAA8D,EAC9D,IAAI,CACL;QACD,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,2DAA2D;YACxE,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,UAAW,CAAC;YAE/C,MAAM,gBAAgB,GAAG,MAAM,IAAA,sBAAa,EAA8B;gBACxE,WAAW,EAAE,IAAI,CAAC,YAAY;gBAC9B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,WAAW,EAAE,UAAU,KAAK,IAAI,IAAI,aAAa,UAAU,CAAC,aAAa,EAAE;aAC5E,CAAC,CAAC;YACH,MAAM,SAAS,GAAG,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YAEnD,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAa,EAAC;gBACnC,WAAW,EAAE,IAAI,CAAC,YAAY;gBAC9B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,WAAW,EAAE,UAAU,KAAK,IAAI,IAAI,WAAW;gBAC/C,IAAI,EAAE;oBACJ,GAAG,EAAE,cAAc,UAAU,CAAC,eAAe,EAAE;oBAC/C,GAAG,EAAE,SAAS;iBACf;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const githubDeleteBranchAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
+
repository: import("@activepieces/pieces-framework").DropdownProperty<{
|
|
3
|
+
repo: string;
|
|
4
|
+
owner: string;
|
|
5
|
+
}, false> | import("@activepieces/pieces-framework").DropdownProperty<{
|
|
6
|
+
repo: string;
|
|
7
|
+
owner: string;
|
|
8
|
+
}, true>;
|
|
9
|
+
branch: import("@activepieces/pieces-framework").DropdownProperty<string, false> | import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.githubDeleteBranchAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
exports.githubDeleteBranchAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.githubAuth,
|
|
11
|
+
name: 'delete_branch',
|
|
12
|
+
displayName: 'Delete Branch',
|
|
13
|
+
description: 'Deletes a branch from a repository.',
|
|
14
|
+
props: {
|
|
15
|
+
repository: common_1.githubCommon.repositoryDropdown,
|
|
16
|
+
branch: common_1.githubCommon.branchDropdown('Branch', '', true),
|
|
17
|
+
},
|
|
18
|
+
run(_a) {
|
|
19
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
20
|
+
const { owner, repo } = propsValue.repository;
|
|
21
|
+
const branchName = propsValue.branch;
|
|
22
|
+
const response = yield (0, common_1.githubApiCall)({
|
|
23
|
+
accessToken: auth.access_token,
|
|
24
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
25
|
+
resourceUri: `/repos/${owner}/${repo}/git/refs/heads/${branchName}`,
|
|
26
|
+
});
|
|
27
|
+
return response;
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=delete-branch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-branch.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/github/src/lib/actions/delete-branch.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,uCAAyC;AACzC,sCAAwD;AACxD,+DAAyD;AAE5C,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,kBAAU;IAChB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,qCAAqC;IAClD,KAAK,EAAE;QACL,UAAU,EAAE,qBAAY,CAAC,kBAAkB;QAC3C,MAAM,EAAE,qBAAY,CAAC,cAAc,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC;KACxD;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,UAAW,CAAC;YAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC;YAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAa,EAAC;gBACnC,WAAW,EAAE,IAAI,CAAC,YAAY;gBAC9B,MAAM,EAAE,0BAAU,CAAC,MAAM;gBAEzB,WAAW,EAAE,UAAU,KAAK,IAAI,IAAI,mBAAmB,UAAU,EAAE;aACpE,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const githubFindBranchAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
+
repository: import("@activepieces/pieces-framework").DropdownProperty<{
|
|
3
|
+
repo: string;
|
|
4
|
+
owner: string;
|
|
5
|
+
}, false> | import("@activepieces/pieces-framework").DropdownProperty<{
|
|
6
|
+
repo: string;
|
|
7
|
+
owner: string;
|
|
8
|
+
}, true>;
|
|
9
|
+
branch: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.githubFindBranchAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
const axios_1 = require("axios");
|
|
10
|
+
exports.githubFindBranchAction = (0, pieces_framework_1.createAction)({
|
|
11
|
+
auth: index_1.githubAuth,
|
|
12
|
+
name: 'find_branch',
|
|
13
|
+
displayName: 'Find Branch',
|
|
14
|
+
description: 'Finds a branch by name and returns its details.',
|
|
15
|
+
props: {
|
|
16
|
+
repository: common_1.githubCommon.repositoryDropdown,
|
|
17
|
+
branch: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'Branch Name',
|
|
19
|
+
required: true,
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
run(_a) {
|
|
23
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
24
|
+
const { owner, repo } = propsValue.repository;
|
|
25
|
+
const branchName = propsValue.branch;
|
|
26
|
+
try {
|
|
27
|
+
const response = yield (0, common_1.githubApiCall)({
|
|
28
|
+
accessToken: auth.access_token,
|
|
29
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
30
|
+
resourceUri: `/repos/${owner}/${repo}/branches/${branchName}`,
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
found: true,
|
|
34
|
+
result: response.body,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
const status = e.response.status;
|
|
39
|
+
if (status === axios_1.HttpStatusCode.NotFound) {
|
|
40
|
+
return {
|
|
41
|
+
found: false,
|
|
42
|
+
result: {},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
throw e;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=find-branch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-branch.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/github/src/lib/actions/find-branch.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAyC;AAC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ces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
+
repository: import("@activepieces/pieces-framework").DropdownProperty<{
|
|
3
|
+
repo: string;
|
|
4
|
+
owner: string;
|
|
5
|
+
}, false> | import("@activepieces/pieces-framework").DropdownProperty<{
|
|
6
|
+
repo: string;
|
|
7
|
+
owner: string;
|
|
8
|
+
}, true>;
|
|
9
|
+
title: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
state: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.githubFindIssueAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
exports.githubFindIssueAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.githubAuth,
|
|
11
|
+
name: 'find_issue',
|
|
12
|
+
displayName: 'Find Issue',
|
|
13
|
+
description: 'Finds an issue based title.',
|
|
14
|
+
props: {
|
|
15
|
+
repository: common_1.githubCommon.repositoryDropdown,
|
|
16
|
+
title: pieces_framework_1.Property.ShortText({
|
|
17
|
+
displayName: 'Title',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
state: pieces_framework_1.Property.StaticDropdown({
|
|
21
|
+
displayName: 'State',
|
|
22
|
+
description: 'Filter issues by their state.',
|
|
23
|
+
required: true,
|
|
24
|
+
options: {
|
|
25
|
+
options: [
|
|
26
|
+
{ label: 'Open', value: 'open' },
|
|
27
|
+
{ label: 'Closed', value: 'closed' },
|
|
28
|
+
{ label: 'All', value: 'all' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
}),
|
|
32
|
+
},
|
|
33
|
+
run(_a) {
|
|
34
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
35
|
+
const { owner, repo } = propsValue.repository;
|
|
36
|
+
const { state, title } = propsValue;
|
|
37
|
+
const query = {};
|
|
38
|
+
if (propsValue.state)
|
|
39
|
+
query.state = propsValue.state;
|
|
40
|
+
let q = `repo:${owner}/${repo} is:issue in:title`;
|
|
41
|
+
if (title) {
|
|
42
|
+
q += ` "${title}"`;
|
|
43
|
+
}
|
|
44
|
+
if (state && state !== 'all') {
|
|
45
|
+
q += ` state:${state}`;
|
|
46
|
+
}
|
|
47
|
+
const response = yield (0, common_1.githubApiCall)({
|
|
48
|
+
accessToken: auth.access_token,
|
|
49
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
50
|
+
resourceUri: `/search/issues`,
|
|
51
|
+
query: { q, per_page: 1 },
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
found: response.body.total_count > 0,
|
|
55
|
+
result: response.body.items,
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=find-issue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-issue.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/github/src/lib/actions/find-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAyC;AACzC,sCAAuE;AACvE,+DAAyD;AAE5C,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,kBAAU;IAChB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,UAAU,EAAE,qBAAY,CAAC,kBAAkB;QAC3C,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO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EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC;gBACpC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;aAC5B,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const githubFindUserAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
+
username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.githubFindUserAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
const axios_1 = require("axios");
|
|
10
|
+
exports.githubFindUserAction = (0, pieces_framework_1.createAction)({
|
|
11
|
+
auth: index_1.githubAuth,
|
|
12
|
+
name: 'find_user',
|
|
13
|
+
displayName: 'Find User',
|
|
14
|
+
description: 'Finds a user by their login name.',
|
|
15
|
+
props: {
|
|
16
|
+
username: pieces_framework_1.Property.ShortText({
|
|
17
|
+
displayName: 'Username',
|
|
18
|
+
description: 'The GitHub username (login) to look up.',
|
|
19
|
+
required: true,
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
run(_a) {
|
|
23
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
24
|
+
const { username } = propsValue;
|
|
25
|
+
try {
|
|
26
|
+
const response = yield (0, common_1.githubApiCall)({
|
|
27
|
+
accessToken: auth.access_token,
|
|
28
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
29
|
+
resourceUri: `/users/${username}`,
|
|
30
|
+
});
|
|
31
|
+
return {
|
|
32
|
+
found: true,
|
|
33
|
+
result: response.body,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
const status = e.response.status;
|
|
38
|
+
if (status === axios_1.HttpStatusCode.NotFound) {
|
|
39
|
+
return {
|
|
40
|
+
found: false,
|
|
41
|
+
result: {},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
throw e;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=find-user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-user.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/github/src/lib/actions/find-user.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAyC;AACzC,sCAA0C;AAC1C,+DAAoE;AACpE,iCAAuC;AAE1B,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,kBAAU;IAChB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,mCAAmC;IAChD,KAAK,EAAE;QACL,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;YAEhC,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAa,EAAC;oBACnC,WAAW,EAAE,IAAI,CAAC,YAAY;oBAC9B,MAAM,EAAE,0BAAU,CAAC,GAAG;oBACtB,WAAW,EAAE,UAAU,QAAQ,EAAE;iBAClC,CAAC,CAAC;gBAEH,OAAO;oBACL,KAAK,EAAE,IAAI;oBACX,MAAM,EAAE,QAAQ,CAAC,IAAI;iBACtB,CAAC;YACJ,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,MAAM,GAAI,CAAe,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAChD,IAAI,MAAM,KAAK,sBAAc,CAAC,QAAQ,EAAE,CAAC;oBACvC,OAAO;wBACL,KAAK,EAAE,KAAK;wBACZ,MAAM,EAAE,EAAE;qBACX,CAAC;gBACJ,CAAC;gBACD,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const githubUpdateIssueAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
+
repository: import("@activepieces/pieces-framework").DropdownProperty<{
|
|
3
|
+
repo: string;
|
|
4
|
+
owner: string;
|
|
5
|
+
}, false> | import("@activepieces/pieces-framework").DropdownProperty<{
|
|
6
|
+
repo: string;
|
|
7
|
+
owner: string;
|
|
8
|
+
}, true>;
|
|
9
|
+
issue_number: import("@activepieces/pieces-framework").DropdownProperty<number, false> | import("@activepieces/pieces-framework").DropdownProperty<number, true>;
|
|
10
|
+
title: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
+
body: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
12
|
+
state: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
13
|
+
state_reason: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
14
|
+
milestone: import("@activepieces/pieces-framework").DropdownProperty<number, false> | import("@activepieces/pieces-framework").DropdownProperty<number, true>;
|
|
15
|
+
labels: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true>;
|
|
16
|
+
assignees: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true>;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.githubUpdateIssueAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
exports.githubUpdateIssueAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: index_1.githubAuth,
|
|
11
|
+
name: 'update_issue',
|
|
12
|
+
displayName: 'Update Issue',
|
|
13
|
+
description: 'Updates an existing issue.',
|
|
14
|
+
props: {
|
|
15
|
+
repository: common_1.githubCommon.repositoryDropdown,
|
|
16
|
+
issue_number: common_1.githubCommon.issueDropdown(),
|
|
17
|
+
title: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'Title',
|
|
19
|
+
required: false,
|
|
20
|
+
}),
|
|
21
|
+
body: pieces_framework_1.Property.LongText({
|
|
22
|
+
displayName: 'Body',
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
state: pieces_framework_1.Property.StaticDropdown({
|
|
26
|
+
displayName: 'State',
|
|
27
|
+
description: 'The new state of the issue.',
|
|
28
|
+
required: false,
|
|
29
|
+
options: {
|
|
30
|
+
options: [
|
|
31
|
+
{ label: 'Open', value: 'open' },
|
|
32
|
+
{ label: 'Closed', value: 'closed' },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
state_reason: pieces_framework_1.Property.StaticDropdown({
|
|
37
|
+
displayName: 'State Reason',
|
|
38
|
+
description: 'The reason for the state change. (Only used if State is changed).',
|
|
39
|
+
required: false,
|
|
40
|
+
options: {
|
|
41
|
+
options: [
|
|
42
|
+
{ label: 'Completed', value: 'completed' },
|
|
43
|
+
{ label: 'Not Planned', value: 'not_planned' },
|
|
44
|
+
{ label: 'Reopened', value: 'reopened' },
|
|
45
|
+
{ label: 'Duplicate', value: 'duplicate' },
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
}),
|
|
49
|
+
milestone: common_1.githubCommon.milestoneDropdown(false),
|
|
50
|
+
labels: common_1.githubCommon.labelDropDown(false),
|
|
51
|
+
assignees: common_1.githubCommon.assigneeDropDown(false),
|
|
52
|
+
},
|
|
53
|
+
run(_a) {
|
|
54
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
55
|
+
const { owner, repo } = propsValue.repository;
|
|
56
|
+
const body = {};
|
|
57
|
+
if (propsValue.title !== undefined)
|
|
58
|
+
body.title = propsValue.title;
|
|
59
|
+
if (propsValue.body !== undefined)
|
|
60
|
+
body.body = propsValue.body;
|
|
61
|
+
if (propsValue.state !== undefined)
|
|
62
|
+
body.state = propsValue.state;
|
|
63
|
+
if (propsValue.state_reason !== undefined)
|
|
64
|
+
body.state_reason = propsValue.state_reason;
|
|
65
|
+
if (propsValue.assignees !== undefined)
|
|
66
|
+
body.assignees = propsValue.assignees;
|
|
67
|
+
if (propsValue.labels !== undefined)
|
|
68
|
+
body.labels = propsValue.labels;
|
|
69
|
+
if (propsValue.milestone !== undefined)
|
|
70
|
+
body.milestone = propsValue.milestone;
|
|
71
|
+
const response = yield (0, common_1.githubApiCall)({
|
|
72
|
+
accessToken: auth.access_token,
|
|
73
|
+
method: pieces_common_1.HttpMethod.PATCH,
|
|
74
|
+
resourceUri: `/repos/${owner}/${repo}/issues/${propsValue.issue_number}`,
|
|
75
|
+
body: body,
|
|
76
|
+
});
|
|
77
|
+
return response;
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=update-issue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-issue.js","sourceRoot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gBACxB,WAAW,EAAE,UAAU,KAAK,IAAI,IAAI,WAAW,UAAU,CAAC,YAAY,EAAE;gBACxE,IAAI,EAAE,IAAI;aACX,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -8,6 +8,10 @@ export declare const githubCommon: {
|
|
|
8
8
|
repo: string;
|
|
9
9
|
owner: string;
|
|
10
10
|
}, true>;
|
|
11
|
+
milestoneDropdown: (required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<number, false> | import("@activepieces/pieces-framework").DropdownProperty<number, true>;
|
|
12
|
+
branchDropdown: (displayName: string, desc: string, required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<string, false> | import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
13
|
+
issueDropdown: (required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<number, false> | import("@activepieces/pieces-framework").DropdownProperty<number, true>;
|
|
14
|
+
assigneeSingleDropdown: (required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<string, false> | import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
11
15
|
assigneeDropDown: (required?: boolean) => import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true>;
|
|
12
16
|
labelDropDown: (required?: boolean) => import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true>;
|
|
13
17
|
};
|