-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from bcgov/test-pr
Test pr
- Loading branch information
Showing
48 changed files
with
12,780 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ on: | |
required: true | ||
type: choice | ||
options: | ||
- dev | ||
- test | ||
- prod | ||
tagname: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ZENHUB_APIKEY | ||
ENTITIES | ||
NAMETEAMSPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// apollo.config.js | ||
module.exports = { | ||
client: { | ||
service: { | ||
name: 'release-notes', | ||
// URL to the GraphQL API | ||
url: 'https://api.zenhub.com/public/graphql' | ||
}, | ||
// Files processed by the extension | ||
includes: ['src/**/*.vue', 'src/**/*.ts'] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<div> | ||
<NuxtWelcome /> | ||
<NuxtPage /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@font-face { | ||
font-family: 'BCSans'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url('../fonts/BCSans-Regular_2f.woff2') format('woff2'), | ||
/* Optimized for very modern browsers */ | ||
url('../fonts/BCSans-Regular_2f.woff') format('woff'), | ||
local('BCSans'); | ||
/* Modern Browsers */ | ||
font-display: swap; | ||
} | ||
|
||
@font-face { | ||
font-family: 'BCSans'; | ||
font-style: italic; | ||
src: url('../fonts/BCSans-Italic_2f.woff2') format('woff2'), | ||
/* Optimized for very modern browsers */ | ||
url('../fonts/BCSans-Italic_2f.woff') format('woff'), | ||
local('BCSans'); | ||
/* Modern Browsers */ | ||
font-display: swap; | ||
} | ||
|
||
@font-face { | ||
font-family: 'BCSans'; | ||
font-weight: 700; | ||
src: url('../fonts/BCSans-Bold_2f.woff2') format('woff2'), | ||
/* Optimized for very modern browsers */ | ||
url('../fonts/BCSans-Bold_2f.woff') format('woff'), | ||
local('BCSans'); | ||
/* Modern Browsers */ | ||
font-display: swap; | ||
} | ||
|
||
@font-face { | ||
font-family: 'BCSans'; | ||
font-style: italic; | ||
font-weight: 700; | ||
src: url('../fonts/BCSans-BoldItalic_2f.woff2') format('woff2'), | ||
/* Optimized for very modern browsers */ | ||
url('../fonts/BCSans-BoldItalic_2f.woff') format('woff'), | ||
local('BCSans'); | ||
/* Modern Browsers */ | ||
font-display: swap; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,8 @@ | |
|
||
.btn { | ||
@apply p-4; | ||
} | ||
|
||
html { | ||
font-family: "BCSans"; | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<button type="button" className="buttonClasses"> | ||
{{ text }} | ||
</button> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, PropType } from 'vue'; | ||
export default defineComponent({ | ||
props: { | ||
text: { | ||
type: String, | ||
required: true, | ||
}, | ||
}, | ||
}); | ||
</script> | ||
|
||
<style> | ||
.buttonClasses { | ||
width: 88px ; | ||
height: 34px; | ||
border-radius: 4px; | ||
background-color: #1669bb; | ||
background-size: cover; | ||
font-size: 14px; | ||
color: #ffffff; | ||
text-decoration: none solid rgb(255, 255, 255); | ||
text-align: center; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<NuxtLink to="https://www.bcregistry.gov.bc.ca/"> | ||
<div class="rec"> | ||
<img src="../assets/images/gov_bc_logo_horiz.b6e98a7.png" alt="Logo"> | ||
<h2>BC Registries and Online Services</h2> | ||
</div> | ||
</NuxtLink > | ||
</template> | ||
|
||
<style> | ||
.rec { | ||
height: 53px; | ||
color: white; | ||
background-color: #003366; | ||
display: flex ; | ||
} | ||
.rec > img { | ||
margin-left: 2.5%; | ||
resize: both; | ||
} | ||
.rec > h2 { | ||
flex-direction: column; | ||
margin-left: 20px; | ||
align-self: center; | ||
} | ||
</style> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { ApolloClient, InMemoryCache } from '@apollo/client/core' | ||
|
||
export function getClient () { | ||
// Get the API key from environment variables | ||
const config = useRuntimeConfig() | ||
const apiKey = config.public.zenhubAPI | ||
if (!apiKey) { | ||
console.error('API key is missing in the environment variables.') | ||
process.exit(1) // Exit the application if the API key is missing | ||
} | ||
|
||
const client = new ApolloClient({ | ||
uri: 'https://api.zenhub.com/public/graphql', | ||
cache: new InMemoryCache(), | ||
headers: { | ||
authorization: `Bearer ${apiKey}` | ||
} | ||
}) | ||
return client | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { gql } from '@apollo/client/core' | ||
import { getClient } from './getClient' | ||
|
||
export async function getReleases ( | ||
workspaceID: string | ||
) { | ||
const client = getClient() | ||
try { | ||
const result = await client.query({ | ||
query: gql` | ||
query Workspace($workspaceID: ID!) { | ||
workspace(id: $workspaceID) { | ||
releases (last: 100){ | ||
totalCount | ||
nodes { | ||
closedAt | ||
issues { | ||
totalCount | ||
} | ||
} | ||
} | ||
} | ||
} | ||
`, | ||
variables: { | ||
workspaceID | ||
} | ||
}) | ||
// console.log(result.data.workspace.sprints) | ||
return result.data.workspace.releases | ||
} catch (error) { | ||
console.log(error) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { gql } from '@apollo/client/core' | ||
import { getClient } from './getClient' | ||
|
||
export async function getSprint ( | ||
workspaceID: string | ||
) { | ||
const client = getClient() | ||
try { | ||
const result = await client.query({ | ||
query: gql` | ||
query Workspace($workspaceID: ID!) { | ||
workspace(id: $workspaceID) { | ||
activeSprint { | ||
closedIssuesCount | ||
completedPoints | ||
createdAt | ||
description | ||
endAt | ||
id | ||
name | ||
startAt | ||
state | ||
totalPoints | ||
updatedAt | ||
} | ||
} | ||
} | ||
`, | ||
variables: { | ||
workspaceID | ||
} | ||
}) | ||
// console.log(result.data.workspace.sprints) | ||
return result.data.workspace.activeSprint | ||
} catch (error) { | ||
console.log(error) | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Sprint } from '~/interface/interfaces' | ||
|
||
export function castingSprint (sprint: any, noReleases: any) { | ||
const res: Sprint = { | ||
closedIssuesCount: sprint.closedIssuesCount, | ||
completedPoints: sprint.completedPoints, | ||
createdAt: sprint.createdAt, | ||
description: sprint.description, | ||
endAt: sprint.endAt, | ||
id: sprint.id, | ||
name: sprint.name, | ||
startAt: sprint.startAt, | ||
state: sprint.state, | ||
totalPoints: sprint.totalPoints, | ||
updatedAt: sprint.updatedAt, | ||
numberOfRelease: noReleases | ||
} | ||
return res | ||
} | ||
|
||
export function castingReleases (releases: any) { | ||
const res = [] | ||
for (let i = 0; i < releases.length; i++) { | ||
const release = releases[i] | ||
res.push({ | ||
closeAt: release.closeAt, | ||
issues: release.issues.totalCount | ||
}) | ||
} | ||
return res | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function filterReleases (releases: any, startAt: any, endAt: any) { | ||
const releasesWithinDateRange = | ||
releases.nodes.filter((release: any) => { | ||
const closedAt = new Date(release.closedAt) | ||
const startDate = new Date(startAt) | ||
const endDate = new Date(endAt) | ||
|
||
return closedAt >= startDate && closedAt <= endDate | ||
}) | ||
return releasesWithinDateRange | ||
} | ||
|
||
export default filterReleases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import filterReleases from './filterRelease' | ||
import { castingReleases, castingSprint } from './castingResponse' | ||
import { Response } from '~/interface/interfaces' | ||
import { getSprint } from '~/composables/getSprint' | ||
import { getReleases } from '~/composables/getReleases' | ||
|
||
export default async function getData (boardID: any) { | ||
const sprint = await getSprint(boardID) | ||
// console.log(sprint) | ||
const releases = await getReleases(boardID) | ||
// console.log(releases) | ||
const releasesInRange = filterReleases( | ||
releases, | ||
sprint.startAt, | ||
sprint.endAt | ||
) | ||
// console.log(releasesInRange) | ||
const castedSprint = castingSprint(sprint, releasesInRange.length) | ||
// console.log(castedSprint) | ||
const castedReleases = castingReleases(releasesInRange) | ||
const res: Response = { | ||
sprint: castedSprint, | ||
releases: castedReleases | ||
} | ||
return res | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export interface Release { | ||
closeAt: string | ||
issues: number | ||
} | ||
|
||
export interface Sprint { | ||
closedIssuesCount: number | ||
completedPoints: number | ||
createdAt: string | ||
description: string | ||
endAt: string | ||
id: string | ||
name: string | ||
startAt: string | ||
state: string | ||
totalPoints: number | ||
updatedAt: string | ||
numberOfRelease: number | ||
} | ||
|
||
export interface Response { | ||
sprint: Sprint | ||
releases: Release[] | ||
} |
Empty file.
Oops, something went wrong.