🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

all-contributors-for-repository

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

all-contributors-for-repository - npm Package Compare versions

Comparing version

to
0.3.0

21

lib/collect/adding/addAcceptedIssues.js

@@ -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