How to use the all-contributors-cli.addContributorWithDetails function in all-contributors-cli

To help you get started, we’ve selected a few all-contributors-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github all-contributors / all-contributors-bot / src / tasks / processIssueComment / OptionsConfig / index.js View on Github external
}
            }

            return []
        }

        const profileWithProtocol = profile.startsWith('http')
            ? profile
            : `http://${profile}`

        const oldContributions = findOldContributions(login)
        const newContributions = [
            ...new Set([...oldContributions, ...contributions]),
        ]

        const newContributorsList = await addContributorWithDetails({
            options,
            login,
            contributions: newContributions,
            name,
            avatar_url,
            profile: profileWithProtocol,
        })
        const newOptions = {
            ...options,
            contributors: newContributorsList,
        }
        this.options = newOptions
        return newOptions
    }
}

all-contributors-cli

Tool to easily add recognition for new contributors

MIT
Latest version published 11 months ago

Package Health Score

70 / 100
Full package analysis