kopia lustrzana https://github.com/badgen/badgen.net
feat: differentiate CIs from label #37
rodzic
b007ed7e66
commit
e7460fb302
|
@ -18,7 +18,7 @@ async function ci (account, project, branch) {
|
|||
const endpoint = `https://ci.appveyor.com/api/projects/${account}/${project}${branch}`
|
||||
const { build } = await axios.get(endpoint).then(res => res.data)
|
||||
return {
|
||||
subject: 'build',
|
||||
subject: 'appveyor',
|
||||
status: build.status,
|
||||
color: build.status === 'success' ? 'green' : 'red'
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ module.exports = async function (user, repo, branch = 'master') {
|
|||
|
||||
if (res[0].match(/passed|passing/) || res[1].match(/passed|passing/)) {
|
||||
return {
|
||||
subject: 'build',
|
||||
subject: 'travis',
|
||||
status: 'passing',
|
||||
color: 'green'
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ module.exports = async function (user, repo, branch = 'master') {
|
|||
|
||||
if (res[0].match(/failed|failing/) || res[1].match(/failed|failing/)) {
|
||||
return {
|
||||
subject: 'build',
|
||||
subject: 'travis',
|
||||
status: 'failed',
|
||||
color: 'red'
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue