@activepieces/piece-github 0.5.8 → 0.5.10

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.
Files changed (52) hide show
  1. package/package.json +1 -1
  2. package/src/i18n/de.json +50 -2
  3. package/src/i18n/es.json +50 -2
  4. package/src/i18n/fr.json +50 -2
  5. package/src/i18n/ja.json +50 -2
  6. package/src/i18n/nl.json +50 -2
  7. package/src/i18n/pt.json +50 -2
  8. package/src/i18n/translation.json +50 -2
  9. package/src/i18n/zh.json +50 -2
  10. package/src/index.js +14 -0
  11. package/src/index.js.map +1 -1
  12. package/src/lib/actions/add-labels-to-issue.d.ts +11 -0
  13. package/src/lib/actions/add-labels-to-issue.js +36 -0
  14. package/src/lib/actions/add-labels-to-issue.js.map +1 -0
  15. package/src/lib/actions/create-branch.d.ts +11 -0
  16. package/src/lib/actions/create-branch.js +45 -0
  17. package/src/lib/actions/create-branch.js.map +1 -0
  18. package/src/lib/actions/delete-branch.d.ts +10 -0
  19. package/src/lib/actions/delete-branch.js +31 -0
  20. package/src/lib/actions/delete-branch.js.map +1 -0
  21. package/src/lib/actions/find-branch.d.ts +10 -0
  22. package/src/lib/actions/find-branch.js +50 -0
  23. package/src/lib/actions/find-branch.js.map +1 -0
  24. package/src/lib/actions/find-issue.d.ts +11 -0
  25. package/src/lib/actions/find-issue.js +60 -0
  26. package/src/lib/actions/find-issue.js.map +1 -0
  27. package/src/lib/actions/find-user.d.ts +3 -0
  28. package/src/lib/actions/find-user.js +49 -0
  29. package/src/lib/actions/find-user.js.map +1 -0
  30. package/src/lib/actions/update-issue.d.ts +17 -0
  31. package/src/lib/actions/update-issue.js +81 -0
  32. package/src/lib/actions/update-issue.js.map +1 -0
  33. package/src/lib/common/index.d.ts +4 -0
  34. package/src/lib/common/index.js +122 -0
  35. package/src/lib/common/index.js.map +1 -1
  36. package/src/lib/trigger/index.js +13 -1
  37. package/src/lib/trigger/index.js.map +1 -1
  38. package/src/lib/trigger/new-branch.d.ts +26 -0
  39. package/src/lib/trigger/new-branch.js +78 -0
  40. package/src/lib/trigger/new-branch.js.map +1 -0
  41. package/src/lib/trigger/new-collaborator.d.ts +26 -0
  42. package/src/lib/trigger/new-collaborator.js +85 -0
  43. package/src/lib/trigger/new-collaborator.js.map +1 -0
  44. package/src/lib/trigger/new-label.d.ts +26 -0
  45. package/src/lib/trigger/new-label.js +83 -0
  46. package/src/lib/trigger/new-label.js.map +1 -0
  47. package/src/lib/trigger/new-milestone.d.ts +26 -0
  48. package/src/lib/trigger/new-milestone.js +86 -0
  49. package/src/lib/trigger/new-milestone.js.map +1 -0
  50. package/src/lib/trigger/new-release.d.ts +26 -0
  51. package/src/lib/trigger/new-release.js +82 -0
  52. package/src/lib/trigger/new-release.js.map +1 -0
@@ -9,6 +9,13 @@
9
9
  "Create Pull Request Review Comment": "Create Pull Request Review Comment",
10
10
  "Create Commit Comment": "Create Commit Comment",
11
11
  "Create Discussion Comment": "Create Discussion Comment",
12
+ "Add Labels to Issue": "Add Labels to Issue",
13
+ "Create Branch": "Create Branch",
14
+ "Delete Branch": "Delete Branch",
15
+ "Update Issue": "Update Issue",
16
+ "Find Branch": "Find Branch",
17
+ "Find Issue": "Find Issue",
18
+ "Find User": "Find User",
12
19
  "Custom API Call": "Custom API Call",
13
20
  "Create Issue in GitHub Repository": "Create Issue in GitHub Repository",
14
21
  "Grabs information from a specific issue": "Grabs information from a specific issue",
@@ -19,6 +26,13 @@
19
26
  "Creates a review comment on a pull request in a GitHub repository": "Creates a review comment on a pull request in a GitHub repository",
