• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

badges / shields / 45774165149

22 Nov 2026 09:43PM UTC coverage: 79.735% (-18.4%) from 98.17%
45774165149

push

github

web-flow
[Endpoint] Support message override and position it after label in API docs (#12235)

* [Endpoint] Support message override and position it after label in API docs

* Preserve error message when a message override is provided

3371 of 3616 branches covered (93.22%)

43 of 53 new or added lines in 3 files covered. (81.13%)

9589 existing lines in 490 files now uncovered.

41514 of 52065 relevant lines covered (79.73%)

51.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

69.05
/services/github/github-helpers.js
1
import { colorScale } from '../color-formatters.js'
2 ✔
2
import { InvalidResponse, NotFound } from '../index.js'
2 ✔
3

2 ✔
4
const documentation = `
2 ✔
5
You can help increase Shields.io's rate limit by
2 ✔
6
[authorizing the Shields.io GitHub application](https://img.shields.io/github-auth).
2 ✔
7
Read more about [how it works](/blog/token-pool).
2 ✔
8
`
2 ✔
9

2 ✔
10
function issueStateColor(s) {
8 ✔
11
  return {
8 ✔
12
    open: '2cbe4e',
8 ✔
13
    closed: '6f42c1',
8 ✔
14
    'not planned': '666c76',
8 ✔
15
    duplicate: '666c76',
8 ✔
16
  }[s]
8 ✔
17
}
8 ✔
18

2 ✔
UNCOV
19
function httpErrorsFor(notFoundMessage = 'repo not found') {
×
UNCOV
20
  return {
×
UNCOV
21
    404: notFoundMessage,
×
UNCOV
22
    422: notFoundMessage,
×
UNCOV
23
  }
×
UNCOV
24
}
×
25

2 ✔
UNCOV
26
function transformErrors(errors, entity = 'repo') {
×
UNCOV
27
  if (errors[0].type === 'NOT_FOUND') {
×
UNCOV
28
    return new NotFound({ prettyMessage: `${entity} not found` })
×
UNCOV
29
  } else {
×
30
    return new InvalidResponse({ prettyMessage: errors[0].message })
×
31
  }
×
UNCOV
32
}
×
33

2 ✔
34
const commentsColor = colorScale([1, 3, 10, 25], undefined, true)
2 ✔
35

2 ✔
36
export {
2 ✔
37
  documentation,
2 ✔
38
  issueStateColor,
2 ✔
39
  commentsColor,
2 ✔
40
  httpErrorsFor,
2 ✔
41
  transformErrors,
2 ✔
42
}
2 ✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc