koishi-plugin-githubsth 1.0.1-test6 → 1.0.1-test7
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/lib/index.js +12 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -71,6 +71,18 @@ function apply(ctx, config) {
|
|
|
71
71
|
ctx.on('github/opened', (payload) => {
|
|
72
72
|
logger.info('[DEBUG] Global listener caught github/opened');
|
|
73
73
|
});
|
|
74
|
+
// Comprehensive debug listeners
|
|
75
|
+
ctx.on('github/webhook', (payload) => {
|
|
76
|
+
logger.info('[DEBUG] Global listener caught github/webhook');
|
|
77
|
+
});
|
|
78
|
+
// Middleware to log all sessions
|
|
79
|
+
ctx.middleware((session, next) => {
|
|
80
|
+
// Log any session event from github
|
|
81
|
+
if (session.platform === 'github') {
|
|
82
|
+
logger.info(`[DEBUG] Middleware saw session.type: ${session.type}, subtype: ${session.subtype}`);
|
|
83
|
+
}
|
|
84
|
+
return next();
|
|
85
|
+
});
|
|
74
86
|
// 注册命令
|
|
75
87
|
// admin and subscribe are already loaded in commands/index.ts, remove duplicate loading here
|
|
76
88
|
try {
|
package/package.json
CHANGED