@qwen-code/channel-github 0.26.7-nightly.20261104.b9e20830f7 → 0.26.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GithubAdapter.d.ts +44 -0
- package/dist/GithubAdapter.d.ts.map +1 -1
- package/dist/GithubAdapter.js +348 -69
- package/dist/GithubAdapter.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47 -22
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACL,aAAa,EAId,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACL,aAAa,EAId,MAAM,oBAAoB,CAAC;AA4D5B,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,eAAO,MAAM,MAAM,EAAE,aA2GpB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,32 +1,57 @@
|
|
|
1
1
|
import { MAX_POLL_INTERVAL_MS, PR_BINDING_ROLES, } from '@qwen-code/channel-base';
|
|
2
2
|
import { GithubChannel, validateBoundSessionConfig, PR_NOTIFICATION_REASONS, PR_WATCH_EVENTS, } from './GithubAdapter.js';
|
|
3
|
+
/**
|
|
4
|
+
* One-line meaning of each unqualified boundSessionActions key, shown by
|
|
5
|
+
* management UIs next to the key and in the add picker. Role-qualified
|
|
6
|
+
* keys reuse their base event's description; the role's job is named by
|
|
7
|
+
* the picker group header instead.
|
|
8
|
+
*/
|
|
9
|
+
const BOUND_ACTION_DESCRIPTIONS = {
|
|
10
|
+
default: 'Fallback template for any event without a more specific key',
|
|
11
|
+
'watch:ci_failure': 'CI checks turn red on a head commit',
|
|
12
|
+
'watch:merge_conflict': 'The PR develops a merge conflict',
|
|
13
|
+
'watch:head_change': 'The PR’s head commit changes',
|
|
14
|
+
'watch:state_change': 'The PR is merged or closed',
|
|
15
|
+
mention: 'You are @mentioned in a comment',
|
|
16
|
+
review_requested: 'A review is requested from you',
|
|
17
|
+
assign: 'You are assigned to the PR',
|
|
18
|
+
author: 'Activity on a PR you authored',
|
|
19
|
+
comment: 'A new comment on a subscribed PR',
|
|
20
|
+
ci_activity: 'CI activity on a subscribed PR',
|
|
21
|
+
manual: 'You subscribed to the PR manually',
|
|
22
|
+
state_change: 'The PR is closed or merged',
|
|
23
|
+
subscribed: 'Activity on a PR you subscribed to',
|
|
24
|
+
team_mention: 'A team you belong to is @mentioned',
|
|
25
|
+
security_alert: 'A security alert on the repository',
|
|
26
|
+
approval_requested: 'Approval is requested from you',
|
|
27
|
+
invitation: 'You are invited to collaborate',
|
|
28
|
+
member_feature_requested: 'A member feature request notification',
|
|
29
|
+
security_advisory_credit: 'You are credited in a security advisory',
|
|
30
|
+
};
|
|
3
31
|
/**
|
|
4
32
|
* The boundSessionActions key options offered by management UIs: the
|
|
5
33
|
* fallback, every event class, and each role-qualified spelling — built
|
|
6
34
|
* from the same constants the validator enforces so the three cannot
|
|
7
|
-
* drift (the PR_WATCH_EVENTS pattern, R2-18).
|
|
35
|
+
* drift (the PR_WATCH_EVENTS pattern, R2-18). `group` buckets the picker
|
|
36
|
+
* by binding role; `description` explains each key.
|
|
8
37
|
*/
|
|
38
|
+
const BOUND_ACTION_BASE_OPTIONS = [
|
|
39
|
+
'default',
|
|
40
|
+
...PR_WATCH_EVENTS.map((event) => `watch:${event}`),
|
|
41
|
+
...PR_NOTIFICATION_REASONS,
|
|
42
|
+
].map((value) => ({
|
|
43
|
+
value,
|
|
44
|
+
label: value,
|
|
45
|
+
description: BOUND_ACTION_DESCRIPTIONS[value],
|
|
46
|
+
}));
|
|
9
47
|
const BOUND_ACTION_KEY_OPTIONS = [
|
|
10
|
-
{
|
|
11
|
-
...
|
|
12
|
-
value:
|
|
13
|
-
label:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
label: reason,
|
|
18
|
-
})),
|
|
19
|
-
...PR_BINDING_ROLES.flatMap((role) => [
|
|
20
|
-
{ value: `${role}:default`, label: `${role}:default` },
|
|
21
|
-
...PR_WATCH_EVENTS.map((event) => ({
|
|
22
|
-
value: `${role}:watch:${event}`,
|
|
23
|
-
label: `${role}:watch:${event}`,
|
|
24
|
-
})),
|
|
25
|
-
...PR_NOTIFICATION_REASONS.map((reason) => ({
|
|
26
|
-
value: `${role}:${reason}`,
|
|
27
|
-
label: `${role}:${reason}`,
|
|
28
|
-
})),
|
|
29
|
-
]),
|
|
48
|
+
...BOUND_ACTION_BASE_OPTIONS.map((option) => ({ ...option, group: 'any' })),
|
|
49
|
+
...PR_BINDING_ROLES.flatMap((role) => BOUND_ACTION_BASE_OPTIONS.map((option) => ({
|
|
50
|
+
value: `${role}:${option.value}`,
|
|
51
|
+
label: `${role}:${option.value}`,
|
|
52
|
+
description: option.description,
|
|
53
|
+
group: role,
|
|
54
|
+
}))),
|
|
30
55
|
];
|
|
31
56
|
export { GithubChannel };
|
|
32
57
|
export const plugin = {
|
|
@@ -112,7 +137,7 @@ export const plugin = {
|
|
|
112
137
|
key: 'boundSessionActions',
|
|
113
138
|
label: 'Bound Session Actions',
|
|
114
139
|
kind: 'record',
|
|
115
|
-
description: 'Optional.
|
|
140
|
+
description: 'Optional. Instruction templates delivered to PR-bound sessions. Pick an event key below; a role prefix (review:, verify:, fix:) targets that binding role only. Requires Deliver To PR-Bound Sessions. Each role with a matching key gets its own delivery; roles without one skip the event. Variables: %repo%, %pr%, %url%, %title%, %event%, %sender%, %role%; %% for a literal %. Leave empty for the default generic prompt.',
|
|
116
141
|
options: BOUND_ACTION_KEY_OPTIONS,
|
|
117
142
|
},
|
|
118
143
|
],
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,uBAAuB,EACvB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,uBAAuB,EACvB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,yBAAyB,GAA2B;IACxD,OAAO,EAAE,6DAA6D;IACtE,kBAAkB,EAAE,qCAAqC;IACzD,sBAAsB,EAAE,kCAAkC;IAC1D,mBAAmB,EAAE,8BAA8B;IACnD,oBAAoB,EAAE,4BAA4B;IAClD,OAAO,EAAE,iCAAiC;IAC1C,gBAAgB,EAAE,gCAAgC;IAClD,MAAM,EAAE,4BAA4B;IACpC,MAAM,EAAE,+BAA+B;IACvC,OAAO,EAAE,kCAAkC;IAC3C,WAAW,EAAE,gCAAgC;IAC7C,MAAM,EAAE,mCAAmC;IAC3C,YAAY,EAAE,4BAA4B;IAC1C,UAAU,EAAE,oCAAoC;IAChD,YAAY,EAAE,oCAAoC;IAClD,cAAc,EAAE,oCAAoC;IACpD,kBAAkB,EAAE,gCAAgC;IACpD,UAAU,EAAE,gCAAgC;IAC5C,wBAAwB,EAAE,uCAAuC;IACjE,wBAAwB,EAAE,yCAAyC;CACpE,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,yBAAyB,GAAG;IAChC,SAAS;IACT,GAAG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ACjB;YACD;gBACE,GAAG,EAAE,eAAe;gBACpB,KAAK,EAAE,iBAAiB;gBACxB,IAAI,EAAE,aAAa;gBACnB,WAAW,EACT,qHAAqH;gBACvH,qEAAqE;gBACrE,oDAAoD;gBACpD,OAAO,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;aACnE;YACD;gBACE,GAAG,EAAE,qBAAqB;gBAC1B,KAAK,EAAE,uBAAuB;gBAC9B,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,maAAma;gBACra,OAAO,EAAE,wBAAwB;aAClC;SACF;QACD,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE;YACzB,MAAM,KAAK,GACT,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACpE,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,IAAI,EAAE,CAAC;gBAC5C,OAAO,2EAA2E,CAAC;YACrF,CAAC;YACD,OAAO,0BAA0B,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACtD,CAAC;KACF;IACD,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAC/C,IAAI,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;CACnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qwen-code/channel-github",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.8",
|
|
4
4
|
"description": "GitHub polling channel adapter for Qwen Code",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@octokit/rest": "^21.1.1",
|
|
28
|
-
"@qwen-code/channel-base": "0.26.
|
|
28
|
+
"@qwen-code/channel-base": "0.26.8",
|
|
29
29
|
"https-proxy-agent": "^7.0.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|