Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Commit 612be84

Browse files
author
Joel Worrall
committed
fix: make use of defaultBranch and contributingGuideUrl
1 parent 47326ad commit 612be84

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/fragments/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const projectFields = graphql`
5353
}
5454
githubUrl
5555
defaultBranch
56+
contributingGuideUrl
5657
iconUrl
5758
description
5859
ossCategory {

src/templates/project-page.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const ProjectPage = props => {
6161
};
6262

6363
const project = get(data, 'project.nodes[0]', false);
64+
console.debug(project);
6465
const contentEditLink = get(data, 'sitePage.nodes[0].fields.contentEditLink');
6566

6667
if (!project) {
@@ -319,7 +320,7 @@ const ProjectPage = props => {
319320
<p>
320321
Code contributions are welcome. Please review our{' '}
321322
<a
322-
href={`${project.githubUrl}/blob/${project.defaultBranch||'master'}/CONTRIBUTING.md`}
323+
href={project.contributingGuideUrl || `${project.githubUrl}/blob/${project.defaultBranch||'master'}/CONTRIBUTING.md`}
323324
target="__blank"
324325
rel="noopener noreferrer"
325326
>

0 commit comments

Comments
 (0)