20
27
  "Creates a comment on a commit in a GitHub repository": "Creates a comment on a commit in a GitHub repository",
21
28
  "Creates a comment on a discussion in a GitHub repository": "Creates a comment on a discussion in a GitHub repository",
29
+ "Adds labels to an existing issue.": "Adds labels to an existing issue.",
30
+ "Creates a new branch on a repository.": "Creates a new branch on a repository.",
31
+ "Deletes a branch from a repository.": "Deletes a branch from a repository.",
32
+ "Updates an existing issue.": "Updates an existing issue.",
33
+ "Finds a branch by name and returns its details.": "Finds a branch by name and returns its details.",
34
+ "Finds an issue based title.": "Finds an issue based title.",
35
+ "Finds a user by their login name.": "Finds a user by their login name.",
22
36
  "Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
23
37
  "Repository": "Repository",
24
38
  "Title": "Title",
@@ -37,10 +51,19 @@
37
51
  "Comment Body": "Comment Body",
38
52
  "Position": "Position",
39
53
  "Discussion Number": "Discussion Number",
54
+ "Issue": "Issue",
55
+ "Source Branch": "Source Branch",
56
+ "New Branch Name": "New Branch Name",
57
+ "Branch": "Branch",
58
+ "Body": "Body",
59
+ "State": "State",
60
+ "State Reason": "State Reason",
61
+ "Milestone": "Milestone",
62
+ "Branch Name": "Branch Name",
63
+ "Username": "Username",
40
64
  "Method": "Method",
41
65
  "Headers": "Headers",
42
66
  "Query Parameters": "Query Parameters",
43
- "Body": "Body",
44
67
  "Response is Binary ?": "Response is Binary ?",
45
68
  "No Error on Failure": "No Error on Failure",
46
69
  "Timeout (in seconds)": "Timeout (in seconds)",
@@ -64,8 +87,23 @@
64
87
  "The line index in the diff to comment on (optional)": "The line index in the diff to comment on (optional)",
65
88
  "The number of the discussion to comment on": "The number of the discussion to comment on",
66
89
  "The content of the comment (supports markdown)": "The content of the comment (supports markdown)",
90
+ "The issue to select.": "The issue to select.",
91
+ "The source branch that will be used to create the new branch": "The source branch that will be used to create the new branch",
92
+ "The name for the new branch (e.g., 'feature/new-design').": "The name for the new branch (e.g., 'feature/new-design').",
93
+ "The new state of the issue.": "The new state of the issue.",
94
+ "The reason for the state change. (Only used if State is changed).": "The reason for the state change. (Only used if State is changed).",
95
+ "The milestone to associate this issue with.": "The milestone to associate this issue with.",
96
+ "Filter issues by their state.": "Filter issues by their state.",
97
+ "The GitHub username (login) to look up.": "The GitHub username (login) to look up.",
67
98
  "Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
68
99
  "Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
100
+ "Open": "Open",
101
+ "Closed": "Closed",
102
+ "Completed": "Completed",
103
+ "Not Planned": "Not Planned",
104
+ "Reopened": "Reopened",
105
+ "Duplicate": "Duplicate",
106
+ "All": "All",
69
107
  "GET": "GET",
70
108
  "POST": "POST",
71
109
  "PATCH": "PATCH",
@@ -78,10 +116,20 @@
78
116
  "Push": "Push",
79
117
  "New Discussion": "New Discussion",
80
118
  "New Comment Posted": "New Comment Posted",
119
+ "New Branch": "New Branch",
120
+ "New Collaborator": "New Collaborator",
121
+ "New Label": "New Label",
122
+ "New Milestone": "New Milestone",
123
+ "New Release": "New Release",
81
124
  "Triggers when there is activity on a pull request.": "Triggers when there is activity on a pull request.",
82
125
  "Trigger when there is activity relating to repository stars.": "Trigger when there is activity relating to repository stars.",
83
126
  "Triggers when there is activity relating to an issue.": "Triggers when there is activity relating to an issue.",
84
127
  "Triggers when there is a push to a repository branch. This includes when a commit is pushed, when a commit tag is pushed, when a branch is deleted, when a tag is deleted, or when a repository is created from a template.": "Triggers when there is a push to a repository branch. This includes when a commit is pushed, when a commit tag is pushed, when a branch is deleted, when a tag is deleted, or when a repository is created from a template.",
