fix(plugins/code,habits,languages): support basic login as authoring (#650)

This commit is contained in:
Simon Lecoq
2021-11-03 23:19:32 -04:00
committed by GitHub
parent f873920871
commit 23f0ba8e0b
3 changed files with 4 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ export default async function({login, data, rest, imports, q, account}, {enabled
...await Promise.allSettled(
commits
.flatMap(({payload}) => payload.commits)
.filter(({author}) => data.shared["commits.authoring"].filter(authoring => author?.email?.toLocaleLowerCase().includes(authoring)||author?.name?.toLocaleLowerCase().includes(authoring)).length)
.filter(({author}) => data.shared["commits.authoring"].filter(authoring => author?.login?.toLocaleLowerCase().includes(authoring)||author?.email?.toLocaleLowerCase().includes(authoring)||author?.name?.toLocaleLowerCase().includes(authoring)).length)
.map(async commit => (await rest.request(commit)).data.files),
),
]