Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Leadtimeforchange #1

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0014fea
Initial commit
ITM007 Apr 5, 2022
4bd5170
feat(multiple files): first Commit
ITM007 Apr 5, 2022
d1bf8d9
build(dockerfile): added build to docker file
ITM007 Apr 5, 2022
5f69760
refactor(multiple files): restructed files
ITM007 Apr 5, 2022
f170dcb
Create azure-container-webapp.yml
ITM007 Apr 6, 2022
904b8d2
Update azure-container-webapp.yml
ITM007 Apr 6, 2022
0cb525a
fix(multiple files): fixed endpoints
ITM007 Apr 6, 2022
2b1d3bd
Merge branch 'main' of github.com:rrglobal/DORA
ITM007 Apr 6, 2022
29e9b3d
feat(index.ts): added auth to query enpoint
ITM007 Apr 15, 2022
473cd1d
fix(utils.ts): changed calculations from last 30 days to last 90 days
ITM007 Apr 15, 2022
7ad7baf
Update and rename azure-container-webapp.yml to production.yml
ITM007 Apr 22, 2022
1e89845
style(multiple files): added Rome Formatter
ITM007 Apr 22, 2022
f891366
Merge branch 'main' of github.com:rrglobal/DORA
ITM007 Apr 22, 2022
06b60f6
Update production.yml
ITM007 Apr 22, 2022
25a7b0a
feat(multiple files): added lead time for change endpoint
ITM007 May 3, 2022
a69fe55
Merge branch 'main' of github.com:rrglobal/DORA
ITM007 May 3, 2022
9e05840
refactor(multiple files): moved to Graphql
ITM007 May 19, 2022
dc13027
Update production.yml
ITM007 May 19, 2022
baa1cee
Update production.yml
ITM007 May 19, 2022
f9d831a
fix(multiple files): docker port fix
ITM007 May 20, 2022
b4a3716
Merge branch 'main' of github.com:rrglobal/DORA
ITM007 May 20, 2022
f64286e
fix(multiple files): changed owner to org
ITM007 May 20, 2022
7029f07
fix(utils.ts): rename variable to ninetyDaysAgo to avoid confusion
TylerB890 May 23, 2022
20c769e
refactor(query update): fixed query to use normal variables
jdhaines May 24, 2022
d11bb88
Update index.ts
ITM007 May 24, 2022
5f1f236
fix(resolvers.ts): fixed leadtime resolver
ITM007 May 25, 2022
0043c53
fix(package.json): fixed apollo-server version
ITM007 May 25, 2022
f3b18ee
fix(utils.ts): fix leadtime value
ITM007 May 25, 2022
4c4dfac
Merge pull request #5 from rrglobal/fixVarNaming
ITM007 May 26, 2022
654c8f8
docs(readme.md): added DORA info
ITM007 Jun 14, 2022
d9e20d0
feat(utils.ts): added query for risk issues to utils.ts
bchavis128 Jun 27, 2022
facea4b
chore: commit to get up to date
bchavis128 Jul 14, 2022
389b231
chore: test
bchavis128 Jul 14, 2022
70405a5
chore: test
bchavis128 Jul 15, 2022
4faa271
refactor: time to restore added
bchavis128 Jul 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
This document outlines security procedures and general policies for the `DORA`
project.

* [Public Software Policy](#public-software-policy)
* [Reporting a Bug](#reporting-a-bug)
- [Security Policies and Procedures](#security-policies-and-procedures)
- [Public Software Policy](#public-software-policy)
- [Reporting a Bug](#reporting-a-bug)

## Public Software Policy

The `DORA` project is intended to be public facing. It is being used in a openly-visible-metrics capacity and will play a small part in the Rolls-Royce Digital Transformation efforts. If you have any questions, please contact the lead maintainer at [[email protected]](mailto:[email protected]).
The `DORA` project is intended to be public facing. It is being used in a openly-visible-metrics capacity and will play a small part in the Rolls-Royce Digital Transformation efforts. If you have any questions, please contact the lead maintainer at [[email protected]](mailto:[email protected]).

## Reporting a Bug

Expand Down
29 changes: 29 additions & 0 deletions src/app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export const leadTimeFunction = async (owner: string, repo: string) => {
counter++;
}

console.log("success");

const leadTimeTotal = leadTimeArray.reduce(
(previousValue, currentValue) => previousValue + currentValue,
0
Expand All @@ -132,3 +134,30 @@ export const leadTimeFunction = async (owner: string, repo: string) => {
}
return { leadTimeValue: leadTimeForChange, leadTime: leadTime };
};

export const timeToRestore = async (owner: string, repo: string) => {
//Query Risk Issues
const queryRiskIssues = gql`
query ($owner: String!, $repo: String!) {
repository(owner: $owner, name: $repo) {
risk: issues(labels: "risk", first: 100) {
edges {
node {
title
createdAt
closedAt
}
}
}
}
}
`;
let variables = { owner: owner, repo: repo };
const data = await graphQLClient.request({
document: queryRiskIssues,
variables: variables,
});
console.log(data.repository.risk.edges[0].node);
};

timeToRestore("rropen", "MEC");