Skip to content

Commit 43c4458

Browse files
authored
Update CI build status badge on the site page (#605)
Motivation: The central dogma site shows invalid build status. It causes by we didn't update the badge image source after we changed CI build system. Modifications: - removed old build status badge provided by Travis CI and Appveyor CI. - added CI status page provided by GitHub workflow.
1 parent bcab2db commit 43c4458

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

site/src/sphinx/_static/add_badges.js

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
// Append the project badges at the end of the menu (sidenav).
22
function addBadge(parent, src, href) {
3-
var obj = document.createElement('object');
4-
obj.data = src;
3+
4+
var obj;
5+
if(typeof src === 'string') {
6+
obj = document.createElement('object');
7+
obj.data = src;
8+
} else {
9+
obj = src
10+
}
511

612
if (typeof href === 'string') {
713
obj.style.pointerEvents = 'none';
@@ -26,10 +32,6 @@ function addBadges(parent) {
2632
addBadge(div, 'https://img.shields.io/github/stars/line/centraldogma.svg?style=social');
2733
addBadge(div, 'https://img.shields.io/badge/chat-on%20slack-brightgreen.svg?style=social',
2834
'https://join.slack.com/t/central-dogma/shared_invite/enQtNjA5NDk5MTExODQzLWFhOWU2NGZhNDk3MjBmNzczZDYyZjRmMTI1MzdiNGI3OTcwNWZlOTkyY2U3Nzk4YTM2NzQ2NGJhMjQ1NzJlNzQ');
29-
addBadge(div, 'https://img.shields.io/travis/line/centraldogma/master.svg?style=flat-square',
30-
'https://travis-ci.org/line/centraldogma');
31-
addBadge(div, 'https://img.shields.io/appveyor/ci/line/centraldogma/master.svg?label=appveyor&style=flat-square',
32-
'https://ci.appveyor.com/project/line/centraldogma/branch/master');
3335
addBadge(div, 'https://img.shields.io/maven-central/v/com.linecorp.centraldogma/centraldogma-common.svg?style=flat-square',
3436
'https://search.maven.org/search?q=g:com.linecorp.centraldogma');
3537
addBadge(div, 'https://img.shields.io/github/commit-activity/m/line/centraldogma.svg?style=flat-square',
@@ -38,6 +40,12 @@ function addBadges(parent) {
3840
'https://github.com/line/centraldogma/labels/good%20first%20issue');
3941
addBadge(div, 'https://img.shields.io/codecov/c/github/line/centraldogma/master.svg?style=flat-square',
4042
'https://codecov.io/gh/line/centraldogma');
43+
44+
var ciImg = new Image();
45+
ciImg.src = 'https://github.com/line/centraldogma/actions/workflows/gradle.yml/badge.svg';
46+
addBadge(div, ciImg,
47+
'https://github.com/line/centraldogma/actions/workflows/gradle.yml');
48+
4149
li.appendChild(div);
4250
parent.appendChild(li);
4351
}

site/src/sphinx/_static/overrides.css

-6
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ html, body, .wy-grid-for-nav {
7474
background: inherit;
7575
}
7676

77-
.wy-menu.wy-menu-vertical .project-badges img {
78-
display: inline;
79-
padding: 0;
80-
height: 1.45em;
81-
}
82-
8377
.wy-breadcrumbs-aside {
8478
margin-top: 0.225em;
8579
}

0 commit comments

Comments
 (0)