@kana-ai/edgar-ext-github 0.0.0-stage → 0.1.1
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/LICENSE +202 -0
- package/README.md +469 -2
- package/agents/dismiss/agent.toml +4 -0
- package/agents/dismiss/instructions.md +25 -0
- package/dist/src/api/app.d.ts +16 -0
- package/dist/src/api/app.js +32 -0
- package/dist/src/api/client.d.ts +26 -0
- package/dist/src/api/client.js +103 -0
- package/dist/src/api/failures.d.ts +8 -0
- package/dist/src/api/failures.js +31 -0
- package/dist/src/feed/alerts.d.ts +26 -0
- package/dist/src/feed/alerts.js +117 -0
- package/dist/src/feed/cards.d.ts +32 -0
- package/dist/src/feed/cards.js +164 -0
- package/dist/src/feed/service.d.ts +28 -0
- package/dist/src/feed/service.js +163 -0
- package/dist/src/index.d.ts +490 -0
- package/dist/src/index.js +62 -0
- package/dist/src/schemas/config.d.ts +57 -0
- package/dist/src/schemas/config.js +89 -0
- package/dist/src/schemas/github.d.ts +417 -0
- package/dist/src/schemas/github.js +216 -0
- package/dist/src/schemas/tools.d.ts +620 -0
- package/dist/src/schemas/tools.js +501 -0
- package/dist/src/tools/alerts.d.ts +45 -0
- package/dist/src/tools/alerts.js +100 -0
- package/dist/src/tools/branch.d.ts +9 -0
- package/dist/src/tools/branch.js +48 -0
- package/dist/src/tools/checks.d.ts +118 -0
- package/dist/src/tools/checks.js +223 -0
- package/dist/src/tools/discussion.d.ts +41 -0
- package/dist/src/tools/discussion.js +66 -0
- package/dist/src/tools/pull-request.d.ts +195 -0
- package/dist/src/tools/pull-request.js +537 -0
- package/dist/src/tools/repository.d.ts +53 -0
- package/dist/src/tools/repository.js +134 -0
- package/dist/src/tools/screenshot.d.ts +21 -0
- package/dist/src/tools/screenshot.js +99 -0
- package/dist/src/tracker/assignee.d.ts +15 -0
- package/dist/src/tracker/assignee.js +65 -0
- package/dist/src/tracker/cards.d.ts +41 -0
- package/dist/src/tracker/cards.js +361 -0
- package/dist/src/tracker/comments.d.ts +9 -0
- package/dist/src/tracker/comments.js +68 -0
- package/dist/src/tracker/description.d.ts +19 -0
- package/dist/src/tracker/description.js +55 -0
- package/dist/src/tracker/hand-back.d.ts +8 -0
- package/dist/src/tracker/hand-back.js +60 -0
- package/dist/src/tracker/port.d.ts +2 -0
- package/dist/src/tracker/port.js +42 -0
- package/dist/src/tracker/states.d.ts +77 -0
- package/dist/src/tracker/states.js +189 -0
- package/dist/src/tracker/tools.d.ts +143 -0
- package/dist/src/tracker/tools.js +131 -0
- package/dist/src/tracker/transitions.d.ts +12 -0
- package/dist/src/tracker/transitions.js +101 -0
- package/edgar-extension.json +507 -0
- package/package.json +43 -3
- package/schemas/assign.in.json +15 -0
- package/schemas/assign.out.json +14 -0
- package/schemas/attach_screenshot.in.json +44 -0
- package/schemas/attach_screenshot.out.json +31 -0
- package/schemas/batch_cards.in.json +27 -0
- package/schemas/batch_cards.out.json +37 -0
- package/schemas/branch_protection.in.json +15 -0
- package/schemas/branch_protection.out.json +67 -0
- package/schemas/ci_run.in.json +12 -0
- package/schemas/ci_run.out.json +109 -0
- package/schemas/close.in.json +14 -0
- package/schemas/close.out.json +10 -0
- package/schemas/close_pull_request.in.json +21 -0
- package/schemas/close_pull_request.out.json +14 -0
- package/schemas/comment.in.json +19 -0
- package/schemas/comment.out.json +10 -0
- package/schemas/config.json +202 -0
- package/schemas/count_sighting.in.json +17 -0
- package/schemas/count_sighting.out.json +10 -0
- package/schemas/create_card.in.json +108 -0
- package/schemas/create_card.out.json +13 -0
- package/schemas/dependabot_alerts.in.json +49 -0
- package/schemas/dependabot_alerts.out.json +75 -0
- package/schemas/dismiss_dependabot_alert.in.json +26 -0
- package/schemas/dismiss_dependabot_alert.out.json +27 -0
- package/schemas/find_assignee.in.json +15 -0
- package/schemas/find_assignee.out.json +10 -0
- package/schemas/find_cards.in.json +18 -0
- package/schemas/find_cards.out.json +33 -0
- package/schemas/find_dependabot_dismissal.in.json +12 -0
- package/schemas/find_dependabot_dismissal.out.json +27 -0
- package/schemas/find_description.in.json +15 -0
- package/schemas/find_description.out.json +10 -0
- package/schemas/find_pull_request.in.json +25 -0
- package/schemas/find_pull_request.out.json +14 -0
- package/schemas/hand_back.in.json +11 -0
- package/schemas/hand_back.out.json +18 -0
- package/schemas/linked_pull_requests.in.json +15 -0
- package/schemas/linked_pull_requests.out.json +44 -0
- package/schemas/list_pull_requests.in.json +26 -0
- package/schemas/list_pull_requests.out.json +42 -0
- package/schemas/merge_pull_request.in.json +22 -0
- package/schemas/merge_pull_request.out.json +16 -0
- package/schemas/move.in.json +15 -0
- package/schemas/move.out.json +10 -0
- package/schemas/note_pull_request.in.json +15 -0
- package/schemas/note_pull_request.out.json +10 -0
- package/schemas/open_pull_request.in.json +113 -0
- package/schemas/open_pull_request.out.json +15 -0
- package/schemas/pull_request_checks.in.json +11 -0
- package/schemas/pull_request_checks.out.json +72 -0
- package/schemas/pull_request_discussion.in.json +11 -0
- package/schemas/pull_request_discussion.out.json +107 -0
- package/schemas/pull_request_state.in.json +11 -0
- package/schemas/pull_request_state.out.json +52 -0
- package/schemas/push_branch.in.json +21 -0
- package/schemas/push_branch.out.json +13 -0
- package/schemas/release_follow_ups.in.json +15 -0
- package/schemas/release_follow_ups.out.json +13 -0
- package/schemas/reopen_dependabot_alert.in.json +33 -0
- package/schemas/reopen_dependabot_alert.out.json +22 -0
- package/schemas/restore_assignee.in.json +20 -0
- package/schemas/restore_assignee.out.json +10 -0
- package/schemas/restore_description.in.json +20 -0
- package/schemas/restore_description.out.json +10 -0
- package/schemas/update_description.in.json +15 -0
- package/schemas/update_description.out.json +14 -0
- package/schemas/update_pull_request.in.json +81 -0
- package/schemas/update_pull_request.out.json +10 -0
- package/schemas/wait_for_checks.in.json +11 -0
- package/schemas/wait_for_checks.out.json +72 -0
- package/schemas/wait_for_merge.in.json +11 -0
- package/schemas/wait_for_merge.out.json +17 -0
- package/schemas/wait_for_passed_checks.in.json +11 -0
- package/schemas/wait_for_passed_checks.out.json +72 -0
- package/schemas/wait_for_review.in.json +11 -0
- package/schemas/wait_for_review.out.json +52 -0
- package/workflows/resume.toml +17 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"card": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"minLength": 1
|
|
8
|
+
},
|
|
9
|
+
"description": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "the new description; the card's edgar:v0 block is kept"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"required": ["card", "description"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"id": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"previous": {
|
|
9
|
+
"description": "the description before the write, which restore_description puts back; none when the card already read so",
|
|
10
|
+
"type": "string"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"required": ["id"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"url": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"minLength": 1
|
|
8
|
+
},
|
|
9
|
+
"title": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"body": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"large_diff_lines": {
|
|
17
|
+
"description": "the body says the change is large when it changes more lines than this",
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"exclusiveMinimum": 0,
|
|
20
|
+
"maximum": 9007199254740991
|
|
21
|
+
},
|
|
22
|
+
"path_notices": {
|
|
23
|
+
"description": "a line the body carries when the change touches a file under prefix",
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"prefix": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1
|
|
31
|
+
},
|
|
32
|
+
"notice": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": ["prefix", "notice"]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"checks": {
|
|
41
|
+
"description": "the output of a check stage: the body lists each check that passed under Verified, and each other check under Not verified",
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"results": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"properties": {
|
|
49
|
+
"check": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1
|
|
52
|
+
},
|
|
53
|
+
"exit_code": {
|
|
54
|
+
"anyOf": [
|
|
55
|
+
{
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"minimum": -9007199254740991,
|
|
58
|
+
"maximum": 9007199254740991
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "null"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": ["check", "exit_code"]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": ["results"]
|
|
71
|
+
},
|
|
72
|
+
"not_verified": {
|
|
73
|
+
"description": "what the author of the change did not check, one line each, under Not verified",
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": ["url", "title", "body"]
|
|
81
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"url": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"commit": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"state": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["pending", "passed", "failed", "closed"]
|
|
14
|
+
},
|
|
15
|
+
"merged": {
|
|
16
|
+
"type": "boolean"
|
|
17
|
+
},
|
|
18
|
+
"checks": {
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"minimum": -9007199254740991,
|
|
21
|
+
"maximum": 9007199254740991
|
|
22
|
+
},
|
|
23
|
+
"failed": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"name": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"url": {
|
|
32
|
+
"type": ["string", "null"]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": ["name", "url"]
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"retry_after_seconds": {
|
|
39
|
+
"anyOf": [
|
|
40
|
+
{
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": -9007199254740991,
|
|
43
|
+
"maximum": 9007199254740991
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "null"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"summary": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "one sentence a later stage can post as it is"
|
|
53
|
+
},
|
|
54
|
+
"changed_files": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": -9007199254740991,
|
|
57
|
+
"maximum": 9007199254740991,
|
|
58
|
+
"description": "the files the pull request changes at commit"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": [
|
|
62
|
+
"url",
|
|
63
|
+
"commit",
|
|
64
|
+
"state",
|
|
65
|
+
"merged",
|
|
66
|
+
"checks",
|
|
67
|
+
"failed",
|
|
68
|
+
"retry_after_seconds",
|
|
69
|
+
"summary",
|
|
70
|
+
"changed_files"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"url": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"merged": {
|
|
9
|
+
"type": "boolean"
|
|
10
|
+
},
|
|
11
|
+
"sha": {
|
|
12
|
+
"description": "the merge commit, once merged",
|
|
13
|
+
"type": "string"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["url", "merged"]
|
|
17
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"url": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"commit": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"state": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["pending", "passed", "failed", "closed"]
|
|
14
|
+
},
|
|
15
|
+
"merged": {
|
|
16
|
+
"type": "boolean"
|
|
17
|
+
},
|
|
18
|
+
"checks": {
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"minimum": -9007199254740991,
|
|
21
|
+
"maximum": 9007199254740991
|
|
22
|
+
},
|
|
23
|
+
"failed": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"name": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"url": {
|
|
32
|
+
"type": ["string", "null"]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": ["name", "url"]
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"retry_after_seconds": {
|
|
39
|
+
"anyOf": [
|
|
40
|
+
{
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": -9007199254740991,
|
|
43
|
+
"maximum": 9007199254740991
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "null"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"summary": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "one sentence a later stage can post as it is"
|
|
53
|
+
},
|
|
54
|
+
"changed_files": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": -9007199254740991,
|
|
57
|
+
"maximum": 9007199254740991,
|
|
58
|
+
"description": "the files the pull request changes at commit"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": [
|
|
62
|
+
"url",
|
|
63
|
+
"commit",
|
|
64
|
+
"state",
|
|
65
|
+
"merged",
|
|
66
|
+
"checks",
|
|
67
|
+
"failed",
|
|
68
|
+
"retry_after_seconds",
|
|
69
|
+
"summary",
|
|
70
|
+
"changed_files"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"url": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"state": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": ["open", "merged", "closed"]
|
|
11
|
+
},
|
|
12
|
+
"merged": {
|
|
13
|
+
"type": "boolean"
|
|
14
|
+
},
|
|
15
|
+
"review_state": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["pending", "approved", "changes_requested"]
|
|
18
|
+
},
|
|
19
|
+
"approved_by": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"description": "the login of each reviewer whose latest deciding review approves"
|
|
25
|
+
},
|
|
26
|
+
"card": {
|
|
27
|
+
"type": ["string", "null"]
|
|
28
|
+
},
|
|
29
|
+
"commit": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"branch": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "the head branch"
|
|
35
|
+
},
|
|
36
|
+
"head_repo": {
|
|
37
|
+
"description": "the repository of the head branch as owner/name, a fork's for a fork; null when it was deleted",
|
|
38
|
+
"type": ["string", "null"]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": [
|
|
42
|
+
"url",
|
|
43
|
+
"state",
|
|
44
|
+
"merged",
|
|
45
|
+
"review_state",
|
|
46
|
+
"approved_by",
|
|
47
|
+
"card",
|
|
48
|
+
"commit",
|
|
49
|
+
"branch",
|
|
50
|
+
"head_repo"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Onto the built-in `resume`: a person who decides that the Dependabot alerts of a card are not to
|
|
2
|
+
# be fixed gets each one dismissed at GitHub with their reason, and a note on the card that says so.
|
|
3
|
+
version = 1
|
|
4
|
+
|
|
5
|
+
[stages.dismiss]
|
|
6
|
+
needs = ["classify_intent"]
|
|
7
|
+
when = { path = "stages.classify_intent.output.intent", equals = "dismiss" }
|
|
8
|
+
agent = "dismiss"
|
|
9
|
+
input = { card = "trigger.card", comment = "trigger.event" }
|
|
10
|
+
output_schema = "schemas/answer.json"
|
|
11
|
+
timeout_seconds = 900
|
|
12
|
+
|
|
13
|
+
[stages.say_dismissed]
|
|
14
|
+
needs = ["dismiss"]
|
|
15
|
+
when = { path = "stages.dismiss.output.text", exists = true }
|
|
16
|
+
tool = "tracker__comment"
|
|
17
|
+
input = { card = "trigger.card.id", text = "stages.dismiss.output.text" }
|