Skip to content

Commit

Permalink
Remove API version from footer (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbynek authored Dec 26, 2023
1 parent 79563c3 commit 86b939a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
7 changes: 1 addition & 6 deletions plugins/gatsby-source-jenkinsplugins/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const getPluginContent = async ({wiki, pluginName, reporter, createNode, createC
return createWikiNode('text/markdown', url, body);
}
}
const data = await requestGET({reporter, url: `https://plugins.jenkins.io/api/plugin/${pluginName}`});
const data = await requestGET({reporter, url: `${API_URL}/plugin/${pluginName}`});

const $ = load(data.wiki.content);
$('a.anchor[href^="#"]').remove();
Expand Down Expand Up @@ -415,13 +415,8 @@ export const fetchLabelData = async ({createNode, reporter}) => {
export const fetchSiteInfo = async ({createNode, reporter}) => {
const sectionActivity = reporter.activityTimer('fetch plugin api info');
sectionActivity.start();
const url = `${API_URL}/info`;
const info = await requestGET({url, reporter});

createNode({
api: {
...info
},
website: {
commit: execSync('git rev-parse HEAD').toString().trim(),
version: findPackageJson().next().value.version,
Expand Down
3 changes: 0 additions & 3 deletions plugins/plugin-site/__mocks__/gatsby.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ module.exports = {
useStaticQuery: jest.fn().mockImplementation(() => {
return {
jenkinsPluginSiteInfo: {
api: {
commit: 'FAKECommit'
},
website: {
commit: 'FAKECommit'
}
Expand Down
6 changes: 0 additions & 6 deletions plugins/plugin-site/src/components/SiteVersion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,20 @@ function SiteVersion() {
buildTime
}
jenkinsPluginSiteInfo {
api {
commit
}
website {
commit
}
}
}
`);
if (!data) { return null; }
const pluginSiteApiVersion = data.jenkinsPluginSiteInfo.api.commit;
const pluginSiteVersion = data.jenkinsPluginSiteInfo.website.commit;
const buildTime = data.site.buildTime;

return (
<p>
{'UI '}
<a href={`https://github.com/jenkins-infra/plugin-site/commit/${pluginSiteVersion}`}>{pluginSiteVersion.substr(0, 7)}</a>
{' / API '}
<a href={`https://github.com/jenkins-infra/plugin-site-api/commit/${pluginSiteApiVersion}`}>{pluginSiteApiVersion.substr(0, 7)}</a>
<br />
<small>
Last Built:
Expand Down

0 comments on commit 86b939a

Please sign in to comment.