all-contributors-for-repository
Advanced tools
Comparing version 0.2.3 to 0.3.0
@@ -0,1 +1,2 @@ | ||
import { descriptionToCoAuthors } from "description-to-co-authors"; | ||
function addAcceptedIssues(acceptedIssues, contributors, options) { | ||
@@ -16,9 +17,17 @@ for (const acceptedIssue of acceptedIssues) { | ||
]) { | ||
if (labels.some((label) => label === labelType)) { | ||
contributors.add( | ||
acceptedIssue.user?.login, | ||
acceptedIssue.number, | ||
contribution | ||
); | ||
if (!labels.some((label) => label === labelType)) { | ||
continue; | ||
} | ||
const logins = []; | ||
if (acceptedIssue.user) { | ||
logins.push(acceptedIssue.user.login); | ||
} | ||
if (acceptedIssue.body) { | ||
for (const coAuthor of descriptionToCoAuthors(acceptedIssue.body)) { | ||
logins.push(coAuthor.username); | ||
} | ||
} | ||
for (const login of logins) { | ||
contributors.add(login, acceptedIssue.number, contribution); | ||
} | ||
} | ||
@@ -25,0 +34,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { commitToCoAuthors } from "commit-to-co-authors"; | ||
import { descriptionToCoAuthors } from "description-to-co-authors"; | ||
async function parseMergedPullAuthors(mergedPull, cachingCoAuthorToUsername) { | ||
@@ -6,3 +6,3 @@ const authors = []; | ||
if (mergedPull.body) { | ||
const coAuthors = commitToCoAuthors(mergedPull.body); | ||
const coAuthors = descriptionToCoAuthors(mergedPull.body); | ||
for (const coAuthor of coAuthors) { | ||
@@ -9,0 +9,0 @@ authors.push(await cachingCoAuthorToUsername(coAuthor)); |
@@ -1,2 +0,2 @@ | ||
import conventionalCommitsParser from "conventional-commits-parser"; | ||
import { CommitParser } from "conventional-commits-parser"; | ||
const allContributorsTypes = /* @__PURE__ */ new Map([ | ||
@@ -8,4 +8,5 @@ ["build", "infra"], | ||
]); | ||
const parser = new CommitParser(); | ||
function parseMergedPullType(title) { | ||
const { type } = conventionalCommitsParser.sync(title); | ||
const { type } = parser.parse(title); | ||
return (type && allContributorsTypes.get(type)) ?? "code"; | ||
@@ -12,0 +13,0 @@ } |
{ | ||
"name": "all-contributors-for-repository", | ||
"version": "0.2.3", | ||
"version": "0.3.0", | ||
"description": "Generates an allcontributors list for an existing repository. 🤝", | ||
@@ -40,6 +40,6 @@ "repository": { | ||
"dependencies": { | ||
"co-author-to-username": "^0.1.0", | ||
"commit-to-co-authors": "^0.1.0", | ||
"conventional-commits-parser": "^5.0.0", | ||
"octokit": "^3.1.2" | ||
"co-author-to-username": "^0.1.1", | ||
"conventional-commits-parser": "^6.0.0", | ||
"description-to-co-authors": "^0.3.0", | ||
"octokit": "^4.0.0" | ||
}, | ||
@@ -49,4 +49,4 @@ "devDependencies": { | ||
"@types/conventional-commits-parser": "^5.0.0", | ||
"@types/eslint": "^8.56.2", | ||
"@typescript-eslint/eslint-plugin": "^6.18.1", | ||
"@types/eslint": "^9.0.0", | ||
"@typescript-eslint/eslint-plugin": "^8.0.0", | ||
"@typescript-eslint/parser": "^7.0.0", | ||
@@ -56,3 +56,3 @@ "@vitest/coverage-v8": "^1.1.3", | ||
"cspell": "^8.3.2", | ||
"eslint": "^8.56.0", | ||
"eslint": "^9.0.0", | ||
"eslint-plugin-deprecation": "^2.0.0", | ||
@@ -62,3 +62,3 @@ "eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-jsonc": "^2.11.2", | ||
"eslint-plugin-markdown": "^3.0.1", | ||
"eslint-plugin-markdown": "^5.0.0", | ||
"eslint-plugin-n": "^17.0.0", | ||
@@ -68,3 +68,3 @@ "eslint-plugin-no-only-tests": "^3.1.0", | ||
"eslint-plugin-regexp": "^2.2.0", | ||
"eslint-plugin-vitest": "^0.4.0", | ||
"eslint-plugin-vitest": "^0.5.0", | ||
"eslint-plugin-yml": "^1.11.0", | ||
@@ -71,0 +71,0 @@ "husky": "^9.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
110644
2313
+ Addedconventional-commits-parser@6.0.0(transitive)
+ Addeddescription-to-co-authors@0.3.0(transitive)
+ Addedmeow@13.2.0(transitive)
- Removedcommit-to-co-authors@^0.1.0
- Removed@octokit/app@14.1.0(transitive)
- Removed@octokit/auth-app@6.1.3(transitive)
- Removed@octokit/auth-oauth-app@7.1.0(transitive)
- Removed@octokit/auth-oauth-device@6.1.0(transitive)
- Removed@octokit/auth-oauth-user@4.1.0(transitive)
- Removed@octokit/auth-token@4.0.0(transitive)
- Removed@octokit/auth-unauthenticated@5.0.1(transitive)
- Removed@octokit/core@5.2.0(transitive)
- Removed@octokit/endpoint@9.0.5(transitive)
- Removed@octokit/graphql@7.1.0(transitive)
- Removed@octokit/oauth-app@6.1.0(transitive)
- Removed@octokit/oauth-authorization-url@6.0.2(transitive)
- Removed@octokit/oauth-methods@4.1.0(transitive)
- Removed@octokit/openapi-types@20.0.0(transitive)
- Removed@octokit/plugin-paginate-graphql@4.0.1(transitive)
- Removed@octokit/plugin-paginate-rest@11.3.19.2.1(transitive)
- Removed@octokit/plugin-rest-endpoint-methods@13.2.2(transitive)
- Removed@octokit/plugin-retry@6.1.0(transitive)
- Removed@octokit/plugin-throttling@8.2.0(transitive)
- Removed@octokit/request@8.4.0(transitive)
- Removed@octokit/request-error@5.1.0(transitive)
- Removed@octokit/types@12.6.0(transitive)
- Removed@octokit/webhooks@12.3.1(transitive)
- Removed@octokit/webhooks-methods@4.1.0(transitive)
- Removed@octokit/webhooks-types@7.6.1(transitive)
- Removed@types/btoa-lite@1.0.2(transitive)
- Removed@types/jsonwebtoken@9.0.8(transitive)
- Removed@types/ms@2.1.0(transitive)
- Removed@types/node@22.10.10(transitive)
- Removed@wolfy1339/lru-cache@11.0.2-patch.1(transitive)
- RemovedJSONStream@1.3.5(transitive)
- Removedaggregate-error@3.1.0(transitive)
- Removedbefore-after-hook@2.2.3(transitive)
- Removedbtoa-lite@1.0.0(transitive)
- Removedbuffer-equal-constant-time@1.0.1(transitive)
- Removedclean-stack@2.2.0(transitive)
- Removedcommit-to-co-authors@0.1.0(transitive)
- Removedconventional-commits-parser@5.0.0(transitive)
- Removeddeprecation@2.3.1(transitive)
- Removedecdsa-sig-formatter@1.0.11(transitive)
- Removedindent-string@4.0.0(transitive)
- Removedis-text-path@2.0.0(transitive)
- Removedjsonparse@1.3.1(transitive)
- Removedjsonwebtoken@9.0.2(transitive)
- Removedjwa@1.4.1(transitive)
- Removedjws@3.2.2(transitive)
- Removedlodash.includes@4.3.0(transitive)
- Removedlodash.isboolean@3.0.3(transitive)
- Removedlodash.isinteger@4.0.4(transitive)
- Removedlodash.isnumber@3.0.3(transitive)
- Removedlodash.isplainobject@4.0.6(transitive)
- Removedlodash.isstring@4.0.1(transitive)
- Removedlodash.once@4.1.1(transitive)
- Removedmeow@12.1.1(transitive)
- Removedms@2.1.3(transitive)
- Removedoctokit@3.2.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsemver@7.6.3(transitive)
- Removedsplit2@4.2.0(transitive)
- Removedtext-extensions@2.4.0(transitive)
- Removedthrough@2.3.8(transitive)
- Removedundici-types@6.20.0(transitive)
- Removeduniversal-github-app-jwt@1.2.0(transitive)
- Removeduniversal-user-agent@6.0.1(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedco-author-to-username@^0.1.1
Updatedoctokit@^4.0.0