-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update metrics fetcher to use a Typescript-based pipeline #90
Conversation
We're exploring using TypeScript and octokit for our backend instead of Go. This adds a basic typescript structure and command to fetch data. The basic idea is that we can now use pipeline functions to append data to our result. This should make it easier to compose data. If this continues to look promising, we can add a test to compare to the results of the Go backend to ensure we're getting the same data. Co-authored-by: Andrew Henry <ajhenry@github.com>
This uses fs-extra to generate a JSON file. In the future we'll be able to move the file location to generate into the UI app directory. Co-authored-by: Andrew Henry <ajhenry@github.com>
repo: repoName, | ||
state: state, | ||
// Need to limit this query somehow, otherwise it will take forever/timeout | ||
since: config.since, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually pretty nice because I think this means we'll be able to reuse this for some very basic time-based snapshots i.e. age 6 months ago, 3 months ago, today, something like that?
}; | ||
}; | ||
|
||
const calculateIssueResponseTime = async ( |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to merge this for now anyway, we will redo this later.
… data shape changes
The name is easier to read, so we'll use this for the UI/data instead of the spdxId. Co-authored-by: Andrew Henry <ajhenry@github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We 🍐'd on these fixes, going to address the remaining points as followup issues.
This PR replaces the old go-based data fetching backend with a typescript-based pipeline-inspired backend. The objective of this work is to make it easier to read and write fetching data from the github api and performing transformations on it.
This PR accomplishes the following:
data.json
file generated by the go backendThings that need to be fleshed out
Things we need to address
collaboratorsCount is missingprojectsCount is missingissuesCount is missing (total of all issues not including PR's)openIssues count includes PR'sopenPullRequestCount is incorrectmergedPullRequestsCount is missingcc: @ipc103
closes https://github.com/github/ospo/issues/1993