langflow-base-nightly 0.5.0.dev33__py3-none-any.whl → 0.5.0.dev34__py3-none-any.whl
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.
- langflow/api/v1/endpoints.py +1 -1
- langflow/base/composio/composio_base.py +1092 -126
- langflow/components/composio/__init__.py +24 -0
- langflow/components/composio/composio_api.py +116 -136
- langflow/components/composio/dropbox_compnent.py +11 -0
- langflow/components/composio/github_composio.py +1 -639
- langflow/components/composio/gmail_composio.py +26 -394
- langflow/components/composio/googlecalendar_composio.py +2 -778
- langflow/components/composio/googlemeet_composio.py +11 -0
- langflow/components/composio/googletasks_composio.py +8 -0
- langflow/components/composio/linear_composio.py +11 -0
- langflow/components/composio/outlook_composio.py +1 -755
- langflow/components/composio/reddit_composio.py +11 -0
- langflow/components/composio/slack_composio.py +1 -576
- langflow/components/composio/slackbot_composio.py +11 -0
- langflow/components/composio/supabase_composio.py +11 -0
- langflow/components/composio/todoist_composio.py +11 -0
- langflow/components/composio/youtube_composio.py +11 -0
- langflow/custom/utils.py +30 -7
- langflow/frontend/assets/{SlackIcon-Bikuxo8x.js → SlackIcon-B260Qg_R.js} +1 -1
- langflow/frontend/assets/{Wikipedia-B6aCFf5-.js → Wikipedia-BB2mbgyd.js} +1 -1
- langflow/frontend/assets/{Wolfram-CekL_M-a.js → Wolfram-DytXC9hF.js} +1 -1
- langflow/frontend/assets/{index-D1RgjMON.js → index-3TJWUdmx.js} +1 -1
- langflow/frontend/assets/{index-B4xLpgbM.js → index-3qMh9x6K.js} +1 -1
- langflow/frontend/assets/{index-DEuXrfXH.js → index-3uOAA_XX.js} +1 -1
- langflow/frontend/assets/{index-DTJX3yQa.js → index-4eRtaV45.js} +1 -1
- langflow/frontend/assets/index-7xXgqu09.js +1 -0
- langflow/frontend/assets/{index-BRNhftot.js → index-AY5Dm2mG.js} +1 -1
- langflow/frontend/assets/{index-4Tl3Nxdo.js → index-AlJ7td-D.js} +1 -1
- langflow/frontend/assets/{index-D2nHdRne.js → index-B-c82Fnu.js} +1 -1
- langflow/frontend/assets/{index-C3RZz8WE.js → index-B2ggrBuR.js} +1 -1
- langflow/frontend/assets/{index-in188l0A.js → index-B536IPXH.js} +1 -1
- langflow/frontend/assets/{index-CP0tFKwN.js → index-B5ed-sAv.js} +1 -1
- langflow/frontend/assets/{index-CAzSTGAM.js → index-B8TlNgn-.js} +1 -1
- langflow/frontend/assets/{index-09CVJwsY.js → index-B8y58M9b.js} +1 -1
- langflow/frontend/assets/{index-B9uOBe6Y.js → index-B9Mo3ndZ.js} +1 -1
- langflow/frontend/assets/{index-DAJafn16.js → index-BCK-ZyIh.js} +1 -1
- langflow/frontend/assets/{index-Cy-ZEfWh.js → index-BEDxAk3N.js} +1 -1
- langflow/frontend/assets/{index-DbmqjLy6.js → index-BEKoRwsX.js} +1 -1
- langflow/frontend/assets/{index-BcqeL_f4.js → index-BIkqesA-.js} +1 -1
- langflow/frontend/assets/{index-7x3wNZ-4.js → index-BJrY2Fiu.js} +1 -1
- langflow/frontend/assets/{index-Iamzh9ZT.js → index-BKvKC-12.js} +1 -1
- langflow/frontend/assets/{index-COqjpsdy.js → index-BLROcaSz.js} +1 -1
- langflow/frontend/assets/{index-BRwkzs92.js → index-BNbWMmAV.js} +1 -1
- langflow/frontend/assets/{index-C_UkF-RJ.js → index-BOEf7-ty.js} +1 -1
- langflow/frontend/assets/index-BOYTBrh9.js +1 -0
- langflow/frontend/assets/{index-DDcpxWU4.js → index-BQB-iDYl.js} +1 -1
- langflow/frontend/assets/{index-Crq_yhkG.js → index-BRWNIt9F.js} +1 -1
- langflow/frontend/assets/{index-DmaQAn3K.js → index-BVHvIhT5.js} +1 -1
- langflow/frontend/assets/{index-Cs_jt3dj.js → index-BVtf6m9S.js} +1 -1
- langflow/frontend/assets/{index-T2jJOG85.js → index-BWq9GTzt.js} +1 -1
- langflow/frontend/assets/{index-Dz0r9Idb.js → index-BXMhmvTj.js} +1 -1
- langflow/frontend/assets/{index-eJwu5YEi.js → index-Ba3RTMXI.js} +1 -1
- langflow/frontend/assets/{index-xVx59Op-.js → index-Baka5dKE.js} +1 -1
- langflow/frontend/assets/{index-DnusMCK1.js → index-BbsND1Qg.js} +1 -1
- langflow/frontend/assets/index-BcgB3rXH.js +1 -0
- langflow/frontend/assets/{index-CmiRgF_-.js → index-BdIWbCEL.js} +1 -1
- langflow/frontend/assets/{index-BllNr21U.js → index-BdYgKk1d.js} +1 -1
- langflow/frontend/assets/{index-BIKbxmIh.js → index-BeNby7qF.js} +1 -1
- langflow/frontend/assets/{index-CUe1ivTn.js → index-BejHxU5W.js} +1 -1
- langflow/frontend/assets/{index-CVphnxXi.js → index-Bisa4IQF.js} +1 -1
- langflow/frontend/assets/{index-Cr2oy5K2.js → index-BjENqyKe.js} +1 -1
- langflow/frontend/assets/{index-CEn_71Wk.js → index-BlBl2tvQ.js} +1 -1
- langflow/frontend/assets/{index-DOb9c2bf.js → index-BnLT29qW.js} +1 -1
- langflow/frontend/assets/{index-BRizlHaN.js → index-BqUeOc7Y.js} +1 -1
- langflow/frontend/assets/{index-D7nFs6oq.js → index-BsBWP-Dh.js} +1 -1
- langflow/frontend/assets/{index-BlRTHXW5.js → index-BtJ2o21k.js} +1 -1
- langflow/frontend/assets/{index-AOX7bbjJ.js → index-BxWXWRmZ.js} +1 -1
- langflow/frontend/assets/{index-B20KmxhS.js → index-BxkZkBgQ.js} +1 -1
- langflow/frontend/assets/{index-DoFlaGDx.js → index-Bxml6wXu.js} +1 -1
- langflow/frontend/assets/{index-B9KRIJFi.js → index-ByFXr9Iq.js} +1 -1
- langflow/frontend/assets/{index-CY6LUi4V.js → index-C2Xd7UkR.js} +1 -1
- langflow/frontend/assets/index-C76aBV_h.js +1 -0
- langflow/frontend/assets/{index-9gkURvG2.js → index-C7V5U9yH.js} +1 -1
- langflow/frontend/assets/{index-BDmbsLY2.js → index-C7x9R_Yo.js} +1 -1
- langflow/frontend/assets/{index-DI0zAExi.js → index-C8KD3LPb.js} +1 -1
- langflow/frontend/assets/{index-DzDNhMMW.js → index-C9N80hP8.js} +1 -1
- langflow/frontend/assets/{index-6GWpsedd.js → index-CDFLVFB4.js} +1 -1
- langflow/frontend/assets/{index-pkOi9P45.js → index-CF4dtI6S.js} +1 -1
- langflow/frontend/assets/{index-CdwjD4IX.js → index-CG7cp0nD.js} +1 -1
- langflow/frontend/assets/{index-J0pvFqLk.js → index-CHFO5O4g.js} +1 -1
- langflow/frontend/assets/{index-5G402gB8.js → index-CJwYfDBz.js} +1 -1
- langflow/frontend/assets/{index-BzCjyHto.js → index-CMGZGIx_.js} +1 -1
- langflow/frontend/assets/{index-Bm7a2vMS.js → index-COL0eiWI.js} +1 -1
- langflow/frontend/assets/{index-JHCxbvlW.js → index-CWWo2zOA.js} +1 -1
- langflow/frontend/assets/{index-C7wDSVVH.js → index-C_1RBTul.js} +1 -1
- langflow/frontend/assets/{index-BIjUtp6d.js → index-Ccb5B8zG.js} +1 -1
- langflow/frontend/assets/{index-yIh6-LZT.js → index-Cd5zuUUK.js} +1 -1
- langflow/frontend/assets/{index-CPIdMJkX.js → index-CkQ-bJ4G.js} +1 -1
- langflow/frontend/assets/{index-TRyDa01A.js → index-CkSzjCqM.js} +1 -1
- langflow/frontend/assets/{index-CSRizl2S.js → index-CoUlHbtg.js} +1 -1
- langflow/frontend/assets/index-Cpgkb0Q3.js +1 -0
- langflow/frontend/assets/{index-Cp7Pmn03.js → index-CqDUqHfd.js} +1 -1
- langflow/frontend/assets/{index-CGVDXKtN.js → index-Ct9_T9ox.js} +1 -1
- langflow/frontend/assets/{index-BwlYjc56.js → index-CvQ0w8Pj.js} +1 -1
- langflow/frontend/assets/{index-DkJCCraf.js → index-CwIxqYlT.js} +1 -1
- langflow/frontend/assets/{index-Bgd7yLoW.js → index-Cx__T92e.js} +1 -1
- langflow/frontend/assets/{index-RveG4dl9.js → index-D-zkHcob.js} +1 -1
- langflow/frontend/assets/{index-DVV_etfW.js → index-D0HmkH0H.js} +1 -1
- langflow/frontend/assets/{index-CglSqvB5.js → index-D0s9f6Re.js} +1 -1
- langflow/frontend/assets/{index-J98sU-1p.js → index-D5PeCofu.js} +1 -1
- langflow/frontend/assets/{index-BJIsQS8D.js → index-D87Zw62M.js} +1 -1
- langflow/frontend/assets/{index-FYcoJPMP.js → index-D9eflZfP.js} +1 -1
- langflow/frontend/assets/{index-DJs6FoYC.js → index-DDNNv4C0.js} +1 -1
- langflow/frontend/assets/index-DHlEwAxb.js +1 -0
- langflow/frontend/assets/{index-DqDQk0Cu.js → index-DIqSyDVO.js} +1 -1
- langflow/frontend/assets/{index-DOI0ceS-.js → index-DK8vNpXK.js} +1 -1
- langflow/frontend/assets/{index-D29n5mus.js → index-DKEXZFUO.js} +1 -1
- langflow/frontend/assets/{index-dfaj9-hY.js → index-DPX6X_bw.js} +1 -1
- langflow/frontend/assets/{index-CgbINWS8.js → index-DS1EgA10.js} +1 -1
- langflow/frontend/assets/{index-C69gdJqw.js → index-DS9I4y48.js} +1 -1
- langflow/frontend/assets/{index-B2EmwqKj.js → index-DWkMJnbd.js} +1 -1
- langflow/frontend/assets/{index-CIYzjH2y.js → index-DWr_zPkx.js} +1 -1
- langflow/frontend/assets/{index-D-HTZ68O.js → index-DX7XsAcx.js} +1 -1
- langflow/frontend/assets/{index-Cq30cQcP.js → index-DZzbmg3J.js} +1 -1
- langflow/frontend/assets/{index-BZCt_UnJ.js → index-DasrI03Y.js} +1 -1
- langflow/frontend/assets/index-DdzVmJHE.js +1 -0
- langflow/frontend/assets/{index-DmvjdU1N.js → index-DhzEUXfr.js} +1 -1
- langflow/frontend/assets/{index-B_ytx_iA.js → index-DpJiH-Rk.js} +1 -1
- langflow/frontend/assets/{index-Cyk3aCmP.js → index-DpQKtcXu.js} +1 -1
- langflow/frontend/assets/{index-DrvRK4_i.js → index-Dpz3oBf5.js} +1 -1
- langflow/frontend/assets/{index-DF0oWRdd.js → index-DqSH4x-R.js} +1 -1
- langflow/frontend/assets/{index-DX_InNVT.js → index-DtJyCbzF.js} +1 -1
- langflow/frontend/assets/{index-B4AtFbkN.js → index-Du9aJK7m.js} +1 -1
- langflow/frontend/assets/{index-qXcoVIRo.js → index-DuAeoC-H.js} +1 -1
- langflow/frontend/assets/{index-D7Vx6mgS.js → index-DxIs8VSp.js} +1 -1
- langflow/frontend/assets/{index-U7J1YiWE.js → index-DyJDHm2D.js} +1 -1
- langflow/frontend/assets/{index-1MEYR1La.js → index-DzeIsaBm.js} +1 -1
- langflow/frontend/assets/{index-Cbwk3f-p.js → index-DztLFiip.js} +1 -1
- langflow/frontend/assets/{index-C_2G2ZqJ.js → index-GODbXlHC.js} +1 -1
- langflow/frontend/assets/{index-2vQdFIK_.js → index-G_U_kPAd.js} +1 -1
- langflow/frontend/assets/{index-DS4F_Phe.js → index-IFGgPiye.js} +1 -1
- langflow/frontend/assets/{index-5hW8VleF.js → index-LrMzDsq9.js} +1 -1
- langflow/frontend/assets/{index-L7FKc9QN.js → index-R7q8cAek.js} +1 -1
- langflow/frontend/assets/{index-BRE8A4Q_.js → index-Uq2ij_SS.js} +1 -1
- langflow/frontend/assets/{index-Bn4HAVDG.js → index-VHmUHUUU.js} +1 -1
- langflow/frontend/assets/{index-VO-pk-Hg.js → index-VZnN0P6C.js} +1 -1
- langflow/frontend/assets/{index-Dy7ehgeV.js → index-VcXZzovW.js} +1 -1
- langflow/frontend/assets/{index-DNS4La1f.js → index-Ym6gz0T6.js} +1 -1
- langflow/frontend/assets/{index-UI2ws3qp.js → index-ci4XHjbJ.js} +176 -176
- langflow/frontend/assets/{index-DlMAYATX.js → index-dkS0ek2S.js} +1 -1
- langflow/frontend/assets/{index-Dc0p1Oxl.js → index-hOkEW3JP.js} +1 -1
- langflow/frontend/assets/{index-KnS52ylc.js → index-js8ceOaP.js} +1 -1
- langflow/frontend/assets/{index-DtCsjX48.js → index-lKEJpUsF.js} +1 -1
- langflow/frontend/assets/{index-BO4fl1uU.js → index-mBjJYD9q.js} +1 -1
- langflow/frontend/assets/{index-C_K6Tof7.js → index-r1LZg-PY.js} +1 -1
- langflow/frontend/assets/index-rcdQpNcU.js +1 -0
- langflow/frontend/assets/{index-_3qag0I4.js → index-sS6XLk3j.js} +1 -1
- langflow/frontend/assets/{index-C6P0vvSP.js → index-tOy_uloT.js} +1 -1
- langflow/frontend/assets/lazyIconImports-Bh1TFfvH.js +2 -0
- langflow/frontend/assets/{use-post-add-user-Bt6vZvvT.js → use-post-add-user-HN0rRnhv.js} +1 -1
- langflow/frontend/index.html +1 -1
- langflow/interface/initialize/loading.py +3 -1
- langflow/main.py +19 -2
- langflow/services/database/service.py +3 -1
- langflow/services/telemetry/schema.py +7 -0
- langflow/services/telemetry/service.py +25 -0
- langflow/services/tracing/service.py +14 -4
- {langflow_base_nightly-0.5.0.dev33.dist-info → langflow_base_nightly-0.5.0.dev34.dist-info}/METADATA +1 -1
- {langflow_base_nightly-0.5.0.dev33.dist-info → langflow_base_nightly-0.5.0.dev34.dist-info}/RECORD +162 -145
- langflow/frontend/assets/lazyIconImports-kvf_Kak2.js +0 -2
- {langflow_base_nightly-0.5.0.dev33.dist-info → langflow_base_nightly-0.5.0.dev34.dist-info}/WHEEL +0 -0
- {langflow_base_nightly-0.5.0.dev33.dist-info → langflow_base_nightly-0.5.0.dev34.dist-info}/entry_points.txt +0 -0
|
@@ -1,649 +1,11 @@
|
|
|
1
|
-
import json
|
|
2
|
-
from typing import Any
|
|
3
|
-
|
|
4
|
-
from composio import Action
|
|
5
|
-
|
|
6
1
|
from langflow.base.composio.composio_base import ComposioBaseComponent
|
|
7
|
-
from langflow.inputs import (
|
|
8
|
-
BoolInput,
|
|
9
|
-
IntInput,
|
|
10
|
-
MessageTextInput,
|
|
11
|
-
)
|
|
12
|
-
from langflow.logging import logger
|
|
13
2
|
|
|
14
3
|
|
|
15
4
|
class ComposioGitHubAPIComponent(ComposioBaseComponent):
|
|
16
|
-
"""GitHub API component for interacting with GitHub services."""
|
|
17
|
-
|
|
18
5
|
display_name: str = "GitHub"
|
|
19
|
-
description: str = "GitHub API"
|
|
20
6
|
icon = "Github"
|
|
21
7
|
documentation: str = "https://docs.composio.dev"
|
|
22
8
|
app_name = "github"
|
|
23
9
|
|
|
24
|
-
# GitHub-specific actions
|
|
25
|
-
_actions_data: dict = {
|
|
26
|
-
"GITHUB_CREATE_A_PULL_REQUEST": {
|
|
27
|
-
"display_name": "Create A Pull Request",
|
|
28
|
-
"action_fields": [
|
|
29
|
-
"GITHUB_CREATE_A_PULL_REQUEST_owner",
|
|
30
|
-
"GITHUB_CREATE_A_PULL_REQUEST_repo",
|
|
31
|
-
"GITHUB_CREATE_A_PULL_REQUEST_title",
|
|
32
|
-
"GITHUB_CREATE_A_PULL_REQUEST_head",
|
|
33
|
-
"GITHUB_CREATE_A_PULL_REQUEST_head_repo",
|
|
34
|
-
"GITHUB_CREATE_A_PULL_REQUEST_base",
|
|
35
|
-
"GITHUB_CREATE_A_PULL_REQUEST_body",
|
|
36
|
-
"GITHUB_CREATE_A_PULL_REQUEST_maintainer_can_modify",
|
|
37
|
-
"GITHUB_CREATE_A_PULL_REQUEST_draft",
|
|
38
|
-
"GITHUB_CREATE_A_PULL_REQUEST_issue",
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
"GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER": {
|
|
42
|
-
"display_name": "Star A Repository",
|
|
43
|
-
"action_fields": [
|
|
44
|
-
"GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER_owner",
|
|
45
|
-
"GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER_repo",
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
"GITHUB_LIST_COMMITS": {
|
|
49
|
-
"display_name": "List Commits",
|
|
50
|
-
"action_fields": [
|
|
51
|
-
"GITHUB_LIST_COMMITS_owner",
|
|
52
|
-
"GITHUB_LIST_COMMITS_repo",
|
|
53
|
-
"GITHUB_LIST_COMMITS_sha",
|
|
54
|
-
"GITHUB_LIST_COMMITS_path",
|
|
55
|
-
"GITHUB_LIST_COMMITS_author",
|
|
56
|
-
"GITHUB_LIST_COMMITS_committer",
|
|
57
|
-
"GITHUB_LIST_COMMITS_since",
|
|
58
|
-
"GITHUB_LIST_COMMITS_until",
|
|
59
|
-
"GITHUB_LIST_COMMITS_per_page",
|
|
60
|
-
"GITHUB_LIST_COMMITS_page",
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
"GITHUB_GET_A_PULL_REQUEST": {
|
|
64
|
-
"display_name": "Get A Pull Request",
|
|
65
|
-
"action_fields": [
|
|
66
|
-
"GITHUB_GET_A_PULL_REQUEST_owner",
|
|
67
|
-
"GITHUB_GET_A_PULL_REQUEST_repo",
|
|
68
|
-
"GITHUB_GET_A_PULL_REQUEST_pull_number",
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
"GITHUB_CREATE_AN_ISSUE": {
|
|
72
|
-
"display_name": "Create An Issue",
|
|
73
|
-
"action_fields": [
|
|
74
|
-
"GITHUB_CREATE_AN_ISSUE_owner",
|
|
75
|
-
"GITHUB_CREATE_AN_ISSUE_repo",
|
|
76
|
-
"GITHUB_CREATE_AN_ISSUE_title",
|
|
77
|
-
"GITHUB_CREATE_AN_ISSUE_body",
|
|
78
|
-
"GITHUB_CREATE_AN_ISSUE_assignee",
|
|
79
|
-
"GITHUB_CREATE_AN_ISSUE_milestone",
|
|
80
|
-
"GITHUB_CREATE_AN_ISSUE_labels",
|
|
81
|
-
"GITHUB_CREATE_AN_ISSUE_assignees",
|
|
82
|
-
],
|
|
83
|
-
},
|
|
84
|
-
"GITHUB_LIST_REPOSITORY_ISSUES": {
|
|
85
|
-
"display_name": "List Repository Issues",
|
|
86
|
-
"action_fields": [
|
|
87
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_owner",
|
|
88
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_repo",
|
|
89
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_milestone",
|
|
90
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_state",
|
|
91
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_assignee",
|
|
92
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_creator",
|
|
93
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_mentioned",
|
|
94
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_labels",
|
|
95
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_sort",
|
|
96
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_direction",
|
|
97
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_since",
|
|
98
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_per_page",
|
|
99
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_page",
|
|
100
|
-
],
|
|
101
|
-
},
|
|
102
|
-
"GITHUB_LIST_BRANCHES": {
|
|
103
|
-
"display_name": "List Branches",
|
|
104
|
-
"action_fields": [
|
|
105
|
-
"GITHUB_LIST_BRANCHES_owner",
|
|
106
|
-
"GITHUB_LIST_BRANCHES_repo",
|
|
107
|
-
"GITHUB_LIST_BRANCHES_protected",
|
|
108
|
-
"GITHUB_LIST_BRANCHES_per_page",
|
|
109
|
-
"GITHUB_LIST_BRANCHES_page",
|
|
110
|
-
],
|
|
111
|
-
},
|
|
112
|
-
"GITHUB_LIST_PULL_REQUESTS": {
|
|
113
|
-
"display_name": "List Pull Requests",
|
|
114
|
-
"action_fields": [
|
|
115
|
-
"GITHUB_LIST_PULL_REQUESTS_owner",
|
|
116
|
-
"GITHUB_LIST_PULL_REQUESTS_repo",
|
|
117
|
-
"GITHUB_LIST_PULL_REQUESTS_state",
|
|
118
|
-
"GITHUB_LIST_PULL_REQUESTS_head",
|
|
119
|
-
"GITHUB_LIST_PULL_REQUESTS_base",
|
|
120
|
-
"GITHUB_LIST_PULL_REQUESTS_sort",
|
|
121
|
-
"GITHUB_LIST_PULL_REQUESTS_direction",
|
|
122
|
-
"GITHUB_LIST_PULL_REQUESTS_per_page",
|
|
123
|
-
"GITHUB_LIST_PULL_REQUESTS_page",
|
|
124
|
-
],
|
|
125
|
-
},
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
_all_fields = {field for action_data in _actions_data.values() for field in action_data["action_fields"]}
|
|
129
|
-
_bool_variables = {
|
|
130
|
-
"GITHUB_CREATE_A_PULL_REQUEST_maintainer_can_modify",
|
|
131
|
-
"GITHUB_CREATE_A_PULL_REQUEST_draft",
|
|
132
|
-
"GITHUB_LIST_BRANCHES_protected",
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
inputs = [
|
|
136
|
-
*ComposioBaseComponent._base_inputs,
|
|
137
|
-
MessageTextInput(
|
|
138
|
-
name="GITHUB_CREATE_AN_ISSUE_owner",
|
|
139
|
-
display_name="Owner",
|
|
140
|
-
info="The account owner of the repository. The name is not case sensitive.",
|
|
141
|
-
show=False,
|
|
142
|
-
required=True,
|
|
143
|
-
),
|
|
144
|
-
MessageTextInput(
|
|
145
|
-
name="GITHUB_CREATE_AN_ISSUE_repo",
|
|
146
|
-
display_name="Repo",
|
|
147
|
-
info="The name of the repository. The name is not case sensitive. ",
|
|
148
|
-
show=False,
|
|
149
|
-
required=True,
|
|
150
|
-
),
|
|
151
|
-
MessageTextInput(
|
|
152
|
-
name="GITHUB_CREATE_AN_ISSUE_title",
|
|
153
|
-
display_name="Title",
|
|
154
|
-
info="The title of the issue.",
|
|
155
|
-
show=False,
|
|
156
|
-
required=True,
|
|
157
|
-
),
|
|
158
|
-
MessageTextInput(
|
|
159
|
-
name="GITHUB_CREATE_AN_ISSUE_body",
|
|
160
|
-
display_name="Body",
|
|
161
|
-
info="The contents of the issue.",
|
|
162
|
-
show=False,
|
|
163
|
-
),
|
|
164
|
-
MessageTextInput(
|
|
165
|
-
name="GITHUB_CREATE_AN_ISSUE_assignee",
|
|
166
|
-
display_name="Assignee",
|
|
167
|
-
info="Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ ", # noqa: E501
|
|
168
|
-
show=False,
|
|
169
|
-
advanced=True,
|
|
170
|
-
),
|
|
171
|
-
MessageTextInput(
|
|
172
|
-
name="GITHUB_CREATE_AN_ISSUE_milestone",
|
|
173
|
-
display_name="Milestone",
|
|
174
|
-
info="Milestone",
|
|
175
|
-
show=False,
|
|
176
|
-
advanced=True,
|
|
177
|
-
),
|
|
178
|
-
MessageTextInput(
|
|
179
|
-
name="GITHUB_CREATE_AN_ISSUE_labels",
|
|
180
|
-
display_name="Labels",
|
|
181
|
-
info="Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ ", # noqa: E501
|
|
182
|
-
show=False,
|
|
183
|
-
advanced=True,
|
|
184
|
-
),
|
|
185
|
-
MessageTextInput(
|
|
186
|
-
name="GITHUB_CREATE_AN_ISSUE_assignees",
|
|
187
|
-
display_name="Assignees",
|
|
188
|
-
info="Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ ", # noqa: E501
|
|
189
|
-
show=False,
|
|
190
|
-
advanced=True,
|
|
191
|
-
),
|
|
192
|
-
MessageTextInput(
|
|
193
|
-
name="GITHUB_LIST_PULL_REQUESTS_owner",
|
|
194
|
-
display_name="Owner",
|
|
195
|
-
info="The account owner of the repository. The name is not case sensitive.",
|
|
196
|
-
show=False,
|
|
197
|
-
required=True,
|
|
198
|
-
),
|
|
199
|
-
MessageTextInput(
|
|
200
|
-
name="GITHUB_LIST_PULL_REQUESTS_repo",
|
|
201
|
-
display_name="Repo",
|
|
202
|
-
info="The name of the repository. The name is not case sensitive. ",
|
|
203
|
-
show=False,
|
|
204
|
-
required=True,
|
|
205
|
-
),
|
|
206
|
-
MessageTextInput(
|
|
207
|
-
name="GITHUB_LIST_PULL_REQUESTS_state",
|
|
208
|
-
display_name="State",
|
|
209
|
-
info="Either `open`, `closed`, or `all` to filter by state.",
|
|
210
|
-
show=False,
|
|
211
|
-
value="open",
|
|
212
|
-
advanced=True,
|
|
213
|
-
),
|
|
214
|
-
MessageTextInput(
|
|
215
|
-
name="GITHUB_LIST_PULL_REQUESTS_head",
|
|
216
|
-
display_name="Head",
|
|
217
|
-
info="Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. ", # noqa: E501
|
|
218
|
-
show=False,
|
|
219
|
-
advanced=True,
|
|
220
|
-
),
|
|
221
|
-
MessageTextInput(
|
|
222
|
-
name="GITHUB_LIST_PULL_REQUESTS_base",
|
|
223
|
-
display_name="Base",
|
|
224
|
-
info="Filter pulls by base branch name. Example: `gh-pages`.",
|
|
225
|
-
show=False,
|
|
226
|
-
advanced=True,
|
|
227
|
-
),
|
|
228
|
-
MessageTextInput(
|
|
229
|
-
name="GITHUB_LIST_PULL_REQUESTS_sort",
|
|
230
|
-
display_name="Sort",
|
|
231
|
-
info="What to sort results by. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. ", # noqa: E501
|
|
232
|
-
show=False,
|
|
233
|
-
value="created",
|
|
234
|
-
advanced=True,
|
|
235
|
-
),
|
|
236
|
-
MessageTextInput(
|
|
237
|
-
name="GITHUB_LIST_PULL_REQUESTS_direction",
|
|
238
|
-
display_name="Direction",
|
|
239
|
-
info="The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. ", # noqa: E501
|
|
240
|
-
show=False,
|
|
241
|
-
advanced=True,
|
|
242
|
-
),
|
|
243
|
-
IntInput(
|
|
244
|
-
name="GITHUB_LIST_PULL_REQUESTS_per_page",
|
|
245
|
-
display_name="Per Page",
|
|
246
|
-
info="The number of results per page (max 100)",
|
|
247
|
-
show=False,
|
|
248
|
-
value=1,
|
|
249
|
-
advanced=True,
|
|
250
|
-
),
|
|
251
|
-
IntInput(
|
|
252
|
-
name="GITHUB_LIST_PULL_REQUESTS_page",
|
|
253
|
-
display_name="Page",
|
|
254
|
-
info="The page number of the results to fetch",
|
|
255
|
-
show=False,
|
|
256
|
-
value=1,
|
|
257
|
-
advanced=True,
|
|
258
|
-
),
|
|
259
|
-
MessageTextInput(
|
|
260
|
-
name="GITHUB_CREATE_A_PULL_REQUEST_owner",
|
|
261
|
-
display_name="Owner",
|
|
262
|
-
info="The account owner of the repository. The name is not case sensitive.",
|
|
263
|
-
show=False,
|
|
264
|
-
required=True,
|
|
265
|
-
),
|
|
266
|
-
MessageTextInput(
|
|
267
|
-
name="GITHUB_CREATE_A_PULL_REQUEST_repo",
|
|
268
|
-
display_name="Repo",
|
|
269
|
-
info="The name of the repository. The name is not case sensitive. ",
|
|
270
|
-
show=False,
|
|
271
|
-
required=True,
|
|
272
|
-
),
|
|
273
|
-
MessageTextInput(
|
|
274
|
-
name="GITHUB_CREATE_A_PULL_REQUEST_title",
|
|
275
|
-
display_name="Title",
|
|
276
|
-
info="The title of the new pull request. Required unless `issue` is specified.",
|
|
277
|
-
show=False,
|
|
278
|
-
),
|
|
279
|
-
MessageTextInput(
|
|
280
|
-
name="GITHUB_CREATE_A_PULL_REQUEST_head",
|
|
281
|
-
display_name="Head",
|
|
282
|
-
info="The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. ", # noqa: E501
|
|
283
|
-
show=False,
|
|
284
|
-
required=True,
|
|
285
|
-
),
|
|
286
|
-
MessageTextInput(
|
|
287
|
-
name="GITHUB_CREATE_A_PULL_REQUEST_head_repo",
|
|
288
|
-
display_name="Head Repo",
|
|
289
|
-
info="The name of the repository where the changes in the pull request were made. This field is required for cross-repository pull requests if both repositories are owned by the same organization. ", # noqa: E501
|
|
290
|
-
show=False,
|
|
291
|
-
advanced=True,
|
|
292
|
-
),
|
|
293
|
-
MessageTextInput(
|
|
294
|
-
name="GITHUB_CREATE_A_PULL_REQUEST_base",
|
|
295
|
-
display_name="Base",
|
|
296
|
-
info="The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. ", # noqa: E501
|
|
297
|
-
show=False,
|
|
298
|
-
required=True,
|
|
299
|
-
),
|
|
300
|
-
MessageTextInput(
|
|
301
|
-
name="GITHUB_CREATE_A_PULL_REQUEST_body",
|
|
302
|
-
display_name="Body",
|
|
303
|
-
info="The contents of the pull request.",
|
|
304
|
-
show=False,
|
|
305
|
-
),
|
|
306
|
-
BoolInput(
|
|
307
|
-
name="GITHUB_CREATE_A_PULL_REQUEST_maintainer_can_modify",
|
|
308
|
-
display_name="Maintainer Can Modify",
|
|
309
|
-
info="Indicates whether maintainers can modify the pull request",
|
|
310
|
-
show=False,
|
|
311
|
-
advanced=True,
|
|
312
|
-
),
|
|
313
|
-
BoolInput(
|
|
314
|
-
name="GITHUB_CREATE_A_PULL_REQUEST_draft",
|
|
315
|
-
display_name="Draft",
|
|
316
|
-
info="Indicates whether the pull request is a draft",
|
|
317
|
-
show=False,
|
|
318
|
-
advanced=True,
|
|
319
|
-
),
|
|
320
|
-
IntInput(
|
|
321
|
-
name="GITHUB_CREATE_A_PULL_REQUEST_issue",
|
|
322
|
-
display_name="Issue",
|
|
323
|
-
info="An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. ", # noqa: E501
|
|
324
|
-
show=False,
|
|
325
|
-
advanced=True,
|
|
326
|
-
),
|
|
327
|
-
MessageTextInput(
|
|
328
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_owner",
|
|
329
|
-
display_name="Owner",
|
|
330
|
-
info="The account owner of the repository. The name is not case sensitive.",
|
|
331
|
-
show=False,
|
|
332
|
-
required=True,
|
|
333
|
-
),
|
|
334
|
-
MessageTextInput(
|
|
335
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_repo",
|
|
336
|
-
display_name="Repo",
|
|
337
|
-
info="The name of the repository. The name is not case sensitive. ",
|
|
338
|
-
show=False,
|
|
339
|
-
required=True,
|
|
340
|
-
),
|
|
341
|
-
MessageTextInput(
|
|
342
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_milestone",
|
|
343
|
-
display_name="Milestone",
|
|
344
|
-
info="If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. ", # noqa: E501
|
|
345
|
-
show=False,
|
|
346
|
-
advanced=True,
|
|
347
|
-
),
|
|
348
|
-
MessageTextInput(
|
|
349
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_state",
|
|
350
|
-
display_name="State",
|
|
351
|
-
info="Indicates the state of the issues to return.",
|
|
352
|
-
show=False,
|
|
353
|
-
value="open",
|
|
354
|
-
advanced=True,
|
|
355
|
-
),
|
|
356
|
-
MessageTextInput(
|
|
357
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_assignee",
|
|
358
|
-
display_name="Assignee",
|
|
359
|
-
info="Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. ", # noqa: E501
|
|
360
|
-
show=False,
|
|
361
|
-
advanced=True,
|
|
362
|
-
),
|
|
363
|
-
MessageTextInput(
|
|
364
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_creator",
|
|
365
|
-
display_name="Creator",
|
|
366
|
-
info="The user that created the issue.",
|
|
367
|
-
show=False,
|
|
368
|
-
advanced=True,
|
|
369
|
-
),
|
|
370
|
-
MessageTextInput(
|
|
371
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_mentioned",
|
|
372
|
-
display_name="Mentioned",
|
|
373
|
-
info="A user that's mentioned in the issue.",
|
|
374
|
-
show=False,
|
|
375
|
-
advanced=True,
|
|
376
|
-
),
|
|
377
|
-
MessageTextInput(
|
|
378
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_labels",
|
|
379
|
-
display_name="Labels",
|
|
380
|
-
info="A list of comma separated label names. Example: `bug,ui,@high`",
|
|
381
|
-
show=False,
|
|
382
|
-
advanced=True,
|
|
383
|
-
),
|
|
384
|
-
MessageTextInput(
|
|
385
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_sort",
|
|
386
|
-
display_name="Sort",
|
|
387
|
-
info="What to sort results by",
|
|
388
|
-
show=False,
|
|
389
|
-
value="created",
|
|
390
|
-
advanced=True,
|
|
391
|
-
),
|
|
392
|
-
MessageTextInput(
|
|
393
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_direction",
|
|
394
|
-
display_name="Direction",
|
|
395
|
-
info="The direction to sort the results by",
|
|
396
|
-
show=False,
|
|
397
|
-
value="desc",
|
|
398
|
-
advanced=True,
|
|
399
|
-
),
|
|
400
|
-
MessageTextInput(
|
|
401
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_since",
|
|
402
|
-
display_name="Since",
|
|
403
|
-
info="Only show results that were last updated after the given time. This is a timestamp in ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. ", # noqa: E501
|
|
404
|
-
show=False,
|
|
405
|
-
advanced=True,
|
|
406
|
-
),
|
|
407
|
-
IntInput(
|
|
408
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_per_page",
|
|
409
|
-
display_name="Per Page",
|
|
410
|
-
info="The number of results per page (max 100)",
|
|
411
|
-
show=False,
|
|
412
|
-
value=1,
|
|
413
|
-
advanced=True,
|
|
414
|
-
),
|
|
415
|
-
IntInput(
|
|
416
|
-
name="GITHUB_LIST_REPOSITORY_ISSUES_page",
|
|
417
|
-
display_name="Page",
|
|
418
|
-
info="The page number of the results to fetch",
|
|
419
|
-
show=False,
|
|
420
|
-
value=1,
|
|
421
|
-
advanced=True,
|
|
422
|
-
),
|
|
423
|
-
MessageTextInput(
|
|
424
|
-
name="GITHUB_LIST_BRANCHES_owner",
|
|
425
|
-
display_name="Owner",
|
|
426
|
-
info="The account owner of the repository. The name is not case sensitive.",
|
|
427
|
-
show=False,
|
|
428
|
-
required=True,
|
|
429
|
-
),
|
|
430
|
-
MessageTextInput(
|
|
431
|
-
name="GITHUB_LIST_BRANCHES_repo",
|
|
432
|
-
display_name="Repo",
|
|
433
|
-
info="The name of the repository. The name is not case sensitive. ",
|
|
434
|
-
show=False,
|
|
435
|
-
required=True,
|
|
436
|
-
),
|
|
437
|
-
BoolInput(
|
|
438
|
-
name="GITHUB_LIST_BRANCHES_protected",
|
|
439
|
-
display_name="Protected",
|
|
440
|
-
info="Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches", # noqa: E501
|
|
441
|
-
show=False,
|
|
442
|
-
),
|
|
443
|
-
IntInput(
|
|
444
|
-
name="GITHUB_LIST_BRANCHES_per_page",
|
|
445
|
-
display_name="Per Page",
|
|
446
|
-
info="The number of results per page (max 100)",
|
|
447
|
-
show=False,
|
|
448
|
-
value=30,
|
|
449
|
-
advanced=True,
|
|
450
|
-
),
|
|
451
|
-
IntInput(
|
|
452
|
-
name="GITHUB_LIST_BRANCHES_page",
|
|
453
|
-
display_name="Page",
|
|
454
|
-
info="The page number of the results to fetch",
|
|
455
|
-
show=False,
|
|
456
|
-
value=1,
|
|
457
|
-
advanced=True,
|
|
458
|
-
),
|
|
459
|
-
MessageTextInput(
|
|
460
|
-
name="GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER_owner",
|
|
461
|
-
display_name="Owner",
|
|
462
|
-
info="The account owner of the repository. The name is not case sensitive.",
|
|
463
|
-
show=False,
|
|
464
|
-
required=True,
|
|
465
|
-
),
|
|
466
|
-
MessageTextInput(
|
|
467
|
-
name="GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER_repo",
|
|
468
|
-
display_name="Repo",
|
|
469
|
-
info="The name of the repository. The name is not case sensitive.",
|
|
470
|
-
show=False,
|
|
471
|
-
required=True,
|
|
472
|
-
),
|
|
473
|
-
MessageTextInput(
|
|
474
|
-
name="GITHUB_GET_A_PULL_REQUEST_owner",
|
|
475
|
-
display_name="Owner",
|
|
476
|
-
info="The account owner of the repository. The name is not case sensitive.",
|
|
477
|
-
show=False,
|
|
478
|
-
required=True,
|
|
479
|
-
),
|
|
480
|
-
MessageTextInput(
|
|
481
|
-
name="GITHUB_GET_A_PULL_REQUEST_repo",
|
|
482
|
-
display_name="Repo",
|
|
483
|
-
info="The name of the repository. The name is not case sensitive. ",
|
|
484
|
-
show=False,
|
|
485
|
-
required=True,
|
|
486
|
-
),
|
|
487
|
-
IntInput(
|
|
488
|
-
name="GITHUB_GET_A_PULL_REQUEST_pull_number",
|
|
489
|
-
display_name="Pull Number",
|
|
490
|
-
info="The number that identifies the pull request.",
|
|
491
|
-
show=False,
|
|
492
|
-
required=True,
|
|
493
|
-
),
|
|
494
|
-
MessageTextInput(
|
|
495
|
-
name="GITHUB_LIST_COMMITS_owner",
|
|
496
|
-
display_name="Owner",
|
|
497
|
-
info="The account owner of the repository. The name is not case sensitive.",
|
|
498
|
-
show=False,
|
|
499
|
-
required=True,
|
|
500
|
-
),
|
|
501
|
-
MessageTextInput(
|
|
502
|
-
name="GITHUB_LIST_COMMITS_repo",
|
|
503
|
-
display_name="Repo",
|
|
504
|
-
info="The name of the repository. The name is not case sensitive. ",
|
|
505
|
-
show=False,
|
|
506
|
-
required=True,
|
|
507
|
-
),
|
|
508
|
-
MessageTextInput(
|
|
509
|
-
name="GITHUB_LIST_COMMITS_sha",
|
|
510
|
-
display_name="SHA",
|
|
511
|
-
info="SHA or branch to start listing commits from. Default: the repository's default branch (usually `main`). ", # noqa: E501
|
|
512
|
-
show=False,
|
|
513
|
-
advanced=True,
|
|
514
|
-
),
|
|
515
|
-
MessageTextInput(
|
|
516
|
-
name="GITHUB_LIST_COMMITS_path",
|
|
517
|
-
display_name="Path",
|
|
518
|
-
info="Only commits containing this file path will be returned.",
|
|
519
|
-
show=False,
|
|
520
|
-
advanced=True,
|
|
521
|
-
),
|
|
522
|
-
MessageTextInput(
|
|
523
|
-
name="GITHUB_LIST_COMMITS_author",
|
|
524
|
-
display_name="Author",
|
|
525
|
-
info="GitHub username or email address to use to filter by commit author.",
|
|
526
|
-
show=False,
|
|
527
|
-
advanced=True,
|
|
528
|
-
),
|
|
529
|
-
MessageTextInput(
|
|
530
|
-
name="GITHUB_LIST_COMMITS_committer",
|
|
531
|
-
display_name="Committer",
|
|
532
|
-
info="GitHub username or email address to use to filter by commit committer.",
|
|
533
|
-
show=False,
|
|
534
|
-
advanced=True,
|
|
535
|
-
),
|
|
536
|
-
MessageTextInput(
|
|
537
|
-
name="GITHUB_LIST_COMMITS_since",
|
|
538
|
-
display_name="Since",
|
|
539
|
-
info="Only show results that were last updated after the given time. This is a timestamp in ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. ", # noqa: E501
|
|
540
|
-
show=False,
|
|
541
|
-
advanced=True,
|
|
542
|
-
),
|
|
543
|
-
MessageTextInput(
|
|
544
|
-
name="GITHUB_LIST_COMMITS_until",
|
|
545
|
-
display_name="Until",
|
|
546
|
-
info="Only commits before this date will be returned. This is a timestamp in ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. ", # noqa: E501
|
|
547
|
-
show=False,
|
|
548
|
-
advanced=True,
|
|
549
|
-
),
|
|
550
|
-
IntInput(
|
|
551
|
-
name="GITHUB_LIST_COMMITS_per_page",
|
|
552
|
-
display_name="Per Page",
|
|
553
|
-
info="The number of results per page (max 100)",
|
|
554
|
-
show=False,
|
|
555
|
-
value=1,
|
|
556
|
-
advanced=True,
|
|
557
|
-
),
|
|
558
|
-
IntInput(
|
|
559
|
-
name="GITHUB_LIST_COMMITS_page",
|
|
560
|
-
display_name="Page",
|
|
561
|
-
info="The page number of the results to fetch",
|
|
562
|
-
show=False,
|
|
563
|
-
value=1,
|
|
564
|
-
advanced=True,
|
|
565
|
-
),
|
|
566
|
-
]
|
|
567
|
-
|
|
568
|
-
def execute_action(self):
|
|
569
|
-
"""Execute action and return response as Message."""
|
|
570
|
-
toolset = self._build_wrapper()
|
|
571
|
-
|
|
572
|
-
try:
|
|
573
|
-
self._build_action_maps()
|
|
574
|
-
# Get the display name from the action list
|
|
575
|
-
display_name = self.action[0]["name"] if isinstance(self.action, list) and self.action else self.action
|
|
576
|
-
# Use the display_to_key_map to get the action key
|
|
577
|
-
action_key = self._display_to_key_map.get(display_name)
|
|
578
|
-
if not action_key:
|
|
579
|
-
msg = f"Invalid action: {display_name}"
|
|
580
|
-
raise ValueError(msg)
|
|
581
|
-
|
|
582
|
-
enum_name = getattr(Action, action_key)
|
|
583
|
-
params = {}
|
|
584
|
-
if action_key in self._actions_data:
|
|
585
|
-
for field in self._actions_data[action_key]["action_fields"]:
|
|
586
|
-
value = getattr(self, field)
|
|
587
|
-
|
|
588
|
-
if value is None or value == "":
|
|
589
|
-
continue
|
|
590
|
-
|
|
591
|
-
if (
|
|
592
|
-
field
|
|
593
|
-
in [
|
|
594
|
-
"GITHUB_CREATE_AN_ISSUE_labels",
|
|
595
|
-
"GITHUB_CREATE_AN_ISSUE_assignees",
|
|
596
|
-
"GITHUB_LIST_REPOSITORY_ISSUES_labels",
|
|
597
|
-
]
|
|
598
|
-
and value
|
|
599
|
-
):
|
|
600
|
-
value = [item.strip() for item in value.split(",")]
|
|
601
|
-
|
|
602
|
-
if field in self._bool_variables:
|
|
603
|
-
value = bool(value)
|
|
604
|
-
|
|
605
|
-
param_name = field.replace(action_key + "_", "")
|
|
606
|
-
params[param_name] = value
|
|
607
|
-
|
|
608
|
-
result = toolset.execute_action(
|
|
609
|
-
action=enum_name,
|
|
610
|
-
params=params,
|
|
611
|
-
)
|
|
612
|
-
if not result.get("successful"):
|
|
613
|
-
try:
|
|
614
|
-
message_str = result.get("error", {})
|
|
615
|
-
error_message = message_str.split("`")[1]
|
|
616
|
-
error_msg_json = json.loads(error_message)
|
|
617
|
-
except (IndexError, json.JSONDecodeError):
|
|
618
|
-
return {"error": str(message_str)}
|
|
619
|
-
return {
|
|
620
|
-
"code": error_msg_json.get("status"),
|
|
621
|
-
"message": error_msg_json.get("message"),
|
|
622
|
-
"documentation_url": error_msg_json.get("documentation_url"),
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
result_data = result.get("data", [])
|
|
626
|
-
if (
|
|
627
|
-
len(result_data) != 1
|
|
628
|
-
and not self._actions_data.get(action_key, {}).get("result_field")
|
|
629
|
-
and self._actions_data.get(action_key, {}).get("get_result_field")
|
|
630
|
-
):
|
|
631
|
-
msg = f"Expected a dict with a single key, got {len(result_data)} keys: {result_data.keys()}"
|
|
632
|
-
raise ValueError(msg)
|
|
633
|
-
if isinstance(result_data.get("details"), list):
|
|
634
|
-
return result_data.get("details")
|
|
635
|
-
return result_data # noqa: TRY300
|
|
636
|
-
except Exception as e:
|
|
637
|
-
logger.error(f"Error executing action: {e}")
|
|
638
|
-
display_name = self.action[0]["name"] if isinstance(self.action, list) and self.action else str(self.action)
|
|
639
|
-
msg = f"Failed to execute {display_name}: {e!s}"
|
|
640
|
-
raise ValueError(msg) from e
|
|
641
|
-
|
|
642
|
-
def update_build_config(self, build_config: dict, field_value: Any, field_name: str | None = None) -> dict:
|
|
643
|
-
return super().update_build_config(build_config, field_value, field_name)
|
|
644
|
-
|
|
645
10
|
def set_default_tools(self):
|
|
646
|
-
|
|
647
|
-
self.sanitize_action_name("GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER").replace(" ", "-"),
|
|
648
|
-
self.sanitize_action_name("GITHUB_CREATE_A_PULL_REQUEST").replace(" ", "-"),
|
|
649
|
-
}
|
|
11
|
+
"""Set the default tools for GitHub component."""
|