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
|
||||
}
|
||||
releases(
|
||||
first: 1
|
||||
first: 2
|
||||
orderBy: { field: CREATED_AT, direction: DESC }
|
||||
) {
|
||||
edges {
|
||||
node {
|
||||
isDraft
|
||||
tag {
|
||||
name
|
||||
}
|
||||
@ -80,12 +81,21 @@ const Repository = ({ name, links, readme }) => (
|
||||
})
|
||||
.filter((n) => n)
|
||||
|
||||
const repo = repoFilteredArray[0]
|
||||
var repo = repoFilteredArray[0]
|
||||
|
||||
// safeguard against more empty items,
|
||||
// e.g. when private repos are referenced in repositories.yml
|
||||
if (repo === undefined) return null
|
||||
const releasesFilteredArray = repo.releases.edges
|
||||
.filter(({ node }) => {
|
||||
return !node.isDraft
|
||||
})
|
||||
.splice(1)
|
||||
|
||||
repo = {
|
||||
...repo,
|
||||
releases: { edges: releasesFilteredArray }
|
||||
}
|
||||
const {
|
||||
url,
|
||||
description,
|
||||
@ -110,7 +120,6 @@ const Repository = ({ name, links, readme }) => (
|
||||
})
|
||||
|
||||
const moreLinks = links || linksFilteredArray.filter((n) => n)[0]
|
||||
|
||||
return (
|
||||
<article className={styles.repository}>
|
||||
<Title
|
||||
|
Loading…
Reference in New Issue
Block a user