Skip to content

Commit

Permalink
fix: fixed community badge
Browse files Browse the repository at this point in the history
  • Loading branch information
technikhil314 committed Mar 6, 2021
1 parent b82c468 commit 160428b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/badges/community.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { parseRepoUrl } = require("../helpers/parseRepoUrl");
const chalk = require("chalk");
exports.generate = async function ({
communityProvider,
communityId,
communityName,
communityServerUrl,
}) {
if (!communityProvider) {
Expand All @@ -15,11 +15,11 @@ exports.generate = async function ({
const community = communityProvider.toUpperCase();
switch (community) {
case providerTypes.DISCORD:
return `[![chat with community](https://img.shields.io//discord/${communityId}?color=%23007a1f&style=flat-square)](${communityServerUrl})`;
return `[![chat with community](https://img.shields.io//discord/${communityName}?color=%23007a1f&style=flat-square)](${communityServerUrl})`;
case providerTypes.SPECTRUM:
return `[![chat with community](https://img.shields.io/badge/Join%20us%20on-spectrum-orange?style=flat-square)](https://spectrum.chat/${communityId})`;
return `[![chat with community](https://img.shields.io/badge/Join%20us%20on-spectrum-orange?style=flat-square)](https://spectrum.chat/${communityName})`;
case providerTypes.GITTER:
return `[![chat with community](https://img.shields.io/gitter/room/${repoOwner}/${repoName}?color=%23007a1f&style=flat-square)](https://gitter.im/${communityId})`;
return `[![chat with community](https://img.shields.io/gitter/room/${repoOwner}/${repoName}?color=%23007a1f&style=flat-square)](https://gitter.im/${communityName})`;
default:
console.warn(
chalk.yellow(
Expand Down

0 comments on commit 160428b

Please sign in to comment.