85
128
  "Triggers when there is activity relating to a discussion.": "Triggers when there is activity relating to a discussion.",
86
- "Triggers when there is a new comment posted on a discussion.": "Triggers when there is a new comment posted on a discussion."
129
+ "Triggers when there is a new comment posted on a discussion.": "Triggers when there is a new comment posted on a discussion.",
130
+ "Triggers when a new branch is created.": "Triggers when a new branch is created.",
131
+ "Triggers when a new collaborator is added to a repository.": "Triggers when a new collaborator is added to a repository.",
132
+ "Triggers when a new label is created in a repository.": "Triggers when a new label is created in a repository.",
133
+ "Triggers when a new milestone is created.": "Triggers when a new milestone is created.",
134
+ "Triggers when a new release is added.": "Triggers when a new release is added."
87
135
  }
package/src/i18n/zh.json CHANGED
@@ -9,6 +9,13 @@
9
9
  "Create Pull Request Review Comment": "Create Pull Request Review Comment",
10
10
  "Create Commit Comment": "Create Commit Comment",
11
11
  "Create Discussion Comment": "Create Discussion Comment",
12
+ "Add Labels to Issue": "Add Labels to Issue",
13
+ "Create Branch": "Create Branch",
14
+ "Delete Branch": "删除分支",
15
+ "Update Issue": "Update Issue",
16
+ "Find Branch": "Find Branch",
17
+ "Find Issue": "Find Issue",
18
+ "Find User": "Find User",
12
19
  "Custom API Call": "自定义 API 呼叫",
13
20
  "Create Issue in GitHub Repository": "Create Issue in GitHub Repository",
14
21
  "Grabs information from a specific issue": "Grabs information from a specific issue",
@@ -19,6 +26,13 @@
19
26
  "Creates a review comment on a pull request in a GitHub repository": "Creates a review comment on a pull request in a GitHub repository",
20
27
  "Creates a comment on a commit in a GitHub repository": "Creates a comment on a commit in a GitHub repository",
21
28
  "Creates a comment on a discussion in a GitHub repository": "Creates a comment on a discussion in a GitHub repository",
29
+ "Adds labels to an existing issue.": "Adds labels to an existing issue.",
30
+ "Creates a new branch on a repository.": "Creates a new branch on a repository.",
31
+ "Deletes a branch from a repository.": "Deletes a branch from a repository.",
32
+ "Updates an existing issue.": "Updates an existing issue.",
33
+ "Finds a branch by name and returns its details.": "Finds a branch by name and returns its details.",
34
+ "Finds an issue based title.": "Finds an issue based title.",
35
+ "Finds a user by their login name.": "Finds a user by their login name.",
22
36
  "Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
23
37
  "Repository": "Repository",
24
38
  "Title": "标题",
@@ -37,10 +51,19 @@
37
51
  "Comment Body": "Comment Body",
38
52
  "Position": "Position",
39
53
  "Discussion Number": "Discussion Number",
54
+ "Issue": "Issue",
55
+ "Source Branch": "Source Branch",
56
+ "New Branch Name": "New Branch Name",
57
+ "Branch": "分支",
58
+ "Body": "正文内容",
59
+ "State": "State",
60
+ "State Reason": "State Reason",
61
+ "Milestone": "Milestone",
62
+ "Branch Name": "分支名称",
63
+ "Username": "用户名",
40
64
  "Method": "方法",
41
65
  "Headers": "信头",
42
66
  "Query Parameters": "查询参数",
43
- "Body": "正文内容",
44
67
  "Response is Binary ?": "Response is Binary ?",
45
68
  "No Error on Failure": "失败时没有错误",
46
69
  "Timeout (in seconds)": "超时(秒)",
@@ -64,8 +87,23 @@
64
87
  "The line index in the diff to comment on (optional)": "The line index in the diff to comment on (optional)",
65
88
  "The number of the discussion to comment on": "The number of the discussion to comment on",
66
89
  "The content of the comment (supports markdown)": "The content of the comment (supports markdown)",
