Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Commit f1c7c81

Browse files
author
Joel Worrall
committed
fix: exclude bots from contributor list
1 parent f3859a4 commit f1c7c81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/ContributorListing.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import styles from './ContributorListing.module.scss';
55

66
const ContributorListing = ({ contributors, project }) => {
77
const renderContributorItems = () => {
8-
const sortedContributors = contributors.sort((a, b) =>
9-
b.contributions > a.contributions ? 1 : -1
10-
);
8+
const sortedContributors = contributors
9+
.filter(contributor => contributor.login.indexOf('-bot') === -1)
10+
.sort((a, b) => (b.contributions > a.contributions ? 1 : -1));
1111

1212
const navigate = url => window.open(url, '_blank');
1313
const contributorItem = sortedContributors.map((contributor, i) => {

0 commit comments

Comments
 (0)