- calculateMetric
- issueresponsetime
- lastdiscussedbadge
- grabDates
- calculateAverage
- insertEntry
- updateEntry
- getReleases
- releasebadge
- classifyUserType
- classifyusers
- getAllPRs
- pullrequests
- window
- securitybadge
Calculates the issue response time metric by using a GraphQL call to get issues with comments at the same time instead of 2 separate calls with REST. Consider only issues whose first comment author != author of issue
owner
libName
req
Object Express request object
Returns Array 3 items, number of all issues, number of issues that have valid comments, and calculated metric
GET endpoint to get average number of days for first issue comment that is authored by someone not the issue creator
req
Object Express request object
localhost:3000/issueresponse?owner=axios&libname=axios
Returns number average number of days for issue response time
Finds the last date discussed on Stack Overflow by selecting tag asssociated with library with largest number of questions then grab the most recent question containing the tag of the library and extract date
req
object Express middleware request object
localhost:3000/lastdiscussed?libname=axios
Returns string latestdate of the last discussed on Stack Overflow
Grab the dates from every response objects for when a release is made
response
Array list of response API objects of releases
Returns Array list of date strings of every commit associated with a release
Calculates the average number of days between releases by getting the difference between each date string
dates
Array list of date strings
Returns number average number days between releases
Inserts into the database the library name, number of releases, average days, and status
data
Array list containing the library name, number of releases, average days, and status
Returns null
Updates the number of releases, average days, and status of the query in the database
data
Array list containing number of releases, average days, and status of query
Returns null
Gets the commit tags associated with releases and gets the detailed commit URL for each tag
owner
string owner name of the librarylibName
string library namenumberofreleases
numberofreleases total number of releases
localhost:3000/releasefreq?owner=axios&libname=axios
Returns number average number days between releases
Gets the average number of days between releases and updates/inserts corresponding info in database
req
object Express request object
Returns Array contains calculated average number and the status of the query whether if the average stayed neutral, increased, or decreased
Classify contributor user type by checking if total number commits user made is less than 10% of all commits
owner
string representing the owner of the repositorylibName
string representing the name of the repository/library
owner=google libName=gson
Returns object contributors -> key:users, value:number of commits made
GET request endpoint that creates a JSON object that contains users that are classified as contributors for the pull requests endpoint
req
object contains the request user made
localhost:3000/classifyusers?owner=axios&libname=axios
Returns object Github contributors of a repo
Grabs all PRs in repository and filters them based on those associated with a contributor user status and grabs various PR metrics for later calculation
owner
string representing the owner of the repositorylibName
string representing the name of the repository/librarycontributors
object with keys as contributor login names, and values as number of commits associated with userlastDate
date
string is undefined for contains the last cached date
owner=google libName=gson contributors={user1:12,user2:3} lastDate="1970-01-01T00:00:00Z"
Returns Array number of merged PRs, number of contributor PRs, and total number of all PRs, and the most recent date of last PR
GET request endpoint that calculates metric of contributor's merged PRs and stores it into database given a library and owner name
req
object contains the request user made
localhost:3000/pullrequests?owner=axios&libname=axios
Returns number percentage containing number of outside contributor's work that is merged into repo
!
Copyright 2013 LinkedIn Corp. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
GET request to grab the number of bugs detected by Spotbugs with FindSecBugs plugin from database
req
object Express middleware request object
Returns object contains the number of bugs found from Spotbugs and the status of the query