change closed GitHub issue color to purple (#7374)

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
Caleb Cartwright
2021-12-18 14:43:02 -06:00
committed by GitHub
parent 08c30f7737
commit 24355a0773
3 changed files with 8 additions and 8 deletions

View File

@@ -10,8 +10,8 @@ const documentation = `
</p>
`
function stateColor(s) {
return { open: '2cbe4e', closed: 'cb2431', merged: '6f42c1' }[s]
function issueStateColor(s) {
return { open: '2cbe4e', closed: '6f42c1' }[s]
}
function errorMessagesFor(notFoundMessage = 'repo not found') {
@@ -33,7 +33,7 @@ const commentsColor = colorScale([1, 3, 10, 25], undefined, true)
export {
documentation,
stateColor,
issueStateColor,
commentsColor,
errorMessagesFor,
transformErrors,

View File

@@ -7,7 +7,7 @@ import { GithubAuthV3Service } from './github-auth-service.js'
import {
documentation,
errorMessagesFor,
stateColor,
issueStateColor,
commentsColor,
} from './github-helpers.js'
@@ -33,7 +33,7 @@ const stateMap = {
if (!isPR || state === 'open') {
return {
color: stateColor(state),
color: issueStateColor(state),
label,
message: state,
}

View File

@@ -4,7 +4,7 @@ import { age } from '../color-formatters.js'
import { formatDate, metric } from '../text-formatters.js'
import { InvalidResponse } from '../index.js'
import GithubIssueDetail from './github-issue-detail.service.js'
import { stateColor, commentsColor } from './github-helpers.js'
import { issueStateColor, commentsColor } from './github-helpers.js'
describe('GithubIssueDetail', function () {
test(GithubIssueDetail.render, () => {
@@ -16,7 +16,7 @@ describe('GithubIssueDetail', function () {
}).expect({
label: 'pull request 12',
message: 'open',
color: stateColor('open'),
color: issueStateColor('open'),
})
given({
property: 'state',
@@ -26,7 +26,7 @@ describe('GithubIssueDetail', function () {
}).expect({
label: 'issue 15',
message: 'closed',
color: stateColor('closed'),
color: issueStateColor('closed'),
})
given({
property: 'title',