90
+ "The issue to select.": "The issue to select.",
91
+ "The source branch that will be used to create the new branch": "The source branch that will be used to create the new branch",
92
+ "The name for the new branch (e.g., 'feature/new-design').": "The name for the new branch (e.g., 'feature/new-design').",
93
+ "The new state of the issue.": "The new state of the issue.",
94
+ "The reason for the state change. (Only used if State is changed).": "The reason for the state change. (Only used if State is changed).",
95
+ "The milestone to associate this issue with.": "The milestone to associate this issue with.",
96
+ "Filter issues by their state.": "Filter issues by their state.",
97
+ "The GitHub username (login) to look up.": "The GitHub username (login) to look up.",
67
98
  "Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
68
99
  "Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
100
+ "Open": "Open",
101
+ "Closed": "Closed",
102
+ "Completed": "Completed",
103
+ "Not Planned": "Not Planned",
104
+ "Reopened": "Reopened",
105
+ "Duplicate": "Duplicate",
106
+ "All": "所有的",
69
107
  "GET": "获取",
70
108
  "POST": "帖子",
71
109
  "PATCH": "PATCH",
@@ -78,10 +116,20 @@
78
116
  "Push": "推送",
79
117
  "New Discussion": "New Discussion",
80
118
  "New Comment Posted": "New Comment Posted",
119
+ "New Branch": "新分支",
120
+ "New Collaborator": "New Collaborator",
121
+ "New Label": "New Label",
122
+ "New Milestone": "New Milestone",
123
+ "New Release": "New Release",
81
124
  "Triggers when there is activity on a pull request.": "Triggers when there is activity on a pull request.",
82
125
  "Trigger when there is activity relating to repository stars.": "Trigger when there is activity relating to repository stars.",
83
126
  "Triggers when there is activity relating to an issue.": "Triggers when there is activity relating to an issue.",
84
127
  "Triggers when there is a push to a repository branch. This includes when a commit is pushed, when a commit tag is pushed, when a branch is deleted, when a tag is deleted, or when a repository is created from a template.": "Triggers when there is a push to a repository branch. This includes when a commit is pushed, when a commit tag is pushed, when a branch is deleted, when a tag is deleted, or when a repository is created from a template.",
85
128
  "Triggers when there is activity relating to a discussion.": "Triggers when there is activity relating to a discussion.",
86
- "Triggers when there is a new comment posted on a discussion.": "Triggers when there is a new comment posted on a discussion."
129
+ "Triggers when there is a new comment posted on a discussion.": "Triggers when there is a new comment posted on a discussion.",
130
+ "Triggers when a new branch is created.": "Triggers when a new branch is created.",
131
+ "Triggers when a new collaborator is added to a repository.": "Triggers when a new collaborator is added to a repository.",
132
+ "Triggers when a new label is created in a repository.": "Triggers when a new label is created in a repository.",
133
+ "Triggers when a new milestone is created.": "Triggers when a new milestone is created.",
134
+ "Triggers when a new release is added.": "Triggers when a new release is added."
87
135
  }
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;AAEjF,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,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"}
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;AACzC,sCAAwD;AACxD,+DAAoE;AACpE,iCAAuC;AAE1B,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,kBAAU;IAChB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,iDAAiD;IAC9D,KAAK,EAAE;QACL,UAAU,EAAE,qBAAY,CAAC,kBAAkB;QAC3C,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,aAAa;YAC1B,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;YAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC;YAErC,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,KAAK,IAAI,IAAI,aAAa,UAAU,EAAE;iBAC9D,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,11 @@
1
+ export declare const githubFindIssueAction: 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
+ 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;YACpB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC7B,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;oBAChC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;oBACpC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;iBAC/B;aACF;SACF,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,UAAW,CAAC;YAC/C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC;YACpC,MAAM,KAAK,GAAkB,EAAE,CAAC;YAChC,IAAI,UAAU,CAAC,KAAK;gBAAE,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;YAErD,IAAI,CAAC,GAAG,QAAQ,KAAK,IAAI,IAAI,oBAAoB,CAAC;YAClD,IAAI,KAAK,EAAE,CAAC;gBACV,CAAC,IAAI,KAAK,KAAK,GAAG,CAAC;YACrB,CAAC;YACD,IAAI,KAAK,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;gBAC7B,CAAC,IAAI,UAAU,KAAK,EAAE,CAAC;YACzB,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAa,EAGjC;gBACD,WAAW,EAAE,IAAI,CAAC,YAAY;gBAC9B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,WAAW,EAAE,gBAAgB;gBAC7B,KAAK,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE;aAC1B,CAAC,CAAC;YAEH,OAAO;gBACL,KAAK,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
+ }>;