Skip to content

Commit d9ec346

Browse files
author
lucifer
committed
chore: TODO 邀请进组织
1 parent bf5de4c commit d9ec346

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

middleware/passport.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,12 @@ module.exports = async function checkAuth(ctx, next) {
8484
expires: new Date(24 * 60 * 60 * 1000 + Date.now()),
8585
}
8686
);
87-
87+
// 付费用户
8888
if (db.find((q) => q.login === user.login)) {
89+
// TODO: 如果不在组织中,自动邀请进 Github 组织
90+
// see #1 https://octokit.github.io/rest.js/v18#orgs-check-membership
91+
// see #2 https://github.com/octokit/octokit.js
92+
// see #3 https://github.com/thundergolfer/automated-github-organization-invites/blob/bb1bb3d42a330716f4dd5c49256245e4bde27489/web_app.rb
8993
ctx.session.user = {
9094
...user,
9195
pay: true,

0 commit comments

Comments
 (0)