mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Merge pull request #767 from oceanprotocol/issue-766-build-issue
Issue-#766: Remove draft releases
This commit is contained in:
commit
59d5229644
@ -26,11 +26,12 @@ const queryGithub = graphql`
|
|||||||
totalCount
|
totalCount
|
||||||
}
|
}
|
||||||
releases(
|
releases(
|
||||||
first: 1
|
first: 2
|
||||||
orderBy: { field: CREATED_AT, direction: DESC }
|
orderBy: { field: CREATED_AT, direction: DESC }
|
||||||
) {
|
) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
|
isDraft
|
||||||
tag {
|
tag {
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
@ -80,12 +81,21 @@ const Repository = ({ name, links, readme }) => (
|
|||||||
})
|
})
|
||||||
.filter((n) => n)
|
.filter((n) => n)
|
||||||
|
|
||||||
const repo = repoFilteredArray[0]
|
var repo = repoFilteredArray[0]
|
||||||
|
|
||||||
// safeguard against more empty items,
|
// safeguard against more empty items,
|
||||||
// e.g. when private repos are referenced in repositories.yml
|
// e.g. when private repos are referenced in repositories.yml
|
||||||
if (repo === undefined) return null
|
if (repo === undefined) return null
|
||||||
|
const releasesFilteredArray = repo.releases.edges
|
||||||
|
.filter(({ node }) => {
|
||||||
|
return !node.isDraft
|
||||||
|
})
|
||||||
|
.splice(1)
|
||||||
|
|
||||||
|
repo = {
|
||||||
|
...repo,
|
||||||
|
releases: { edges: releasesFilteredArray }
|
||||||
|
}
|
||||||
const {
|
const {
|
||||||
url,
|
url,
|
||||||
description,
|
description,
|
||||||
@ -110,7 +120,6 @@ const Repository = ({ name, links, readme }) => (
|
|||||||
})
|
})
|
||||||
|
|
||||||
const moreLinks = links || linksFilteredArray.filter((n) => n)[0]
|
const moreLinks = links || linksFilteredArray.filter((n) => n)[0]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<article className={styles.repository}>
|
<article className={styles.repository}>
|
||||||
<Title
|
<Title
|
||||||
|
Loading…
Reference in New Issue
Block a user