openapi: 3.0.3
info:
contact:
email: admin@athenian.co
name: the administrator by email
description: |-
Server version: {{ server_version }} built on {{ build_date }} @ [{{ commit }}](https://github.com/athenianco/athenian-api/commit/{{ commit }})
Origin GitHub repository: [athenianco/api-spec](https://github.com/athenianco/api-spec).
Authorization persists between sessions. Marks:
* 🛡️ endpoint requires account admin privileges.
* 👤 endpoint only works with JWT authentication.
List of common server errors.
* __500__ endpoint crashed. We reported the incident to Sentry and will fix it soon! Please include the value of `instance` in the response if you contact the support. Repeating the request will not help, most probably.
* __501__ some functions are missing, either because they are not implemented yet or a non-critical runtime dependency is not satisfied. Repeating the request will not help, guaranteed.
* __502__ server crashed badly, either due to a memory access violation in native code or running out of memory. We reported this incident to Sentry and will fix it soon! Try repeating the request.
* __503__ server has not fully launched yet, e.g. hasn't connected to the database; server is shutting down; we are experiencing a partial outage. Try repeating the request.
* __504__ endpoint took too much time and was interrupted. We reported the incident to Sentry and will see how to improve the performance. Repeating the request will not help, most probably.
license:
name: CC-BY-4.0
title: '{{ title }}'
version: 2.1.86
servers:
- description: '{{ server_description }} - {{ server_url }}'
url: '{{ server_url }}/v1'
# yamllint disable-line rule:key-ordering
paths:
/account/user:
put:
operationId: change_user
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountUserChangeRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
description: Effective account members.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Requesting user is not an admin of the account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The account was not found.
security:
- bearerAuth: []
summary: '🛡️👤 Change the status of an account member: regular, admin, or banished
(deleted). This endpoint is allowed only for account admins.'
tags:
- user
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.user_controller
/account/{id}/details:
get:
operationId: get_account_details
parameters:
- description: Numeric identifier of the account. The user must belong to that
account. To find out which accounts the user belongs to, see `/user`.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
description: List of the account members and installed GitHub and JIRA organizations.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not have access to this account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The account was not found.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List the calling user's account members and installed GitHub and JIRA
organizations.
tags:
- user
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.user_controller
/account/{id}/features:
get:
operationId: get_account_features
parameters:
- description: Numeric identifier of the account. The user must belong to that
account. To find out which accounts the user belongs to, see `/user`.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/ProductFeatures'
description: List of the enabled product features for the account.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not have access to this account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The account was not found.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List the product features enabled for the account.
tags:
- user
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.user_controller
/diff/releases:
post:
operationId: diff_releases
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DiffReleasesRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/DiffedReleases'
description: Releases between the two specified borders, excluding the first
one and including the second one. Triaged by repository.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Find releases between the two given ones per repository.
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.filter_controller
/events/clear_cache:
post:
operationId: clear_precomputed_events
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteEventsCacheRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
enum:
- {}
type: object
description: Empty response indicates a successful operation.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Reset the precomputed data related to the pushed events.
tags:
- events
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.events_controller
/events/deployments:
post:
operationId: notify_deployments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NotifyDeploymentsRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
properties:
deployments:
$ref: '#/components/schemas/NotifiedDeployments'
required:
- deployments
type: object
description: Details about the accepted deployment notifications.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- apiKeyAuth: []
summary: Notify about new deployments.
tags:
- events
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.events_controller
/events/deployment/{name}/labels:
parameters:
- description: Name of the deployment.
in: path
name: name
required: true
schema:
type: string
style: simple
get:
operationId: get_deployment_labels
responses:
200:
$ref: '#/components/responses/DeploymentLabelsResponse'
404:
$ref: '#/components/responses/DeploymentNotFoundResponse'
security:
- apiKeyAuth: []
tags:
- events
# {% if False %}
- default
# {% endif %}
summary: Retrieve the labels associated with the deployment.
x-openapi-router-controller: athenian.api.controllers.events_controller
patch:
operationId: modify_deployment_labels
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeploymentModifyLabelsRequest'
x-body-name: body
responses:
200:
$ref: '#/components/responses/DeploymentLabelsResponse'
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
404:
$ref: '#/components/responses/DeploymentNotFoundResponse'
security:
- apiKeyAuth: []
summary: |
Modify the labels for the deployment applying the given instructions.
tags:
- events
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.events_controller
/events/releases:
post:
operationId: notify_releases
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NotifyReleasesRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/NotifyReleasesResponse'
description: Summary of the accepted and the rejected releases.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- apiKeyAuth: []
summary: Notify about new releases. The release settings must be set to "event".
tags:
- events
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.events_controller
/filter/code_checks:
post:
operationId: filter_code_checks
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FilterCodeChecksRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/FilteredCodeCheckRuns'
description: Code check runs that satisfy the specified filters.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Find code check runs that match the specified query. [What a code check
run is exactly.](https://docs.github.com/en/rest/guides/getting-started-with-the-checks-api#about-check-runs)
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.filter_controller
/filter/commits:
post:
operationId: filter_commits
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FilterCommitsRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CommitsList'
description: Commits that satisfy the specified filters grouped by date.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Find commits that match the specified query.
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.filter_controller
/filter/contributors:
post:
operationId: filter_contributors
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FilterContributorsRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/DeveloperSummaries'
description: Repositories that were updated within the given timeframe.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Find developers that made an action within the given timeframe.
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.filter_controller
/filter/deployments:
post:
operationId: filter_deployments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FilterDeploymentsRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/FilteredDeployments'
description: Deployments that satisfy the specified filters.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List the deployments that satisfy the provided filters. We accept new
deployment notifications at `/events/deployments`.
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.filter_controller
/filter/environments:
post:
operationId: filter_environments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FilterEnvironmentsRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/FilteredEnvironments'
description: Deployment environments that satisfy the specified filters.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account hasn't submitted any deployment notifications.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List the deployment environments.
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.filter_controller
/filter/jira:
post:
operationId: filter_jira_stuff
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FilterJIRAStuff'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/FilteredJIRAStuff'
description: List of found JIRA entities, ordered by the last usage time.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is not an account member.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The account was not found.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Find various JIRA entities relevant to the specified date interval.
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.jira_controller
/filter/labels:
post:
operationId: filter_labels
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FilterLabelsRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/FilteredLabels'
description: List of labels.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Find labels used in the given repositories.
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.filter_controller
/filter/pull_requests:
post:
operationId: filter_prs
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FilterPullRequestsRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/PullRequestSet'
description: List of pull requests satisfying the specified filters.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List pull requests that satisfy the query.
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.filter_controller
/filter/releases:
post:
operationId: filter_releases
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FilterReleasesRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/ReleaseSet'
description: Repositories that were updated within the given timeframe.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Find releases that were published in the given time fram in the given
repositories.
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.filter_controller
/filter/repositories:
post:
operationId: filter_repositories
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FilterRepositoriesRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/RepositorySet'
description: Repositories that were updated within the given timeframe.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Find repositories that were updated within the given timeframe.
tags:
- filter
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.filter_controller
/get/contributors/{id}:
get:
operationId: get_contributors
parameters:
- $ref: '#/components/parameters/pathAccountID'
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/Contributors'
description: List of all contributors belonging to the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List all the contributors belonging to the specified account.
tags:
- get
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.contributors_controller
/get/export:
get:
operationId: get_everything
parameters:
- description: Numeric identifier of the account. Raises HTTP 400 if the user
belongs to more than one account.
explode: false
in: query
name: account
required: false
schema:
type: integer
style: form
- description: Output file format. The default is `parquet`.
explode: false
in: query
name: format
required: false
schema:
enum:
- parquet
type: string
style: form
responses:
200:
content:
application/zip:
schema:
format: binary
type: string
description: Uncompressed ZIP archive with binary files in the configured
format.
400:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: Invalid query parameter values.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Download all the data collected by Athenian for custom analysis.
tags:
- integrations
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.integrations_controller
/get/jira_issues:
post:
operationId: get_jira_issues
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GetJIRAIssuesRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/GetJIRAIssuesResponse'
description: List of Jira issues, in the requested order.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Retrieve Jira issues by key.
tags:
- get
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.jira_controller
/get/pull_requests:
post:
operationId: get_prs
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GetPullRequestsRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/PullRequestSet'
description: List of pull requests, in the requested order.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified pull requests.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List pull requests by repository and number.
tags:
- get
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.filter_controller
/get/releases:
post:
operationId: get_releases
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GetReleasesRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/ReleaseSet'
description: List of releases satisfying the specified filters.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified pull requests.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List releases by repository and name.
tags:
- get
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.filter_controller
/goal_template/create:
post:
operationId: create_goal_template
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GoalTemplateCreateRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CreatedIdentifier'
description: Identifier of the created goal template.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
security:
- bearerAuth: []
summary: 👤 Create a goal template.
tags:
- align
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.goal_controller
/goal_template/{id}:
delete:
operationId: delete_goal_template
responses:
200:
content:
application/json:
schema:
enum:
- {}
type: object
description: Empty object indicates a successful removal.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The goal template was not found.
security:
- bearerAuth: []
summary: 👤 Delete a goal template.
tags:
- align
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.goal_controller
get:
operationId: get_goal_template
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/GoalTemplate'
description: The retrieved goal template.
404:
$ref: '#/components/responses/GoalTemplateNotFoundResponse'
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Retrieve a goal template.
tags:
- align
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.goal_controller
parameters:
- description: Numeric identifier of the goal template.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
put:
operationId: update_goal_template
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GoalTemplateUpdateRequest'
x-body-name: body
responses:
200:
$ref: '#/components/responses/EmptySuccessfulResponse'
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
404:
$ref: '#/components/responses/GoalTemplateNotFoundResponse'
security:
- bearerAuth: []
summary: 👤 Update a goal template.
tags:
- align
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.goal_controller
/goal_templates/{id}:
get:
operationId: list_goal_templates
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/GoalTemplateList'
description: List of the goal templates for the account.
404:
$ref: '#/components/responses/GoalTemplateNotFoundResponse'
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List the goal templates for the account.
tags:
- align
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.goal_controller
parameters:
- $ref: '#/components/parameters/pathAccountID'
- description: Include templates for TLOs goals, i.e. goals based on parameterized metrics.
in: query
name: include_tlo
required: false
schema:
default: false
type: boolean
/histograms/code_checks:
post:
operationId: calc_histogram_code_checks
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CodeCheckHistogramsRequest'
description: Select the check runs of interest and the metrics to calculate.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatedCodeCheckHistograms'
description: Calculated histograms.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to access the specified repositories
on behalf of the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Calculate histograms on continuous integration runs, such as GitHub
Actions, Jenkins, Circle, etc.
tags:
- histograms
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.histograms_controller
/histograms/jira:
post:
operationId: calc_histogram_jira
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JIRAHistogramsRequest'
description: Query for selecting JIRA issues and binned activities.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatedJIRAHistograms'
description: Calculated histograms.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to access the specified repositories
on behalf of the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Calculate histograms over JIRA issue activities.
tags:
- histograms
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.jira_controller
/histograms/pull_requests:
post:
operationId: calc_histogram_prs
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PullRequestHistogramsRequest'
description: Desired histogram definitions.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatedPullRequestHistograms'
description: Calculated histograms.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to calculate metrics on behalf of the
specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: No data is available to calculate histograms for the given
repositories.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Calculate histograms over PR distributions.
tags:
- histograms
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.histograms_controller
/invite/accept:
put:
operationId: accept_invitation
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AcceptedInvitation'
description: Accepted invitation details.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/InvitedUser'
description: Details about the new user.
400:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: Something is wrong with the invitation URL.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Invitation is disabled or user is not a member of the GitHub
organization.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Invitation was not found.
409:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Concurrent requests.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: Account's installation has not finished yet.
security:
- bearerAuth: []
summary: 👤 Accept the account membership invitation and finish registration. The
user must be already authorized in Auth0.
tags:
- registration
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.invitation_controller
/invite/check:
post:
operationId: check_invitation
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvitationLink'
description: Checked invitation details.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/InvitationCheckResult'
description: 'Result of checking an invitation URL: invitation type, whether
it is correctly formed and is enabled.'
summary: Given an invitation URL, get its type (admin or regular account member)
and find whether it is correctly formed and is enabled or disabled.
tags:
- registration
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.invitation_controller
/invite/generate/{id}:
get:
operationId: gen_user_invitation
parameters:
- description: Numeric identifier of the account where to invite new users.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/InvitationLink'
description: The invitation link has been generated successfully.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to invite for this account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The account was not found.
security:
- bearerAuth: []
summary: |
👤 Create an account invitation link for regular users. The caller must
be an admin of the specified account. The link is persistent, so multiple
calls return the same result.
tags:
- registration
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.invitation_controller
/invite/jira/{id}:
get:
operationId: gen_jira_link
parameters:
- description: Numeric identifier of the account who is installing JIRA integration.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/InvitationLink'
description: The invitation link has been generated successfully.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to invite for this account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The account was not found.
security:
- bearerAuth: []
summary: 👤 Generate a JIRA integration installation link. The caller must be an
admin of the specified account.
tags:
- registration
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.invitation_controller
/invite/jira_progress/{id}:
get:
operationId: eval_jira_progress
parameters:
- description: Numeric identifier of the account that is installing JIRA.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/InstallationProgress'
description: Status of fetching JIRA data to Athenian.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The account does not exist or the user is not its member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The installation has not started yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Return the current JIRA installation progress in Athenian.
tags:
- registration
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.invitation_controller
/invite/progress/{id}:
get:
operationId: eval_metadata_progress
parameters:
- description: Numeric identifier of the account that is installing GitHub.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/InstallationProgress'
description: Status of fetching GitHub data to Athenian.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The account does not exist or the user is not its member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The installation has not started yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Return the current GitHub installation progress in Athenian.
tags:
- registration
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.invitation_controller
/match/identities:
post:
operationId: match_identities
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MatchIdentitiesRequest'
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/MatchedIdentities'
description: Computed identities mapping.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Match provided people names/logins/emails to the account's GitHub organization
members.
tags:
- integrations
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.integrations_controller
/metrics/code_bypassing_prs:
post:
operationId: calc_code_bypassing_prs
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CodeFilter'
description: Query for measuring the amount of code that was pushed outside
of pull requests.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/MeasuredCodeBypassingPRs'
description: Calculated metrics.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to access the specified repositories
on behalf of the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Measure the amount of code that was pushed outside of pull requests.
tags:
- metrics
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.metrics_controller
/metrics/code_checks:
post:
operationId: calc_metrics_code_checks
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CodeCheckMetricsRequest'
description: Select the check runs of interest and the metrics to calculate.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatedCodeCheckMetrics'
description: Calculated metrics.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to access the specified repositories
on behalf of the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Calculate metrics on continuous integration runs, such as GitHub Actions,
Jenkins, Circle, etc.
tags:
- metrics
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.metrics_controller
/metrics/deployments:
post:
operationId: calc_metrics_deployments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeploymentMetricsRequest'
description: Select the deployments of interest and the metrics to calculate.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatedDeploymentMetrics'
description: Calculated metrics.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to access the specified repositories
on behalf of the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Calculate metrics on deployments submitted by `/events/deployments`.
tags:
- metrics
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.metrics_controller
/metrics/developers:
post:
operationId: calc_metrics_developers
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeveloperMetricsRequest'
description: Query for selecting developers and measured activities.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatedDeveloperMetrics'
description: Calculated metrics.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to access the specified repositories
on behalf of the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Calculate metrics over developer activities.
tags:
- metrics
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.metrics_controller
/metrics/jira:
post:
operationId: calc_metrics_jira_linear
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JIRAMetricsRequest'
description: Query for selecting JIRA issues and measured activities.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatedJIRAMetrics'
description: Calculated metrics.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to access the specified repositories
on behalf of the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Calculate metrics over JIRA issue activities.
tags:
- metrics
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.jira_controller
/metrics/pull_requests:
post:
operationId: calc_metrics_prs
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PullRequestMetricsRequest'
description: Desired metric definitions.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatedPullRequestMetrics'
description: Calculated metrics.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to calculate metrics on behalf of the
specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: No data is available to calculate metrics for the given repositories.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Calculate linear metrics over PRs.
tags:
- metrics
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.metrics_controller
/metrics/releases:
post:
operationId: calc_metrics_releases
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ReleaseMetricsRequest'
description: Desired metric definitions.
required: true
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatedReleaseMetrics'
description: Calculated metrics.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to calculate metrics on behalf of the
specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: No data is available to calculate metrics for the given repositories.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Calculate linear metrics over releases.
tags:
- metrics
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.metrics_controller
/paginate/pull_requests:
post:
operationId: paginate_prs
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatePullRequestsRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/PullRequestPaginationPlan'
description: Identifier of the created repository set.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Calling user is not allowed to access the specified repositories.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified account does not exist or the user is not a member.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The account's installation has not finished yet.
424:
content:
application/json:
schema:
$ref: '#/components/schemas/MissingSettingsError'
description: One or more logical repositories miss the release settings.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Compute the balanced pagination plan for `/filter/pull_requests`.
tags:
- pagination
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.pagination_controller
/reposet/create:
post:
operationId: create_reposet
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RepositorySetCreateRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CreatedIdentifier'
description: Identifier of the created repository set.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to create a repository set from the specified
items.
409:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: There is an existing reposet with the same contents.
security:
- bearerAuth: []
summary: 🛡️👤 Create a repository set.
tags:
- reposet
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.reposet_controller
/reposet/{id}:
delete:
operationId: delete_reposet
parameters:
- description: Numeric identifier of the repository set to delete.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
type: object
description: Empty object indicates a successful removal.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to delete the specified repository set.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified repository set was not found.
security:
- bearerAuth: []
summary: 🛡️👤 Delete a repository set. The user must be an admin of the account that
owns the reposet.
tags:
- reposet
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.reposet_controller
get:
operationId: get_reposet
parameters:
- description: Numeric identifier of the repository set to list.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/RepositorySetWithName'
description: List of repositories in the specified set.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to list the specified repository set.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified repository set was not found.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List a repository set. The user must be in the account that owns the
reposet.
tags:
- reposet
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.reposet_controller
put:
operationId: update_reposet
parameters:
- description: Numeric identifier of the repository set to update.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RepositorySetWithName'
x-body-name: body
responses:
200:
content:
application/json:
schema:
type: object
description: Empty object indicates a successful update.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to update the specified repository set.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified repository set was not found.
409:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: There is an existing reposet with the same contents.
security:
- bearerAuth: []
summary: 🛡️👤 Update a repository set. The user must be an admin of the account that
owns the reposet.
tags:
- reposet
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.reposet_controller
/reposets/{id}:
get:
operationId: list_reposets
parameters:
- $ref: '#/components/parameters/pathAccountID'
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/RepositorySetList'
description: List the repository sets belonging to the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account.
409:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Concurrent requests that are finishing the account registration.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List the repository sets belonging to the calling user.
tags:
- reposet
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.reposet_controller
/settings/jira/identities:
patch:
operationId: set_jira_identities
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SetMappedJIRAIdentitiesRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/MappedJIRAIdentities'
description: List with the Github<>JIRA identity mapping.
400:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: Request is invalid.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is not an admin of this account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user or the account was not found.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The JIRA installation does not exist.
security:
- bearerAuth: []
summary: 👤 Add, remove or override GitHub<>JIRA user identity mapping.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/jira/identities/{id}:
get:
operationId: get_jira_identities
parameters:
- $ref: '#/components/parameters/pathAccountID'
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/MappedJIRAIdentities'
description: List with the Github<>JIRA identity mapping.
400:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: Request is invalid.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is not an admin of this account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user or the account was not found.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The JIRA installation does not exist.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Fetch the GitHub<>JIRA user identity mapping.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/jira/projects:
put:
operationId: set_jira_projects
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JIRAProjectsRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/JIRAProjects'
description: Current JIRA project settings.
400:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: Request is invalid.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is not an admin of this account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user or the account was not found.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The JIRA installation does not exist.
security:
- bearerAuth: []
summary: 🛡️👤 Set the enabled JIRA projects.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/jira/projects/{id}:
get:
operationId: get_jira_projects
parameters:
- $ref: '#/components/parameters/pathAccountID'
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/JIRAProjects'
description: Current JIRA project settings.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account or account
not found.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The JIRA installation does not exist.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List the currently enabled JIRA project settings.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/logical_repositories/{id}:
get:
operationId: list_logical_repositories
parameters:
- $ref: '#/components/parameters/pathAccountID'
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/LogicalRepositories'
description: Configured logical repositories belonging to the account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: |
List the currently configured logical repositories.
A logical repository is a set of rules to match PRs, releases, and deployments
that has a name and pretends to be a regular GitHub repository everywhere in UI
and API requests.
This feature is particularly useful to reap monorepos into separate, joint or disjoint
parts.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/logical_repository:
put:
operationId: set_logical_repository
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LogicalRepositoryRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/LogicalRepository'
description: Created or updated logical repository.
400:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: Request is invalid.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is not an admin of this account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user or the account was not found.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The installation has not finished yet.
security:
- bearerAuth: []
summary: |
🛡️👤 Insert or update a logical repository - a named set of rules to match PRs, releases,
and deployments that pretends to be a regular GitHub repository everywhere in UI and
API requests.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/logical_repository/delete:
post:
operationId: delete_logical_repository
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LogicalRepositoryGetRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
type: object
description: Empty object indicates a successful removal.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is not an admin of the account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified logical repository does not exist.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: 🛡️ Delete a logical repository.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/release_match:
put:
operationId: set_release_match
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ReleaseMatchRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/RepositorySet'
description: List the repositories affected.
400:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: Request is invalid.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is not an admin of this account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user or the account was not found.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The installation has not finished yet.
security:
- bearerAuth: []
summary: |
👤 Set the release matching rule for a list of repositories. Only for account admins.
Release settings are rules by which to mark releases in GitHub repositories.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/release_match/{id}:
get:
operationId: list_release_match_settings
parameters:
- $ref: '#/components/parameters/pathAccountID'
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/ReleaseMatchSettings'
description: Current release matching settings per repo.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account.
422:
content:
application/json:
schema:
$ref: '#/components/schemas/NoSourceDataError'
description: The installation has not finished yet.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: |
List the current release matching settings.
Release settings are rules by which to mark releases in GitHub repositories.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/work_type:
put:
operationId: set_work_type
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkTypePutRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkType'
description: Created or updated work type definition.
400:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: Request is invalid.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user or the account was not found.
security:
- bearerAuth: []
summary: 👤 Create or update a work type - a rule set to group PRs, releases, etc.
together.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/work_type/delete:
post:
operationId: delete_work_type
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkTypeGetRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
type: object
description: Empty response indicates a successful operation.
400:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: Request is invalid.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user or the account was not found. The work type was not
found.
security:
- bearerAuth: []
summary: 👤 Remove the work type given the name.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/work_type/get:
post:
operationId: get_work_type
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkTypeGetRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkType'
description: Created or updated work type definition.
400:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: Request is invalid.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user or the account was not found. The work type was not
found.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Fetch the definition of the work type given the name.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/settings/work_types/{id}:
get:
operationId: list_work_types
parameters:
- $ref: '#/components/parameters/pathAccountID'
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkTypes'
description: Existing work types in the account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List the current work types - rule sets to group PRs, releases, etc.
together.
tags:
- settings
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.settings_controller
/share:
post:
operationId: save_share
requestBody:
content:
application/json:
schema:
type: object
x-body-name: body
responses:
200:
content:
application/json:
schema:
type: string
description: Saved share identifier.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
security:
- bearerAuth: []
summary: 👤 Save the state of UI views and return a reference.
tags:
- user
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.share_controller
/share/{id}:
get:
operationId: get_share
parameters:
- description: Reference to the share previously saved by `PUT /share`.
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/Share'
description: Saved state of the UI views.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Share does not exist or the user is not allowed to access.
security:
- bearerAuth: []
summary: 👤 Load the previously saved state of the UI views.
tags:
- user
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.share_controller
/team/create:
post:
operationId: create_team
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TeamCreateRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CreatedIdentifier'
description: Identifier of the created team.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
409:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: There is an existing team with the same name.
security:
- bearerAuth: []
summary: 👤 Create a team. Admin is not required.
tags:
- team
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.team_controller
/team/{id}:
delete:
operationId: delete_team
parameters:
- description: Numeric identifier of the team to delete.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
enum:
- {}
type: object
description: Empty object indicates a successful removal.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to delete the specified team.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified team was not found.
security:
- bearerAuth: []
summary: 👤 Delete a team.
tags:
- team
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.team_controller
get:
operationId: get_team
parameters:
- description: Numeric identifier of the team to list.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/Team'
description: List of the members in the specified team.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to list the specified team.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified team was not found.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List the team's members. The user must belong to the account that owns
the team.
tags:
- team
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.team_controller
put:
operationId: update_team
parameters:
- description: Numeric identifier of the team to update.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TeamUpdateRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
enum:
- {}
type: object
description: Empty object indicates a successful operation.
400:
$ref: '#/components/responses/InvalidRequestErrorResponse'
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user is forbidden to update the specified team.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The specified team was not found.
409:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: There is an existing team with the same contents.
security:
- bearerAuth: []
summary: 👤 Update a team.
tags:
- team
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.team_controller
/teams/{id}:
delete:
operationId: resync_teams
parameters:
- $ref: '#/components/parameters/pathAccountID'
- description: Delete teams that are not backed by GitHub.
explode: false
in: query
name: unmapped
required: false
schema:
type: boolean
style: form
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/TeamList'
description: List of the new, reset teams belonging to the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: 🛡️ Delete all the teams belonging to the account and then clone from GitHub.
The "Bots" team will remain intact. The rest of the teams will be identical
to what's on GitHub.
tags:
- team
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.team_controller
get:
operationId: list_teams
parameters:
- $ref: '#/components/parameters/pathAccountID'
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/TeamList'
description: List of the teams belonging to the specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List the teams belonging to the calling user.
tags:
- team
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.team_controller
/token/create:
post:
operationId: create_token
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTokenRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/CreatedToken'
description: Value and ID of the generated Personal Access Token.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account or no such
account exists.
409:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: There is another token with the same name belonging to the
user in the account.
security:
- bearerAuth: []
summary: 👤 Create a new Personal Access Token for the calling user and the specified
account.
tags:
- security
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.security_controller
/token/{id}:
delete:
operationId: delete_token
parameters:
- description: Numeric identifier of the token.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
200:
content:
application/json:
schema:
type: object
description: Empty object indicates a successful removal.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not own the token.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The token does not exist.
security:
- bearerAuth: []
summary: 👤 Delete a Personal Access Token belonging to the user.
tags:
- security
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.security_controller
patch:
operationId: patch_token
parameters:
- description: Numeric identifier of the token.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchTokenRequest'
x-body-name: body
responses:
200:
content:
application/json:
schema:
type: object
description: Empty object indicates a successful patch operation.
403:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not own the token.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The token does not exist.
409:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: There is another token with the same name belonging to the
user in the account.
security:
- bearerAuth: []
summary: 👤 Change Personal Access Token's details.
tags:
- security
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.security_controller
/tokens/{id}:
get:
operationId: list_tokens
parameters:
- $ref: '#/components/parameters/pathAccountID'
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/ListedTokens'
description: List of Personal Access Tokens belonging to the user in the
specified account.
404:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The user does not belong to the specified account or no such
account exists.
security:
- bearerAuth: []
- apiKeyAuth: []
summary: List Personal Access Tokens of the user in the account.
tags:
- security
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.security_controller
/user:
get:
operationId: get_user
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: 'Information about the calling user: name, email, login, etc.'
security:
- bearerAuth: []
- apiKeyAuth: []
summary: Show details about the calling user.
tags:
- user
# {% if False %}
- default
# {% endif %}
x-codegen-request-body-name: body
x-openapi-router-controller: athenian.api.controllers.user_controller
/versions:
get:
operationId: get_versions
responses:
200:
content:
application/json:
schema:
$ref: '#/components/schemas/Versions'
description: Versions of the backend components.
security: []
summary: Query the versions of the backend components.
tags:
- version
# {% if False %}
- default
# {% endif %}
x-openapi-router-controller: athenian.api.controllers.status_controller
# yamllint disable-line rule:key-ordering
components:
parameters:
pathAccountID:
description: Numeric identifier of the account.
explode: false
in: path
name: id
required: true
schema:
type: integer
style: simple
responses:
DeploymentLabelsResponse:
content:
application/json:
schema:
additionalProperties: false
properties:
labels:
$ref: '#/components/schemas/DeploymentLabels'
required:
- labels
type: object
description: The labels now associated with the deployment.
DeploymentNotFoundResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: A deployment with the given name was not found.
EmptySuccessfulResponse:
content:
application/json:
schema:
enum:
- {}
type: object
description: Empty object indicates a successful operation.
GoalTemplateNotFoundResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: The goal template was not found.
InvalidRequestErrorResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestError'
description: The request is invalid.
schemas:
# yamllint disable-line rule:key-ordering
CreatedIdentifier:
additionalProperties: false
example:
id: 777
properties:
id:
description: Identifier of the created entity.
example: 777
type: integer
required:
- id
type: object
# yamllint disable-line rule:key-ordering
GenericError:
example:
detail: 'Unsupported metric: pr-xxx-time'
status: 400
title: Bad request syntax or unsupported method.
type: /errors/InvalidRequestError
properties:
detail:
description: Human-readable explanation specific to this occurrence of the
problem.
example: 'Unsupported metric: pr-xxx-time'
type: string
instance:
description: URI reference that identifies the specific occurrence of the
problem. It is `null` for 4xx, Sentry event ID for 5xx.
example: 2763c4eabd7240f59829ee1a02546293
type: string
status:
description: Duplicated HTTP status code.
example: 400
type: integer
title:
description: Short, human-readable summary of the problem type.
example: Bad request syntax or unsupported method.
type: string
type:
description: URI reference that identifies the problem type (RFC 7807).
example: /errors/InvalidRequestError
type: string
required:
- status
- title
- type
type: object
GoalTemplate:
additionalProperties: false
description: A template to generate a goal.
example:
available: true
id: 42
metric: pr-release-time
name: Untitled Template
repositories:
- github.com/athenianco/athenian-api
- github.com/athenianco/api-spec
properties:
available:
description: Whether the templates is avaiable for use.
type: boolean
id:
description: Identifier of the template.
type: integer
metric:
oneOf:
- $ref: '#/components/schemas/PullRequestMetricID'
- $ref: '#/components/schemas/JIRAMetricID'
- $ref: '#/components/schemas/ReleaseMetricID'
metric_params:
$ref: '#/components/schemas/GoalMetricParams'
name:
$ref: '#/components/schemas/GoalTemplateName'
repositories:
$ref: '#/components/schemas/RepositorySet'
required:
- available
- id
- name
- metric
type: object
GoalTemplateCreateRequest:
additionalProperties: false
description: Goal template creation request body.
example:
account: 30
metric: pr-review-time
name: My New Goal Template
repositories:
- github.com/athenianco/api-spec
- github.com/athenianco/athenian-webapp
properties:
account:
description: Account identifier. That account will own the created goal template.
type: integer
metric:
oneOf:
- $ref: '#/components/schemas/PullRequestMetricID'
- $ref: '#/components/schemas/JIRAMetricID'
- $ref: '#/components/schemas/ReleaseMetricID'
metric_params:
$ref: '#/components/schemas/GoalMetricParams'
name:
$ref: '#/components/schemas/GoalTemplateName'
repositories:
$ref: '#/components/schemas/RepositorySet'
required:
- account
- metric
- name
type: object
GoalTemplateList:
description: List of goal templates.
example:
- available: false
id: 42
metric: pr-release-time
name: Untitled Template 0
- available: true
id: 43
metric: jira-raised
name: Untitled Template 1
repositories:
- github.com/athenianco/athenian-webapp
items:
$ref: '#/components/schemas/GoalTemplate'
type: array
GoalMetricParams:
description: The parameters used to compute `metric` for the goal.
properties:
threshold:
oneOf:
- type: number
- $ref: '#/components/schemas/TimeDuration'
type: object
GoalTemplateName:
description: Name of the template.
example: Untitled Template
minLength: 1
type: string
GoalTemplateUpdateRequest:
additionalProperties: false
description: Goal template update request body. A missing property means removal.
example:
name: New template name
metric: pr-lead-time
properties:
name:
$ref: '#/components/schemas/GoalTemplateName'
metric:
oneOf:
- $ref: '#/components/schemas/PullRequestMetricID'
- $ref: '#/components/schemas/JIRAMetricID'
- $ref: '#/components/schemas/ReleaseMetricID'
metric_params:
$ref: '#/components/schemas/GoalMetricParams'
repositories:
$ref: '#/components/schemas/RepositorySet'
required:
- name
- metric
type: object
# yamllint disable-line rule:key-ordering
InvalidRequestError:
allOf:
- $ref: '#/components/schemas/GenericError'
- properties:
pointer:
description: Path to the offending request item.
example: .granularity
type: string
type: object
# yamllint disable-line rule:key-ordering
MissingSettingsError:
$ref: '#/components/schemas/GenericError'
# yamllint disable-line rule:key-ordering
NoSourceDataError:
$ref: '#/components/schemas/GenericError'
# yamllint disable-line rule:key-ordering
PullRequestMetricID:
description: |-
Currently supported PR metric types.
* `pr-wip-time`: average time spent in Work In Progress stage.
* `pr-wip-time-below-threshold-ratio`: ratio of PRs with a `pr-wip-time` below the threshold, disregarding the quantiles. The default threshold is 1 day.
* `pr-wip-count`: number of PRs used to calculate `pr-wip-time` disregarding the quantiles.
* `pr-wip-count-q`: number of PRs used to calculate `pr-wip-time` after applying the quantiles.
* `pr-review-time`: average time spent in Review stage.
* `pr-review-count`: number of PRs used to calculate `pr-review-time` disregarding the quantiles.
* `pr-review-count-q`: number of PRs used to calculate `pr-review-time` after applying the quantiles.
* `pr-review-time-below-threshold-ratio`: ratio of PRs with a `pr-review-time` below the threshold, disregarding the quantiles. The default threshold is 2 days.
* `pr-merging-time`: average time spent in Merge stage.
* `pr-merging-time-below-threshold-ratio`: ratio of PRs with a `pr-merging-time` below the threshold, disregarding the quantiles. The default threshold is 4 hours.
* `pr-merging-count`: number of PRs used to calculate `pr-merging-time` disregarding the quantiles.
* `pr-merging-count-q`: number of PRs used to calculate `pr-merging-time` after applying the quantiles.
* `pr-release-time`: average time spent in Release stage.
* `pr-release-count`: number of PRs used to calculate `pr-release-time` disregarding the quantiles.
* `pr-release-count-q`: number of PRs used to calculate `pr-release-time` after applying the quantiles.
* `pr-open-time`: average time the PR stayed open.
* `pr-open-count`: number of PRs used to calculate `pr-open-time` disregarding the quantiles.
* `pr-open-count-q`: number of PRs used to calculate `pr-open-time` after applying the quantiles.
* `pr-open-time-below-threshold-ratio`: ratio of PRs with a `pr-open-time` below the threshold, disregarding the quantiles. The default threshold is 3 days.
* `pr-cycle-time`: average PR Cycle - time between the work started and the release.
* `pr-cycle-time-below-threshold-ratio`: ratio of PRs with a `pr-cycle-time` below the threshold, disregarding the quantiles. The default threshold is 5 days.
* `pr-cycle-count`: number of PRs used to calculate `pr-cycle-time` disregarding the quantiles. It should be the same as `pr-release-count`.
* `pr-cycle-count-q`: number of PRs used to calculate `pr-cycle-time` after applying the quantiles.
* `pr-lead-time`: deprecated alias for `pr-cycle-time`
* `pr-lead-time-below-threshold-ratio`: deprecated alias for `pr-cycle-time-below-threshold-ratio`
* `pr-lead-count`: deprecated alias for `pr-cycle-count`
* `pr-lead-count-q`: deprecated alias for `pr-cycle-count-q`
* `pr-live-cycle-time`: Live Cycle Time - sum of corresponding `pr-wip-time`, `pr-review-time`, `pr-merging-time`, and `pr-release-time`.
* `pr-live-cycle-count`: number of PRs used to calculate `pr-cycle-time` disregarding the quantiles. It equals to the overall number of PRs observed in the given time window.
* `pr-live-cycle-count-q`: number of PRs used to calculate `pr-cycle-time` after applying the quantiles.
* `pr-all-count`: equals to the sum of `pr-live-cycle-count` with the number of PRs which are still not done on the specified time interval but don't have any stage-changing events. This metric should be exactly the same as the number of PRs returned by `/filter/pull_requests`. The quantiles are ignored.
* `pr-wait-first-review-time`: average time of waiting for the first review.
* `pr-wait-first-review-count`: number of PRs used to calculate `pr-wait-first-review`. Note: this is *not* the same as the number of PRs waiting for the first review.
* `pr-wait-first-review-count-q`: number of PRs used to calculate `pr-wait-first-review` after applying the quantiles.
* `pr-wait-first-review-time-below-threshold-ratio`: ratio of PRs with a `pr-wait-first-review` below the threshold, disregarding the quantiles. The default threshold is 6 hours.
* `pr-deployment-time`: average time between when the PR was released and was deployed. We track deployments through `/events/deployments`. Requires setting `ForSetPullRequests.environments`.
* `pr-deployment-count`: number of PRs used to calculate `pr-deployment-time` disregarding the quantiles. It equals to the overall number of deployed PRs in the given time window. Requires setting `ForSetPullRequests.environments`.
* `pr-deployment-count-q`: number of PRs used to calculate `pr-deployment-time` after applying the quantiles. Requires setting `ForSetPullRequests.environments`.
* `pr-lead-deployment-time`: extended Lead Time that includes the time passed since the PR was released until it was deployed. We discard PRs in repositories without deployments. Requires setting `ForSetPullRequests.environments`.
* `pr-lead-deployment-count`: number of PRs used to calculate `pr-lead-deployment-time` disregarding the quantiles. It equals to the overall number of deployed PRs in the given window and duplicates `pr-deployment-count`. Requires setting `ForSetPullRequests.environments`.
* `pr-lead-deployment-count-q`: number of PRs used to calculate `pr-lead-deployment-time` after applying the quantiles. Requires setting `ForSetPullRequests.environments`.
* `pr-cycle-deployment-time`: extended Cycle Time that includes `pr-deployment-time`. We discard PRs in repositories without deployments. Requires setting `ForSetPullRequests.environments`.
* `pr-cycle-deployment-count`: number of PRs used to calculate `pr-cycle-deployment-time` disregarding the quantiles. It equals to the overall number of deployed PRs in the given window and duplicates `pr-deployment-count` and `pr-lead-deployment-count`. Requires setting `ForSetPullRequests.environments`.
* `pr-cycle-deployment-count-q`: number of PRs used to calculate `pr-cycle-deployment-time` after applying the quantiles. Requires setting `ForSetPullRequests.environments`.
* `pr-cycle-deployment-time-below-threshold-ratio`: ratio of PRs with a `pr-cycle-deployment-count` below the threshold, disregarding the quantiles. The default threshold is 5 days.
* `pr-flow-ratio`: ratio of opened to closed PRs.
* `pr-opened`: number of opened PRs.
* `pr-reviewed`: number of PRs which received a review.
* `pr-reviewed-closed`: number of closed (merged or rejected) PRs which received a review.
* `pr-not-reviewed`: number of closed (merged or rejected) PRs without any review.
* `pr-reviewed-ratio`: ratio of `pr-reviewed` to `pr-reviewed` + `pr-not-reviewed`.
* `pr-merged`: number of merged PRs.
* `pr-rejected`: number of rejected (closed unmerged) PRs.
* `pr-closed`: number of closed PRs = `pr-merged` + `pr-rejected`.
* `pr-done`: number of released, rejected, and force push dropped PRs.
* `pr-size`: average size of PRs (added + deleted lines) which are active on the time interval after applying the quantiles.
* `pr-size-below-threshold-ratio`: ratio of PRs with a `pr-size` below or equal to the threshold, disregarding the quantiles. The default threshold is 100 lines.
* `pr-median-size`: median size of PRs (added + deleted lines) which are active on the time interval ignoring the quantiles.
* `pr-wip-pending-count`: number of PRs currently in Work In Progress stage.
* `pr-review-pending-count`: number of PRs currently in Review stage.
* `pr-merging-pending-count`: number of PRs currently in Merge stage.
* `pr-release-pending-count`: number of PRs currently in Release stage.
* `pr-opened-mapped-to-jira`: ratio of created PRs that are mapped to JIRA issues.
* `pr-done-mapped-to-jira`: ratio of rejected or released PRs that are mapped to JIRA issues.
* `pr-all-mapped-to-jira`: ratio of all observed PRs that are mapped to JIRA issues.
* `pr-participants-per`: average number of PR particpants excluding the releasers and the bots.
* `pr-review-comments-per`: average number of PR review comments for reviewed PRs, bots excluded.
* `pr-review-comments-per-above-threshold-ratio`: ratio of PRs with a `pr-review-comments-per` above or equal to the threshold, disregarding the quantiles. The threshold is 3 comments.
* `pr-reviews-per`: average number of PR reviews for reviewed PRs, bots excluded.
* `pr-comments-per`: average number of PR comments, both regular and review, for reviewed PRs, bots excluded.
enum:
- pr-wip-time
- pr-wip-time-below-threshold-ratio
- pr-wip-count
- pr-wip-count-q
- pr-review-time
- pr-review-count
- pr-review-count-q
- pr-review-time-below-threshold-ratio
- pr-merging-time
- pr-merging-time-below-threshold-ratio
- pr-merging-count
- pr-merging-count-q
- pr-release-time
- pr-release-count
- pr-release-count-q
- pr-open-time
- pr-open-count
- pr-open-count-q
- pr-open-time-below-threshold-ratio
- pr-lead-time
- pr-lead-time-below-threshold-ratio
- pr-lead-count
- pr-lead-count-q
- pr-cycle-time
- pr-cycle-time-below-threshold-ratio
- pr-cycle-count
- pr-cycle-count-q
- pr-live-cycle-time
- pr-live-cycle-count
- pr-live-cycle-count-q
- pr-all-count
- pr-wait-first-review-time
- pr-wait-first-review-count
- pr-wait-first-review-count-q
- pr-wait-first-review-time-below-threshold-ratio
- pr-deployment-time
- pr-deployment-count
- pr-deployment-count-q
- pr-lead-deployment-time
- pr-lead-deployment-count
- pr-lead-deployment-count-q
- pr-cycle-deployment-time
- pr-cycle-deployment-count
- pr-cycle-deployment-count-q
- pr-cycle-deployment-time-below-threshold-ratio
- pr-flow-ratio
- pr-opened
- pr-reviewed
- pr-reviewed-closed
- pr-not-reviewed
- pr-reviewed-ratio
- pr-merged
- pr-rejected
- pr-closed
- pr-done
- pr-size
- pr-size-below-threshold-ratio
- pr-median-size
- pr-wip-pending-count
- pr-review-pending-count
- pr-merging-pending-count
- pr-release-pending-count
- pr-opened-mapped-to-jira
- pr-done-mapped-to-jira
- pr-all-mapped-to-jira
- pr-participants-per
- pr-review-comments-per
- pr-review-comments-per-above-threshold-ratio
- pr-reviews-per
- pr-comments-per
example: pr-lead-time
type: string
# yamllint disable-line rule:key-ordering
DeveloperID:
description: |
User name which uniquely identifies any developer on any service provider.
The format matches the profile URL without the protocol part.
example: github.com/vmarkovtsev
type: string
# yamllint disable-line rule:key-ordering
RepositoryID:
description: |
Repository name which uniquely identifies any repository in any service provider.
The format matches the repository URL without the protocol part. No ".git" should be appended.
We support a special syntax for repository sets: "{reposet id}" adds all the repositories
from the given set.
example: github.com/athenianco/athenian-webapp
type: string
# yamllint disable-line rule:key-ordering
DeveloperSet:
description: A set of developers. An empty list disables the filter and includes
everybody. Duplicates are automatically ignored.
example:
- github.com/vmarkovtsev
- github.com/dpordomingo
items:
$ref: '#/components/schemas/DeveloperID'
type: array
# yamllint disable-line rule:key-ordering
Contributors:
description: List of contributors.
example:
- email: bot@athenian.co
login: github.com/gkwillie
name: Groundskeeper Willie
picture: https://avatars0.githubusercontent.com/u/60340680?v=4
- email: loumarvincaraig@gmail.com
login: github.com/se7entyse7en
name: Lou Marvin Caraig
picture: https://avatars1.githubusercontent.com/u/5599208?v=4
items:
$ref: '#/components/schemas/Contributor'
type: array
# yamllint disable-line rule:key-ordering
Contributor:
additionalProperties: false
description: Details about a developer who contributed to some repositories
owned by the account.
example:
login: github.com/gkwillie
name: Groundskeeper Willie
email: bot@athenian.co
picture: https://avatars0.githubusercontent.com/u/60340680?v=4
properties:
login:
$ref: '#/components/schemas/DeveloperID'
name:
description: Full name of the contributor.
type: string
email:
description: Email of the conributor.
type: string
picture:
description: Avatar URL of the contributor.
type: string
jira_user:
description: Mapped JIRA user name.
type: string
required:
- login
type: object
# yamllint disable-line rule:key-ordering
TeamCreateRequest:
additionalProperties: false
description: Team creation request.
example:
account: 1
name: Engineering
members:
- github.com/gkwillie
- github.com/se7entyse7en
parent: null
properties:
account:
description: Account identifier. That account will own the created team.
type: integer
name:
description: Name of the team.
type: string
members:
$ref: '#/components/schemas/DeveloperSet'
parent:
description: Identifier of the higher level team.
nullable: true
type: integer
required:
- account
- members
- name
- parent
type: object
# yamllint disable-line rule:key-ordering
TeamUpdateRequest:
additionalProperties: false
description: Team update request.
example:
name: Engineering
members:
- github.com/gkwillie
- github.com/se7entyse7en
parent: null
properties:
name:
description: New name of the team.
type: string
members:
$ref: '#/components/schemas/DeveloperSet'
parent:
description: New identifier of the higher level team.
nullable: true
type: integer
required:
- members
- name
- parent
type: object
# yamllint disable-line rule:key-ordering
Team:
description: Definition of a team of several developers.
example:
id: 1
name: Engineering
parent: 3
members:
- login: github.com/gkwillie
name: Groundskeeper Willie
email: bot@athenian.co
picture: https://avatars0.githubusercontent.com/u/60340680?v=4
- login: github.com/se7entyse7en
name: Lou Marvin Caraig
email: loumarvincaraig@gmail.com
picture: https://avatars1.githubusercontent.com/u/5599208?v=4
properties:
id:
description: Team identifier.
type: integer
name:
description: Name of the team.
type: string
members:
$ref: '#/components/schemas/Contributors'
parent:
description: Identifier of the higher level team.
nullable: true
type: integer
required:
- id
- members
- name
- parent
type: object
# yamllint disable-line rule:key-ordering
TeamList:
description: List of teams of an account.
example:
- id: 1
name: Engineering
parent: 3
members:
- login: github.com/vmarkovtsev
name: Vadim Markovtsev
email: vadim@athenian.co
picture: https://avatars3.githubusercontent.com/u/2793551?v=4
- login: github.com/se7entyse7en
name: Lou Marvin Caraig
email: waren@athenian.co
picture: https://avatars1.githubusercontent.com/u/5599208?v=4
- id: 2
name: Product
parent: 3
members:
- login: github.com/warenlg
name: Waren Long
email: waren@athenian.co
picture: https://avatars2.githubusercontent.com/u/24694845?v=4
- id: 3
name: Management
parent: null
members:
- login: github.com/eiso
name: Eiso Kant
email: eiso@athenian.co
picture: https://avatars2.githubusercontent.com/u/1247608?v=4
items:
$ref: '#/components/schemas/Team'
type: array
# yamllint disable-line rule:key-ordering
RepositorySet:
description: Set of repositories. An empty list raises a bad response 400. Duplicates
are automatically ignored.
example:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
items:
$ref: '#/components/schemas/RepositoryID'
type: array
# yamllint disable-line rule:key-ordering
RepositorySetWithName:
additionalProperties: false
description: A set of repositories. An empty list results an empty response
in contrary to DeveloperSet. Duplicates are automatically ignored.
example:
name: all
items:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
precomputed: true
properties:
name:
type: string
items:
items:
$ref: '#/components/schemas/RepositoryID'
type: array
precomputed:
type: boolean
type: object
# yamllint disable-line rule:key-ordering
RepositorySetList:
description: List of repository sets owned by a user.
items:
$ref: '#/components/schemas/RepositorySetListItem'
type: array
# yamllint disable-line rule:key-ordering
RepositorySetCreateRequest:
additionalProperties: false
description: Repository set creation request.
example:
account: 1
items:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
name: users
properties:
account:
description: Account identifier. That account will own the created repository
set. The user must be an admin of the account.
type: integer
items:
items:
$ref: '#/components/schemas/RepositoryID'
type: array
name:
description: Unique editable identifier of the repository set.
type: string
required:
- account
- items
- name
type: object
# yamllint disable-line rule:key-ordering
RepositorySetListItem:
additionalProperties: false
description: Element of RepositorySetList.
example:
items_count: 6
created: 2020-01-23T04:56:07.000+00:00
id: 1
name: all
updated: 2020-01-23T04:56:07.000+00:00
properties:
id:
description: Repository set identifier.
type: integer
name:
description: Repository set name.
type: string
created:
description: Date and time of creation of the repository set.
format: date-time
type: string
updated:
description: Date and time of the last change of the repository set.
format: date-time
type: string
items_count:
description: Number of repositories in the set.
minimum: 1
type: integer
type: object
# yamllint disable-line rule:key-ordering
User:
additionalProperties: false
description: User details. "updated" and "accounts" are populated only for the
calling user.
example:
id: github|60340680
native_id: '60340680'
login: gkwillie
name: Groundskeeper Willie
email: bot@athenian.co
picture: https://avatars0.githubusercontent.com/u/60340680?v=4
updated: 2020-01-23T12:00:00Z
accounts:
1:
is_admin: true
expired: false
has_jira: true
has_ci: true
has_deployments: true
stale: false
2:
is_admin: false
expired: false
has_jira: false
has_ci: true
has_deployments: false
stale: false
properties:
accounts:
additionalProperties:
$ref: '#/components/schemas/AccountStatus'
description: Mapping from user's account ID the membership status.
type: object
email:
description: Email of the user.
type: string
id:
description: Auth0 user identifier.
type: string
impersonated_by:
description: Identifier of the super admin user who is acting on behalf of.
type: string
login:
description: Auth backend user login name.
type: string
native_id:
description: Auth backend user identifier.
type: string
name:
description: Full name of the user.
type: string
picture:
description: Avatar URL of the user.
type: string
updated:
description: Date and time of the last profile update.
format: date-time
type: string
required:
- id
- login
- native_id
type: object
# yamllint disable-line rule:key-ordering
AccountStatus:
additionalProperties: false
description: Status of the user's account membership.
example:
is_admin: true
expired: false
stale: false
has_jira: true
has_ci: true
has_deployments: true
properties:
is_admin:
description: Indicates whether the user is an account administrator.
type: boolean
expired:
description: Indicates whether the account is disabled.
type: boolean
stale:
description: Indicates whether the account is temporarily not receiving data updates.
type: boolean
has_jira:
description: Indicates whether the account installed the integration with
JIRA.
type: boolean
has_ci:
description: Indicates whether the account permitted the access to check
suites.
type: boolean
has_deployments:
description: Indicates whether the account has submitted at least one deployment.
type: boolean
required:
- expired
- has_ci
- has_deployments
- has_jira
- is_admin
- stale
type: object
# yamllint disable-line rule:key-ordering
InvitedUser:
additionalProperties: false
description: Details about the user who has accepted an invitation.
example:
user:
id: github|60340681
native_id: '60340681'
login: gkwillie
name: Groundskeeper Willie
email: bot@athenian.co
picture: https://avatars0.githubusercontent.com/u/60340681?v=4
updated: 2020-01-23T12:00:00Z
account: 0
properties:
account:
description: Joined account ID.
type: integer
user:
$ref: '#/components/schemas/User'
required:
- account
- user
type: object
# yamllint disable-line rule:key-ordering
Account:
additionalProperties: false
description: Account members ("updated" and "accounts" are not populated) and
installed GitHub organizations.
example:
regulars:
- id: github|24828976
native_id: '24828976'
login: jjdoe
name: Jane Josephine Doe
email: janedoe@exampleco.com
picture: https://exampleco.com/janedoe/me.jpg
updated: 2020-01-23T12:00:00Z
- id: github|24828977
native_id: '24828977'
login: jjdoe
name: Jane Josephine Doe
email: janedoe@exampleco.com
picture: https://exampleco.com/janedoe/me.jpg
updated: 2020-01-23T12:00:00Z
admins:
- id: github|24828978
native_id: '24828978'
login: jjdoe
name: Jane Josephine Doe
email: janedoe@exampleco.com
picture: https://exampleco.com/janedoe/me.jpg
updated: 2020-01-23T12:00:00Z
- id: github|24828979
native_id: '24828979'
login: jjdoe
name: Jane Josephine Doe
email: janedoe@exampleco.com
picture: https://exampleco.com/janedoe/me.jpg
updated: 2020-01-23T12:00:00Z
organizations:
- name: Athenian
login: athenianco
avatar_url: https://avatars3.githubusercontent.com/u/58329504?s=200&v=4
datasources:
- github
- jira
jira:
url: https://athenianco.atlassian.net
projects:
- DEV
- ENG
properties:
admins:
description: List of admin users.
items:
$ref: '#/components/schemas/User'
type: array
regulars:
description: List of non-admin users.
items:
$ref: '#/components/schemas/User'
type: array
organizations:
description: List of installed GitHub organizations.
items:
$ref: '#/components/schemas/Organization'
type: array
datasources:
description: The list of datasources configured for the account.
items:
$ref: '#/components/schemas/Datasource'
type: array
jira:
$ref: '#/components/schemas/JIRAInstallation'
required:
- admins
- organizations
- regulars
- datasources
type: object
# yamllint disable-line rule:key-ordering
Datasource:
description: A datasource configured for the account.
enum:
- github
- jira
Organization:
additionalProperties: false
description: GitHub organization details.
example:
name: Athenian
login: athenianco
avatar_url: https://avatars3.githubusercontent.com/u/58329504?s=200&v=4
properties:
name:
type: string
avatar_url:
type: string
login:
type: string
required:
- avatar_url
- login
- name
type: object
# yamllint disable-line rule:key-ordering
JIRAInstallation:
additionalProperties: false
description: Information about a link with JIRA.
example:
url: https://athenianco.atlassian.net
projects:
- DEV
- ENG
properties:
url:
description: JIRA base URL.
format: url
type: string
projects:
description: List of accessible project keys.
items:
type: string
type: array
required:
- projects
- url
type: object
# yamllint disable-line rule:key-ordering
InvitationLink:
additionalProperties: false
example:
url: https://app.athenian.co/i/deadf88d
description: Product invitation URL.
properties:
url:
description: Invitation URL. Users are supposed to click it and become admins
or regular account members.
format: url
type: string
required:
- url
type: object
# yamllint disable-line rule:key-ordering
AcceptedInvitation:
additionalProperties: false
example:
url: https://app.athenian.co/i/deadf88d
email: vadim@athenian.co
description: Request for entering the product.
properties:
email:
description: Calling user's email address.
format: email
type: string
name:
description: Calling user's name.
type: string
url:
description: Invitation URL. Users are supposed to click it and become admins
or regular account members.
format: url
type: string
required:
- url
type: object
# yamllint disable-line rule:key-ordering
InvitationCheckResult:
additionalProperties: false
example:
active: true
type: regular
valid: true
properties:
active:
description: Value indicating whether the invitation is still enabled.
type: boolean
type:
description: Invited user's account membership status.
enum:
- admin
- regular
type: string
valid:
description: Value indicating whether the invitation URL is correctly formed.
type: boolean
required:
- valid
type: object
# yamllint disable-line rule:key-ordering
InstallationProgress:
additionalProperties: false
description: |
Status of fetching data to Athenian.
GitHub progress always returns `owner` and `repositories`.
example:
tables:
- fetched: 50
name: Commit
total: 100
- fetched: 0
name: PullRequest
total: 20
finished_date: 2020-01-23T04:56:07Z
started_date: 2020-01-23T06:56:07Z
owner: vmarkovtsev
repositories: 30
properties:
started_date:
description: Date and time when the historical data collection began.
format: date-time
type: string
finished_date:
description: Date and time when the historical data collection ended.
format: date-time
nullable: true
type: string
owner:
description: Login of the person who installed the metadata.
type: string
repositories:
description: Number of discovered repositories.
minimum: 0
type: integer
tables:
example:
- fetched: 50
name: Commit
total: 100
- fetched: 0
total: 200
name: PullRequest
items:
$ref: '#/components/schemas/TableFetchingProgress'
type: array
required:
- finished_date
- started_date
- tables
type: object
# yamllint disable-line rule:key-ordering
TableFetchingProgress:
additionalProperties: false
description: Used in InstallationProgress.tables to indicate how much data has
been loaded in each DB table.
example:
fetched: 50
name: Commit
total: 100
properties:
fetched:
description: How many records have been stored in the DB table so far.
minimum: 0
type: integer
name:
description: DB table identifier.
type: string
total:
description: How many records the DB table is expected to have.
minimum: 1
type: integer
required:
- fetched
- name
- total
type: object
# yamllint disable-line rule:key-ordering
ForSetPullRequests:
additionalProperties: false
description: |
Filter for `/metrics/pull_requests` and `/histograms/pull_requests`.
Achieve the best performance by packing all your filters in a single `ForSetPullRequests`
instead of sending multiple `ForSetPullRequests`-s. For example, use `repogroups` and `withgroups`
to request separate metrics for several repository sets and teams.
example:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
with:
author:
- github.com/vmarkovtsev
- github.com/dpordomingo
labels_include:
- bug
not:
$ref: '#/components/schemas/WithBothJiraAndJiragroups'
properties:
repositories:
allOf:
- $ref: '#/components/schemas/RepositorySet'
- description: |
Repositories for which to calculate the metrics.
When property is missing metrics will be calculated across all repositories.
repogroups:
$ref: '#/components/schemas/IndexedGroups'
with:
$ref: '#/components/schemas/PullRequestWith'
withgroups:
description: |-
Aggregate by groups of PR contributors.
Currently, only the groupings by `author`, `merger`, and `releaser` are supported.
People do not have to be mentioned in `with` in contrast to `repogroups`.
We treat `with` as another group, if specified.
items:
$ref: '#/components/schemas/PullRequestWith'
type: array
labels_include:
description: At least one of these labels must be present in each analyzed
PR.
items:
type: string
type: array
labels_exclude:
description: None of these labels must be present in each analyzed PR.
items:
type: string
type: array
lines:
description: Split by changed number of lines (inserted + removed).
items:
minimum: 0
type: integer
minItems: 2
type: array
jira:
$ref: '#/components/schemas/JIRAFilter'
jiragroups:
$ref: '#/components/schemas/JIRAGroups'
environments:
description: Calculate deployment metrics separately for each environment
in the list. Required if any deployment metrics were requested. Histograms
are only implemented for single environments.
items:
type: string
maxItems: 64
minItems: 1
type: array
type: object
# yamllint disable-line rule:key-ordering
ForSetDevelopers:
additionalProperties: false
description: |
Filter for `/metrics/developers`.
Achieve the best performance by packing all your filters in a single `ForSetDevelopers`
instead of sending multiple `ForSetDevelopers`-s. For example, use `repogroups`
to request separate metrics for several repository sets.
example:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
developers:
- github.com/vmarkovtsev
- github.com/dpordomingo
properties:
repositories:
$ref: '#/components/schemas/RepositorySet'
developers:
allOf:
- description: List of developers. Must contain at least one item. Duplicates
are not ignored.
- $ref: '#/components/schemas/DeveloperSet'
repogroups:
allOf:
- description: Split metrics per defined repository groups.
- $ref: '#/components/schemas/IndexedGroups'
aggregate_devgroups:
allOf:
- description: Aggregate metrics for each defined developer group.
- $ref: '#/components/schemas/IndexedGroups'
labels_include:
description: PRs must be labeled with at least one name from this list so
that the related metrics include them.
items:
type: string
type: array
labels_exclude:
description: PRs must not be labeled with any name from this list so that
the related metrics exclude them.
items:
type: string
type: array
jira:
$ref: '#/components/schemas/JIRAFilter'
required:
- developers
- repositories
type: object
# yamllint disable-line rule:key-ordering
Granularities:
description: The splits of the specified time range.
items:
$ref: '#/components/schemas/Granularity'
minItems: 1
type: array
Granularity:
description: |-
How often the metrics are reported. The value must satisfy the
following regular expression: /^all|(([1-9]\d* )?(aligned )?(day|week|month|year))$/.
"all" produces a single interval [`date_from`, `date_to`].
"aligned week/month/year" produces intervals cut by calendar week/month/year borders,
for example, when `date_from` is `2020-01-15` and `date_to` is `2020-03-10`,
the intervals will be `2020-01-15` - `2020-02-01` - `2020-03-01` - `2020-03-10`.
example: 2 week
type: string
# yamllint disable-line rule:key-ordering
PullRequestMetricsRequest:
additionalProperties: false
description: Request for calculating metrics on top of pull requests data.
example:
for:
- repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
with:
author:
- github.com/vmarkovtsev
- github.com/dpordomingo
- repositories:
- github.com/athenianco/metadata
- github.com/athenianco/athenian-api
with:
author:
- github.com/vmarkovtsev
- github.com/se7entyse7en
metrics:
- pr-lead-time
- pr-wip-time
date_from: 2020-01-23
date_to: 2020-01-24
granularities:
- day
account: 1
exclude_inactive: true
properties:
for:
description: |-
Sets of developers and repositories for which to calculate the metrics.
The aggregation is `AND` between repositories and developers.
The aggregation is `OR` inside both repositories and developers.
items:
$ref: '#/components/schemas/ForSetPullRequests'
type: array
metrics:
description: Requested metric identifiers.
items:
$ref: '#/components/schemas/PullRequestMetricID'
type: array
date_from:
description: Date from when to start measuring the metrics.
format: date
type: string
date_to:
description: Date until which to measure the metrics.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
granularities:
$ref: '#/components/schemas/Granularities'
quantiles:
$ref: '#/components/schemas/Quantiles'
exclude_inactive:
description: Value indicating whether PRs without events in the given time
frame shall be ignored.
type: boolean
account:
description: Session account ID.
type: integer
fresh:
description: Force metrics calculation on the most up to date data.
type: boolean
required:
- account
- date_from
- date_to
- exclude_inactive
- for
- granularities
- metrics
type: object
# yamllint disable-line rule:key-ordering
CalculatedPullRequestMetricsItem:
additionalProperties: false
description: Series of calculated metrics for a specific set of repositories
and developers.
example:
values:
- date: 2020-01-23
values:
- 0.8008282
- 0.8008282
confidence_mins:
- 0.5
- 0.5
confidence_maxs:
- 1.0
- 1.0
confidence_scores:
- 75
- 75
- date: 2020-01-24
values:
- 0.8008282
- 0.8008282
confidence_mins:
- 0.5
- 0.5
confidence_maxs:
- 1.0
- 1.0
confidence_scores:
- 75
- 75
for:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
with:
author:
- github.com/vmarkovtsev
- github.com/dpordomingo
granularity: day
properties:
for:
$ref: '#/components/schemas/ForSetPullRequests'
granularity:
$ref: '#/components/schemas/Granularity'
values:
description: The sequence steps from `date_from` till `date_to` by `granularity`.
items:
$ref: '#/components/schemas/CalculatedLinearMetricValues'
type: array
required:
- for
- values
type: object
# yamllint disable-line rule:key-ordering
Quantiles:
description: |-
Cut the distributions at certain quantiles.
The default values are [0, 1] which means no cutting.
example:
- 0
- 0.95
items:
maximum: 1
minimum: 0
type: number
maxItems: 2
minItems: 2
type: array
# yamllint disable-line rule:key-ordering
CalculatedPullRequestMetrics:
additionalProperties: false
description: |
Response from `/metrics/pull_requests`. The dates start from `date_from`
and end earlier or equal to `date_to`.
The order of the items is *not* guaranteed to match any expectations.
example:
metrics:
- pr-lead-time
- pr-wip-time
date_from: 2020-01-23
date_to: 2020-01-24
granularities:
- day
exclude_inactive: true
calculated:
- values:
- date: 2020-01-23
values:
- 0.8008282
- 0.8008282
confidence_mins:
- 0.5
- 0.5
confidence_maxs:
- 1.0
- 1.0
confidence_scores:
- 75
- 75
- date: 2020-01-24
values:
- 0.8008282
- 0.8008282
confidence_mins:
- 0.5
- 0.5
confidence_maxs:
- 1.0
- 1.0
confidence_scores:
- 75
- 75
for:
with:
author:
- github.com/vmarkovtsev
- github.com/dpordomingo
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
- values:
- date: 2020-01-23
values:
- 0.8008282
- 0.8008282
confidence_mins:
- 0.5
- 0.5
confidence_maxs:
- 1.0
- 1.0
confidence_scores:
- 75
- 75
- date: 2020-01-24
values:
- 0.8008282
- 0.8008282
confidence_mins:
- 0.5
- 0.5
confidence_maxs:
- 1.0
- 1.0
confidence_scores:
- 75
- 75
for:
with:
author:
- github.com/vmarkovtsev
- ggithub.com/dpordomingo
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
properties:
calculated:
description: Values of the requested metrics through time.
items:
$ref: '#/components/schemas/CalculatedPullRequestMetricsItem'
type: array
metrics:
description: Repeats `PullRequestMetricsRequest.metrics`.
items:
$ref: '#/components/schemas/PullRequestMetricID'
type: array
date_from:
description: Repeats `PullRequestMetricsRequest.date_from`.
format: date
type: string
date_to:
description: Repeats `PullRequestMetricsRequest.date_to`.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
granularities:
$ref: '#/components/schemas/Granularities'
quantiles:
$ref: '#/components/schemas/Quantiles'
exclude_inactive:
description: Repeats `PullRequestMetricsRequest.exclude_inactive`.
type: boolean
required:
- calculated
- date_from
- date_to
- exclude_inactive
- granularities
- metrics
type: object
# yamllint disable-line rule:key-ordering
CalculatedLinearMetricValues:
additionalProperties: false
example:
date: 2020-01-23
values:
- 0.8008282
- 0.8008282
confidence_mins:
- 0.5
- 0.5
confidence_maxs:
- 1.0
- 1.0
confidence_scores:
- 75
- 75
properties:
date:
description: Where you should relate the metric value to on the time axis.
format: date
type: string
values:
description: Calculated metric values in the same order as `metrics`.
items:
oneOf:
- type: number
- $ref: '#/components/schemas/TimeDuration'
- type: object
type: array
confidence_mins:
description: Confidence interval @ p=0.8, minimum. The same order as `metrics`.
It is optional because there can be exact metrics like "count open PRs
per month".
items:
oneOf:
- type: number
nullable: true
- $ref: '#/components/schemas/TimeDuration'
type: array
confidence_maxs:
description: Confidence interval @ p=0.8, maximum. The same order as `metrics`.
It is optional because there can be exact metrics like "count open PRs
per month".
items:
oneOf:
- type: number
nullable: true
- $ref: '#/components/schemas/TimeDuration'
type: array
confidence_scores:
description: Confidence score from 0 (random guess) to 100 (very confident).
The same order as `metrics`. May be `null` for exact metrics.
items:
nullable: true
type: integer
type: array
required:
- date
- values
type: object
# yamllint disable-line rule:key-ordering
FilterRepositoriesRequest:
additionalProperties: false
description: Filters for `/filter/repositories`.
example:
account: 1
date_from: 2020-01-23
date_to: 2020-05-23
in:
- '{1}'
- github.com/athenianco/athenian-webapp
properties:
account:
description: Session account ID.
type: integer
date_from:
description: Updates must be later than or equal to this date. An update
is any action that influences the stage assignment.
format: date
type: string
date_to:
description: Updates must be earlier than or equal to this date. An update
is any action that influences the stage assignment.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
in:
$ref: '#/components/schemas/RepositorySet'
exclude_inactive:
description: Value indicating whether PRs without events in the given time
frame shall be ignored as repository triggers.
type: boolean
required:
- account
- date_from
- date_to
type: object
# yamllint disable-line rule:key-ordering
FilterReleasesRequest:
additionalProperties: false
description: Filters for `/filter/releases`.
example:
account: 1
date_from: 2020-01-23
date_to: 2020-05-23
in:
- '{1}'
- github.com/athenianco/athenian-webapp
with:
pr_author:
- github.com/vmarkovtsev
properties:
account:
description: Session account ID.
type: integer
date_from:
description: Updates must be later than or equal to this date. An update
is any action that influences the stage assignment.
format: date
type: string
date_to:
description: Updates must be earlier than or equal to this date. An update
is any action that influences the stage assignment.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
in:
$ref: '#/components/schemas/RepositorySet'
with:
$ref: '#/components/schemas/ReleaseWith'
labels_include:
description: At least one of these labels must be present in at least one
released PR.
items:
type: string
type: array
labels_exclude:
description: PRs with these labels are excluded from `ReleaseSet.data.prs`.
items:
type: string
type: array
jira:
$ref: '#/components/schemas/JIRAFilter'
required:
- account
- date_from
- date_to
type: object
# yamllint disable-line rule:key-ordering
FilterContributorsRequest:
additionalProperties: false
description: Filters for `/filter/contributors`.
example:
account: 1
date_from: 2020-01-23
date_to: 2020-05-23
in:
- '{1}'
- github.com/athenianco/athenian-webapp
as:
- author
- commit_author
properties:
account:
description: Session account ID.
type: integer
date_from:
description: Updates must be later than or equal to this date. An update
is any action that influences the stage assignment.
format: date
type: string
date_to:
description: Updates must be earlier than or equal to this date. An update
is any action that influences the stage assignment.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
in:
$ref: '#/components/schemas/RepositorySet'
as:
description: Filter by contribution type. A `null` or an empty list select
all.
items:
enum:
- author
- reviewer
- commit_author
- commit_committer
- commenter
- merger
- releaser
type: string
type: array
required:
- account
- date_from
- date_to
type: object
# yamllint disable-line rule:key-ordering
FilterPullRequestsRequest:
additionalProperties: false
description: Filters for `/filter/pull_requests`. Empty `properties` passes
through all PRs matched by the other filters.
example:
account: 1
date_from: 2020-01-23
date_to: 2020-05-23
in:
- '{1}'
- github.com/athenianco/athenian-webapp
stages:
- wip
with:
author:
- github.com/vmarkovtsev
exclude_inactive: true
properties:
account:
description: Session account ID.
type: integer
date_from:
description: PRs must be updated later than or equal to this date.
format: date
type: string
date_to:
description: PRs must be updated earlier than or equal to this date.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
in:
$ref: '#/components/schemas/RepositorySet'
events:
description: Allowed PR events that happened between `date_from` and `date_to`.
items:
$ref: '#/components/schemas/PullRequestEvent'
type: array
stages:
description: Allowed PR stages that are defined at `date_to`.
items:
$ref: '#/components/schemas/PullRequestStage'
type: array
with:
$ref: '#/components/schemas/PullRequestWith'
labels_include:
description: At least one of these labels must be present in each returned
PR.
items:
type: string
type: array
labels_exclude:
description: None of these labels must be present in each returned PR.
items:
type: string
type: array
exclude_inactive:
description: Value indicating whether PRs without events in the given time
frame shall be ignored.
type: boolean
jira:
$ref: '#/components/schemas/JIRAFilter'
updated_from:
description: 'Paginate the response: the returned PRs are updated on GitHub no older
than this timestamp, including the beginning. Note: "updated on GitHub" means that
we don´t consider release or deployment timestamps. Use this field only to
paginate after calling `/paginate/pull_requests`. Subject of future changes.'
format: date
type: string
updated_to:
description: 'Paginate the response: the returned PRs are updated on GitHub no later
than this timestamp, not including the ending. Note: "updated on GitHub" means that
we don´t consider release or deployment timestamps. Use this field only to
paginate after calling `/paginate/pull_requests`. Subject of future changes.'
format: date
type: string
limit:
description: Maximum number of pull requests to return. The list is sorted
by the last update timestamp. `null` means no limit.
minimum: 1
nullable: true
type: integer
environments:
description: Target environments for the deployment events, impacts `events`
and `stages`. If omitted, we match any deployment in any environment.
items:
type: string
minItems: 1
type: array
required:
- account
- date_from
- date_to
- exclude_inactive
- in
type: object
# yamllint disable-line rule:key-ordering
PullRequestEvent:
description: |-
PR's modelled lifecycle events.
* `created`: The PR was opened.
* `committed`: Somebody pushed a commit to the PR.
* `review_requested`: Somebody requested a PR review.
* `reviewed`: Somebody reviewed the PR (either approved, requested changes, or commented).
* `approved`: Somebody approved the PR. Note that if there were negative reviews from other participants, an approval does *not* trigger this event.
* `changes_requested`: Somebody submitted a negative PR review.
* `merged`: Somebody merged the PR.
* `released`: The PR was released.
* `rejected`: Somebody closed the PR without merging.
* `deployed`: The PR was deployed. We respect this event only when `environment` was specified.
enum:
- created
- committed
- review_requested
- reviewed
- approved
- changes_requested
- merged
- released
- rejected
- deployed
example: created
type: string
# yamllint disable-line rule:key-ordering
PullRequestStage:
description: |-
PR's modelled lifecycle stages.
* `wip`: The PR is a work-in-progress: no reviews, no review requests, not closed.
* `reviewing`: The PR is going through a review process.
* `merging`: The PR was approved and is waiting for merge.
* `releasing`: The PR was merged but is not released yet.
* `force_push_dropped`: The PR was closed but the Git commit history was rewritten and the PR's commits no longer exist. Always appears together with `done`.
* `release_ignored`: The PR belongs to the very first release of the repository, and we suppressed that release according to our heuristics. Always appears together with `done`.
* `done`: The PR was either closed without merging or released or force push dropped. Deployed or not.
* `deployed`: The PR was deployed. So it's merged. Released or not. We respect this stage only when `environment` was specified.
enum:
- wip
- reviewing
- merging
- releasing
- force_push_dropped
- done
- release_ignored
- deployed
example: done
type: string
# yamllint disable-line rule:key-ordering
PullRequestSet:
additionalProperties: false
description: List of pull requests together with the participant profile pictures.
example:
include:
users:
key:
avatar: https://avatars0.githubusercontent.com/u/60340680?v=4
deployments:
production-2020-03-26-W9J3uzHl:
components:
- repository: github.com/athenianco/athenian-api
reference: v0.10.34
environment: production
date_finished: 2022-01-23T05:01:07.000+00:00
date_started: 2022-01-23T04:56:07.000+00:00
conclusion: SUCCESS
labels:
helm_chart: 0.0.67
data:
- repository: github.com/athenianco/athenian-webapp
number: 1111
title: '[DEV-1802] epic search'
size_added: 128
size_removed: 30
files_changed: 5
created: 2021-03-02T11:47:42Z
updated: 2021-03-03T13:55:33Z
closed: 2021-03-03T13:55:32Z
comments: 5
commits: 17
review_requested: 2021-03-02T12:14:35Z
first_review: 2021-03-02T15:09:58Z
approved: 2021-03-03T13:15:58Z
review_comments: 2
reviews: 2
merged: 2021-03-03T13:55:32Z
merged_with_failed_check_runs:
- Unit tests
stage_timings:
wip: 12085s
review: 86690s
merge: 2374s
deploy:
production-2020-03-26-W9J3uzHl: 45321s
events_now:
- approved
- changes_requested
- committed
- created
- merged
- review_requested
- reviewed
- deployed
stages_now:
- done
- force_push_dropped
- deployed
participants:
- id: github.com/akbarik
status:
- author
- commit_author
- commit_committer
- merger
- id: github.com/se7entyse7en
status:
- reviewer
- commenter
- id: github.com/warenlg
status:
- commenter
- id: github.com/znegrin
status:
- commit_author
- commit_committer
jira:
- id: DEV-1802
title: FE - Add search capability to Epics table
epic: DEV-1474
labels:
- functionality
- webapp
type: Task
properties:
include:
allOf:
- $ref: '#/components/schemas/IncludedNativeUsers'
- $ref: '#/components/schemas/IncludedDeployments'
data:
description: List of matched pull requests.
items:
$ref: '#/components/schemas/PullRequest'
type: array
required:
- data
- include
type: object
# yamllint disable-line rule:key-ordering
IncludedNativeUser:
additionalProperties: false
description: User traits such as the avatar URL.
example:
avatar: https://avatars0.githubusercontent.com/u/60340680?v=4
properties:
avatar:
format: url
type: string
required:
- avatar
type: object
# yamllint disable-line rule:key-ordering
IncludedNativeUsers:
description: Mentioned GitHub users.
example:
users:
github.com/gkwillie:
avatar: https://avatars0.githubusercontent.com/u/60340680?v=4
properties:
users:
additionalProperties:
$ref: '#/components/schemas/IncludedNativeUser'
description: Mapping user native (e.g., GitHub) login ID -> user details.
The users are mentioned in the PRs from "PullRequestSet.data" or in the
commits from "FilterCommitsRequest.data".
type: object
required:
- users
type: object
# yamllint disable-line rule:key-ordering
IncludedDeployments:
description: Mentioned deployments.
example:
deployments:
production-2020-03-26-W9J3uzHl:
components:
- repository: github.com/athenianco/athenian-api
reference: v0.10.34
environment: production
date_finished: 2022-01-23T05:01:07.000+00:00
date_started: 2022-01-23T04:56:07.000+00:00
conclusion: SUCCESS
labels:
helm_chart: 0.0.67
properties:
deployments:
additionalProperties:
$ref: '#/components/schemas/DeploymentNotification'
description: Mapping deployment names to their details.
type: object
type: object
# yamllint disable-line rule:key-ordering
PullRequest:
additionalProperties: false
description: Details of a pull request. All the attributes, stats and events
correspond to "today", not `date_to`, *except for the PR stages `wip`, `reviewing`,
`merging`, `releasing`*, which correspond to `date_to`.
example:
repository: github.com/athenianco/athenian-webapp
number: 1111
title: '[DEV-1802] epic search'
size_added: 128
size_removed: 30
files_changed: 5
created: 2021-03-02T11:47:42Z
updated: 2021-03-03T13:55:33Z
closed: 2021-03-03T13:55:32Z
comments: 5
commits: 17
review_requested: 2021-03-02T12:14:35Z
first_review: 2021-03-02T15:09:58Z
approved: 2021-03-03T13:15:58Z
review_comments: 2
reviews: 2
merged: 2021-03-03T13:55:32Z
merged_with_failed_check_runs:
- Unit tests
stage_timings:
wip: 12085s
review: 86690s
merge: 2374s
deploy:
production-2020-03-26-W9J3uzHl: 45321s
events_now:
- approved
- changes_requested
- committed
- created
- merged
- review_requested
- reviewed
- deployed
stages_now:
- done
- force_push_dropped
- deployed
participants:
- id: github.com/akbarik
status:
- author
- commit_author
- commit_committer
- merger
- id: github.com/se7entyse7en
status:
- reviewer
- commenter
- id: github.com/warenlg
status:
- commenter
- id: github.com/znegrin
status:
- commit_author
- commit_committer
jira:
- id: DEV-1802
title: FE - Add search capability to Epics table
epic: DEV-1474
labels:
- functionality
- webapp
type: Task
properties:
repository:
description: PR is/was open in this repository.
type: string
number:
description: PR number.
minimum: 1
type: integer
title:
description: Title of the PR.
type: string
size_added:
description: Overall number of lines added.
minimum: 0
type: integer
size_removed:
description: Overall number of lines removed.
minimum: 0
type: integer
files_changed:
description: Number of files changed in this PR.
minimum: 0
type: integer
created:
description: When this PR was created.
format: date-time
type: string
updated:
description: When this PR was last updated.
format: date-time
type: string
closed:
description: When this PR was last closed.
format: date-time
type: string
comments:
description: Number of *regular* (not review) comments in this PR.
minimum: 0
type: integer
commits:
description: Number of commits in this PR.
minimum: 0
type: integer
review_requested:
description: When was the first time the author of this PR requested a review.
format: date-time
type: string
first_review:
description: When the first review of this PR happened.
format: date-time
type: string
approved:
description: When this PR was approved.
format: date-time
type: string
review_comments:
description: |-
Number of review comments this PR received. A review comment is left at
a specific line in a specific file. In other words: review summaries are
*not* considered review comments; refer to `reviews`. Comments by the PR
author are considered as `comments`, not as `review_comments`.
minimum: 0
type: integer
reviews:
description: Number of times this PR was reviewed. Reviews by the PR author
are not taken into account.
minimum: 0
type: integer
merged:
description: When this PR was merged.
format: date-time
type: string
merged_with_failed_check_runs:
description: PR was merged with these failed check runs.
items:
type: string
type: array
released:
description: When this PR was released.
format: date-time
type: string
release_url:
description: URL of the earliest release that includes this merged PR.
format: url
type: string
deployments:
description: List of deployments that contain this PR.
items:
type: string
type: array
stage_timings:
$ref: '#/components/schemas/StageTimings'
events_time_machine:
description: List of PR events which happened until `date_to`. `date_from`
does not matter.
items:
$ref: '#/components/schemas/PullRequestEvent'
type: array
stages_time_machine:
description: List of PR stages as of `date_to` (normally, of length 1).
items:
$ref: '#/components/schemas/PullRequestStage'
type: array
events_now:
description: List of PR events that ever happened.
items:
$ref: '#/components/schemas/PullRequestEvent'
type: array
stages_now:
description: List of current PR stages (normally, of length 1).
items:
$ref: '#/components/schemas/PullRequestStage'
type: array
participants:
description: List of developers related to this PR.
items:
$ref: '#/components/schemas/PullRequestParticipant'
type: array
labels:
description: List of PR labels.
items:
$ref: '#/components/schemas/PullRequestLabel'
type: array
jira:
description: List of linked JIRA issues.
items:
$ref: '#/components/schemas/LinkedJIRAIssue'
type: array
required:
- comments
- commits
- created
- events_now
- files_changed
- number
- participants
- repository
- size_added
- size_removed
- stage_timings
- stages_now
- title
- updated
type: object
# yamllint disable-line rule:key-ordering
StageTimings:
additionalProperties: false
description: |
Time spent by the PR in each pipeline stage.
The deployments are independent of the releases. If the release happens before
the deployment, the deployment time measures from the release event. If the release
happens after the deployment, the two values are independent and both measure from
the PR merge event.
example:
wip: 120s
review: 600s
properties:
wip:
$ref: '#/components/schemas/TimeDuration'
review:
$ref: '#/components/schemas/TimeDuration'
merge:
$ref: '#/components/schemas/TimeDuration'
release:
$ref: '#/components/schemas/TimeDuration'
deploy:
additionalProperties:
$ref: '#/components/schemas/TimeDuration'
description: Map from target environments to the values.
type: object
required:
- wip
type: object
# yamllint disable-line rule:key-ordering
PullRequestParticipant:
additionalProperties: false
description: Developer and their role in the PR.
properties:
id:
description: Person identifier.
example: github.com/vmarkovtsev
type: string
status:
items:
enum:
- author
- reviewer
- commit_author
- commit_committer
- commenter
- merger
- releaser
type: string
type: array
required:
- id
- status
type: object
# yamllint disable-line rule:key-ordering
PullRequestWith:
additionalProperties: false
description: |-
Triage PRs by various developer participation. The aggregation is `OR` between
the participation groups and `OR` within each group. For example, if our request is
```
{"author": ["github.com/vmarkovtsev"], "reviewer": ["github.com/gkwillie", "github.com/mcuadros"]}
```
then the matched PRs will have **@vmarkovtsev** as the author or either
**@gkwillie** or **@mcuadros** as the reviewers.
It is possible to mention whole teams using the syntax `{id}` where `id` is a team identifier (see `/teams`).
example:
author:
- github.com/vmarkovtsev
properties:
author:
$ref: '#/components/schemas/DeveloperSet'
reviewer:
$ref: '#/components/schemas/DeveloperSet'
commit_author:
$ref: '#/components/schemas/DeveloperSet'
commit_committer:
$ref: '#/components/schemas/DeveloperSet'
commenter:
$ref: '#/components/schemas/DeveloperSet'
merger:
$ref: '#/components/schemas/DeveloperSet'
releaser:
$ref: '#/components/schemas/DeveloperSet'
type: object
# yamllint disable-line rule:key-ordering
Color:
description: RGB 24-bit color in hex.
pattern: ^[0-9a-fA-F]{6}$
type: string
# yamllint disable-line rule:key-ordering
PullRequestLabel:
additionalProperties: false
description: Pull request label.
example:
name: bug
color: fc2929
properties:
name:
type: string
description:
type: string
color:
$ref: '#/components/schemas/Color'
required:
- color
- name
type: object
# yamllint disable-line rule:key-ordering
FilterCommitsRequest:
additionalProperties: false
description: Filter for listing commits.
example:
account: 1
date_from: 2020-01-23
date_to: 2020-05-23
in:
- '{1}'
- github.com/athenianco/athenian-webapp
property: bypassing_prs
properties:
account:
description: Session account ID.
type: integer
date_from:
description: Commits must be made later than or equal to this date.
format: date
type: string
date_to:
description: Commits must be made earlier than or equal to this date.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
in:
$ref: '#/components/schemas/RepositorySet'
with_author:
$ref: '#/components/schemas/DeveloperSet'
with_committer:
$ref: '#/components/schemas/DeveloperSet'
property:
description: |-
Main trait of the commits - the core of the filter.
* bypassing_prs: select commits that were pushed without creating a PR
* everything: select all the commits matched by the filters
* no_pr_merges: select all the commits but PR merges by noreply@github.com
enum:
- bypassing_prs
- everything
- no_pr_merges
type: string
only_default_branch:
description: |-
Consider only commits that are accessible from the head of the default branch.
For example, if your workflow includes PR-ing feature branches, you rebase and merge
them and don't delete afterward, `bypassing_prs` will report the commits in those
feature branches unless you set `only_default_branch` to `true`.
type: boolean
required:
- account
- date_from
- date_to
- in
- property
type: object
# yamllint disable-line rule:key-ordering
CommitsList:
additionalProperties: false
description: List of commits metadata and related user details.
example:
include:
users:
github.com/gkwillie:
avatar: https://avatars0.githubusercontent.com/u/60340680?v=4
data:
- repository: github.com/athenianco/athenian-api
hash: 79f0bccb856b35ef08ec93da2ff5585da4d2e50e
author:
login: github.com/gkwillie
name: Groundskeeper Willie
email: bot@athenian.co
timestamp: 2020-02-25T14:27:21Z
timezone: 1.0
committer:
login: github.com/gkwillie
name: Groundskeeper Willie
email: bot@athenian.co
timestamp: 2020-02-25T14:27:21Z
timezone: 1.0
message: 'Bump version: 0.0.42 → 0.0.43'
size_added: 1
size_removed: 1
files_changed: 1
- repository: github.com/athenianco/athenian-api
hash: 0d13a3e021fe4219915ba97ea07e465e429a621f
author:
login: github.com/gkwillie
name: Groundskeeper Willie
email: bot@athenian.co
timestamp: 2020-03-20T10:06:49Z
timezone: 1.0
committer:
login: github.com/gkwillie
name: Groundskeeper Willie
email: bot@athenian.co
timestamp: 2020-03-20T10:06:49Z
timezone: 1.0
message: 'Bump version: 0.0.78 → 0.0.79'
size_added: 1
size_removed: 1
files_changed: 1
properties:
data:
items:
$ref: '#/components/schemas/Commit'
type: array
include:
allOf:
- $ref: '#/components/schemas/IncludedDeployments'
- $ref: '#/components/schemas/IncludedNativeUsers'
required:
- data
- include
type: object
# yamllint disable-line rule:key-ordering
Commit:
additionalProperties: false
description: Information about a commit.
example:
repository: github.com/athenianco/athenian-api
hash: 79f0bccb856b35ef08ec93da2ff5585da4d2e50e
author:
login: github.com/gkwillie
name: Groundskeeper Willie
email: bot@athenian.co
timestamp: 2020-02-25T14:27:21Z
timezone: 1.0
committer:
login: github.com/gkwillie
name: Groundskeeper Willie
email: bot@athenian.co
timestamp: 2020-02-25T14:27:21Z
timezone: 1.0
message: 'Bump version: 0.0.42 → 0.0.43'
size_added: 1
size_removed: 1
files_changed: 1
properties:
author:
$ref: '#/components/schemas/CommitSignature'
children:
description: |
Hashes of the children. Exists only if `property == everything`.
Note: the direction is from HEAD to the root, i.e. reversed compared to Git.
items:
type: string
type: array
committer:
$ref: '#/components/schemas/CommitSignature'
deployments:
description: Deployments of the commit.
items:
type: string
type: array
files_changed:
description: Number of files changed in this PR.
minimum: 0
type: integer
hash:
description: Git commit hash.
type: string
message:
description: Commit message.
type: string
repository:
$ref: '#/components/schemas/RepositoryID'
size_added:
description: Overall number of lines added.
minimum: 0
type: integer
size_removed:
description: Overall number of lines removed.
minimum: 0
type: integer
required:
- author
- committer
- files_changed
- hash
- message
- repository
- size_added
- size_removed
type: object
# yamllint disable-line rule:key-ordering
CommitSignature:
additionalProperties: false
description: Git commit signature. It is guaranteed that `login` and/or `name`&`email`
are present.
example:
login: github.com/vmarkovtsev
name: Vadim Markovtsev
email: vadim@athenian.co
timestamp: 2020-02-25T14:27:21Z
timezone: 1.0
properties:
login:
$ref: '#/components/schemas/DeveloperID'
name:
description: Git signature name.
type: string
email:
description: Git signature email.
type: string
timestamp:
description: When the corresponding action happened in UTC.
format: date-time
type: string
timezone:
description: Timezone offset of the action timestamp (in hours).
format: float
type: number
required:
- timestamp
- timezone
type: object
# yamllint disable-line rule:key-ordering
CodeFilter:
additionalProperties: false
description: Filter for revealing code bypassing PRs.
example:
account: 1
date_from: 2020-01-01
date_to: 2020-03-01
granularity: day
in:
- '{1}'
- github.com/athenianco/athenian-webapp
with_author:
- github.com/vmarkovtsev
properties:
account:
description: Session account ID.
type: integer
date_from:
description: Commits must be made later than or equal to this date.
format: date
type: string
date_to:
description: Commits must be made earlier than or equal to this date.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
in:
$ref: '#/components/schemas/RepositorySet'
with_author:
$ref: '#/components/schemas/DeveloperSet'
with_committer:
$ref: '#/components/schemas/DeveloperSet'
granularity:
$ref: '#/components/schemas/Granularity'
only_default_branch:
description: |-
Consider only commits that are accessible from the head of the default branch.
For example, if your workflow includes PR-ing feature branches, you rebase and merge
them and don't delete afterward, `bypassing_prs` will report the commits in those
feature branches unless you set `only_default_branch` to `true`.
type: boolean
required:
- account
- date_from
- date_to
- granularity
- in
type: object
# yamllint disable-line rule:key-ordering
MeasuredCodeBypassingPRs:
description: Statistics about code pushed outside of pull requests.
example:
- date: 2020-01-23
bypassed_commits: 1
bypassed_lines: 20
total_commits: 2
total_lines: 50
- date: 2020-01-24
bypassed_commits: 2
bypassed_lines: 30
total_commits: 3
total_lines: 60
items:
$ref: '#/components/schemas/CodeBypassingPRsMeasurement'
type: array
# yamllint disable-line rule:key-ordering
CodeBypassingPRsMeasurement:
additionalProperties: false
description: Statistics about code pushed outside of pull requests in a certain
time interval.
example:
date: 2020-01-23
bypassed_commits: 1
bypassed_lines: 20
total_commits: 2
total_lines: 50
properties:
date:
description: Commits were pushed beginning with this date. They were not
pushed later than +granularity.
format: date
type: string
bypassed_commits:
description: Number of commits that bypassed PRs in the time interval.
minimum: 0
type: integer
bypassed_lines:
description: Number of changed (added + removed) lines that bypassed PRs
in the time interval.
minimum: 0
type: integer
total_commits:
description: Overall number of commits in the time interval.
minimum: 0
type: integer
total_lines:
description: Overall number of changed (added + removed) lines in the time
interval.
minimum: 0
type: integer
required:
- bypassed_commits
- bypassed_lines
- date
- total_commits
- total_lines
type: object
# yamllint disable-line rule:key-ordering
DeveloperMetricsRequest:
additionalProperties: false
description: Request for calculating metrics on top of developer activities.
example:
for:
- repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
developers:
- github.com/vmarkovtsev
- github.com/dpordomingo
- repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
developers:
- github.com/vmarkovtsev
- github.com/dpordomingo
metrics:
- dev-reviews
- dev-prs-created
- dev-pr-comments
date_from: 2019-10-23
date_to: 2020-05-23
granularities:
- all
account: 1
properties:
for:
description: Sets of developers and repositories to calculate the metrics
for.
items:
$ref: '#/components/schemas/ForSetDevelopers'
type: array
metrics:
description: Requested metric identifiers.
items:
$ref: '#/components/schemas/DeveloperMetricID'
type: array
date_from:
description: Date from when to start measuring the metrics.
format: date
type: string
date_to:
description: Date until which to measure the metrics.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
account:
description: Session account ID.
type: integer
granularities:
$ref: '#/components/schemas/Granularities'
required:
- account
- date_from
- date_to
- for
- granularities
- metrics
type: object
# yamllint disable-line rule:key-ordering
DeveloperMetricID:
description: |-
Currently supported developer metric types.
* `dev-commits-pushed`: how many commits were pushed.
* `dev-lines-changed`: how many lines were either inserted or removed in the pushed commits.
* `dev-prs-created`: how many PRs were created.
* `dev-prs-reviewed`: how many *distinct* PRs were reviewed (approved, rejected or neutral).
* `dev-prs-merged`: how many PRs were merged by this developer. This is *not* how many authored PRs were merged!
* `dev-releases`: how many releases were authored by this developer.
* `dev-reviews`: how many reviews were submitted. One PR may have several reviews by the same developer! This value equals to the sum of `dev-review-approvals`, `dev-review-rejections` and `dev-review-neutrals`.
* `dev-review-approvals`: how many approvals this developer submitted. One PR may have several approvals by the same developer!
* `dev-review-rejections`: how many rejections this developer submitted. One PR may have several rejections by the same developer!
* `dev-review-neutrals`: how many neutral ("comment") reviews this developer submitted. One PR may have several neutral reviews by the same developer!
* `dev-pr-comments`: how many comments (both regular and review) this developer posted.
* `dev-regular-pr-comments`: how many regular comments (not review suggestions!) this developer posted.
* `dev-review-pr-comments`: how many review suggestions (summaries are not considered!) this developer posted.
* `dev-active`: indicates whether this developer has made commits on more than X days during T days. `X / T = 0.2` at the moment.
* `dev-active0`: indicates whether this developer has made at least one commit.
* `dev-worked`: indicates whether this developer has shown any activity.
enum:
- dev-commits-pushed
- dev-lines-changed
- dev-prs-created
- dev-prs-reviewed
- dev-prs-merged
- dev-releases
- dev-reviews
- dev-review-approvals
- dev-review-rejections
- dev-review-neutrals
- dev-pr-comments
- dev-regular-pr-comments
- dev-review-pr-comments
- dev-active
- dev-active0
- dev-worked
example: dev-prs-created
type: string
# yamllint disable-line rule:key-ordering
CalculatedDeveloperMetrics:
additionalProperties: false
description: |
Response of `/metrics/developers`. The dates start from `date_from`
and end earlier or equal to `date_to`.
The order of the items is *not* guaranteed to match any expectations.
example:
date_from: 2020-01-23
date_to: 2020-01-24
granularities:
- all
metrics:
- dev-prs-created
- dev-reviews
calculated:
- values:
- - date: 2020-01-23
values:
- 5
- 10
- - date: 2020-01-23
values:
- 20
- 100
for:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
developers:
- github.com/vmarkovtsev
- github.com/dpordomingo
granularity: all
properties:
calculated:
description: Values of the requested metrics by developer through time.
items:
$ref: '#/components/schemas/CalculatedDeveloperMetricsItem'
type: array
metrics:
description: Repeats `DeveloperMetricsRequest.metrics`.
items:
$ref: '#/components/schemas/DeveloperMetricID'
type: array
date_from:
description: Repeats `DeveloperMetricsRequest.date_from`.
format: date
type: string
date_to:
description: Repeats `DeveloperMetricsRequest.date_to`.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
granularities:
$ref: '#/components/schemas/Granularities'
required:
- calculated
- date_from
- date_to
- granularities
- metrics
type: object
# yamllint disable-line rule:key-ordering
CalculatedDeveloperMetricsItem:
additionalProperties: false
description: Measured developer metrics for each `DeveloperMetricsRequest.for`.
Each repository group maps to a distinct `CalculatedDeveloperMetricsItem`.
example:
values:
- - date: 2020-01-23
values:
- 5
- 10
- - date: 2020-01-23
values:
- 20
- 100
for:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
developers:
- github.com/vmarkovtsev
- github.com/dpordomingo
granularity: all
properties:
for:
$ref: '#/components/schemas/ForSetDevelopers'
granularity:
$ref: '#/components/schemas/Granularity'
values:
description: The sequence matches `CalculatedDeveloperMetricsItem.for.developers`.
items:
description: The sequence steps from `date_from` till `date_to` by `granularity`.
items:
$ref: '#/components/schemas/CalculatedLinearMetricValues'
type: array
type: array
required:
- for
- granularity
- values
type: object
# yamllint disable-line rule:key-ordering
DeveloperSummaries:
description: List of developer activity statistics and profile details.
example:
- avatar: https://avatars0.githubusercontent.com/u/60340680?v=4
login: github.com/gkwillie
name: Groundskeeper Willie
updates:
prs: 4
commit_author: 10
commit_committer: 10
commenter: 3
items:
$ref: '#/components/schemas/DeveloperSummary'
type: array
# yamllint disable-line rule:key-ordering
DeveloperSummary:
additionalProperties: false
description: Developer activity statistics and profile details.
example:
avatar: https://avatars0.githubusercontent.com/u/60340680?v=4
login: github.com/gkwillie
name: Groundskeeper Willie
updates:
prs: 4
commit_author: 10
commit_committer: 10
commenter: 3
properties:
login:
description: Developer's login name.
example: github.com/gkwillie
type: string
name:
description: Developer's full name.
example: Groundskeeper Willie
nullable: true
type: string
avatar:
description: Developer's avatar URL.
example: https://avatars0.githubusercontent.com/u/60340680?v=4
format: url
type: string
updates:
$ref: '#/components/schemas/DeveloperUpdates'
jira_user:
description: Mapped JIRA user name.
type: string
required:
- avatar
- login
- name
- updates
type: object
# yamllint disable-line rule:key-ordering
DeveloperUpdates:
additionalProperties: false
description: 'Various developer contributions statistics over the specified
time period. Note: any of these properties may be missing if there was no
such activity.'
example:
prs: 4
commit_author: 10
commit_committer: 10
releaser: 3
properties:
prs:
description: 'How many PRs authored by this developer updated. Note: this
is not the same as the number of PRs this developer opened. Note: the
update origin is not necessarily this developer.'
minimum: 0
type: integer
reviewer:
description: 'How many reviews this developer submitted. Note: this is not
the same as the number of unique PRs reviewed.'
minimum: 0
type: integer
commit_author:
description: How many commits this developer authored.
minimum: 0
type: integer
commit_committer:
description: How many commits this developer pushed.
minimum: 0
type: integer
commenter:
description: 'How many regular PR comments this developer left. Note: issues
are not taken into account, only the PRs.'
minimum: 0
type: integer
releaser:
description: How many releases this developer created.
minimum: 0
type: integer
type: object
# yamllint disable-line rule:key-ordering
ReleaseSet:
additionalProperties: false
description: Release metadata and contributor user details.
example:
include:
users:
github.com/gkwillie:
avatar: https://avatars0.githubusercontent.com/u/60340680?v=4
deployments:
production-2020-03-26-W9J3uzHl:
components:
- repository: github.com/athenianco/athenian-api
reference: v0.10.34
environment: production
date_finished: 2022-01-23T05:01:07.000+00:00
date_started: 2022-01-23T04:56:07.000+00:00
conclusion: SUCCESS
labels:
helm_chart: 0.0.67
data:
- added_lines: 1000
commits: 20
deleted_lines: 200
name: v0.0.93
sha: e337123fc32c38cf6a8149b518f2e58ae836c8e6
published: 2020-03-25T10:57:00Z
publisher: github.com/vmarkovtsev
repository: github.com/athenianco/athenian-api
url: https://github.com/athenianco/athenian-api/releases/tag/v0.0.93
age: '1000s'
commit_authors:
- github.com/vmarkovtsev
prs: []
- added_lines: 1000
commits: 20
deleted_lines: 200
name: v0.0.93
sha: e337123fc32c38cf6a8149b518f2e58ae836c8e6
published: 2020-03-25T10:57:00Z
publisher: github.com/vmarkovtsev
repository: github.com/athenianco/athenian-api
url: https://github.com/athenianco/athenian-api/releases/tag/v0.0.93
age: '2000s'
commit_authors:
- github.com/vmarkovtsev
prs: []
properties:
include:
allOf:
- $ref: '#/components/schemas/IncludedNativeUsers'
- $ref: '#/components/schemas/IncludedJIRAIssues'
- $ref: '#/components/schemas/IncludedDeployments'
data:
description: List of matching release metadata.
items:
$ref: '#/components/schemas/FilteredRelease'
type: array
type: object
# yamllint disable-line rule:key-ordering
FilteredRelease:
additionalProperties: false
description: Various information about a repository release.
example:
added_lines: 1000
commits: 20
deleted_lines: 200
name: v0.0.93
sha: e337123fc32c38cf6a8149b518f2e58ae836c8e6
published: 2020-03-25T10:57:00Z
publisher: github.com/vmarkovtsev
repository: github.com/athenianco/athenian-api
url: https://github.com/athenianco/athenian-api/releases/tag/v0.0.93
age: '10000s'
commit_authors:
- github.com/vmarkovtsev
prs:
- additions: 34
author: github.com/se7entyse7en
created: 2020-05-21T18:29:00Z
deletions: 3
number: 176
title: Fix first account creation
deployments:
- production-2020-03-26-W9J3uzHl
properties:
added_lines:
description: Cumulative number of lines inserted since the previous release.
minimum: 0
type: integer
age:
description: Time since the previous release /\d+s/.
type: string
commits:
description: Number of commits since the previous release.
minimum: 0
type: integer
commit_authors:
description: List of released commit authors' logins.
items:
$ref: '#/components/schemas/DeveloperID'
type: array
deleted_lines:
description: Cumulative number of lines removed since the previous release.
minimum: 0
type: integer
deployments:
description: Deployments with this release.
items:
type: string
type: array
name:
description: Title of the release.
type: string
prs:
description: List of released pull requests.
items:
$ref: '#/components/schemas/ReleasedPullRequest'
type: array
published:
description: When the release was created.
format: date-time
type: string
publisher:
description: Login of the person who created the release.
nullable: true
type: string
repository:
description: Name of the repository where the release exists.
type: string
sha:
description: Release commit hash.
minLength: 40
maxLength: 40
type: string
url:
description: Link to the release.
format: url
type: string
required:
- added_lines
- age
- commit_authors
- commits
- deleted_lines
- name
- prs
- published
- publisher
- repository
- sha
- url
type: object
# yamllint disable-line rule:key-ordering
DeployedRelease:
additionalProperties: false
description: Various information about a repository release.
example:
added_lines: 1000
commits: 20
deleted_lines: 200
name: v0.0.93
sha: e337123fc32c38cf6a8149b518f2e58ae836c8e6
published: 2020-03-25T10:57:00Z
publisher: github.com/vmarkovtsev
repository: github.com/athenianco/athenian-api
url: https://github.com/athenianco/athenian-api/releases/tag/v0.0.93
age: '10000s'
commit_authors:
- github.com/vmarkovtsev
prs: 7
properties:
added_lines:
description: Cumulative number of lines inserted since the previous release.
minimum: 0
type: integer
age:
description: Time since the previous release /\d+s/.
type: string
commits:
description: Number of commits since the previous release.
minimum: 0
type: integer
commit_authors:
description: List of released commit authors' logins.
items:
$ref: '#/components/schemas/DeveloperID'
type: array
deleted_lines:
description: Cumulative number of lines removed since the previous release.
minimum: 0
type: integer
name:
description: Title of the release.
type: string
prs:
description: Number of deployed pull requests.
minimum: 0
type: integer
published:
description: When the release was created.
format: date-time
type: string
publisher:
description: Login of the person who created the release.
nullable: true
type: string
repository:
description: Name of the repository where the release exists.
type: string
sha:
description: Release commit hash.
minLength: 40
maxLength: 40
type: string
url:
description: Link to the release.
format: url
type: string
required:
- added_lines
- age
- commit_authors
- commits
- deleted_lines
- name
- prs
- published
- publisher
- repository
- sha
- url
type: object
# yamllint disable-line rule:key-ordering
ReleasedPullRequest:
description: Details about a pull request listed in `/filter/releases`.
properties:
additions:
type: integer
author:
anyOf:
- $ref: '#/components/schemas/DeveloperID'
- nullable: true
type: string
created:
description: When this PR was created.
format: date-time
type: string
deletions:
type: integer
jira:
description: Mapped JIRA issue IDs.
items:
type: string
type: array
number:
type: integer
title:
type: string
required:
- additions
- author
- created
- deletions
- number
- title
type: object
# yamllint disable-line rule:key-ordering
GetReleasesRequest:
additionalProperties: false
description: Request body of `/get/releases`. Declaration of which releases
the user wants to list.
example:
account: 1
releases:
- repository: github.com/athenianco/athenian-api
names:
- v0.7.53
- v0.6.10
properties:
account:
description: Account ID.
type: integer
releases:
description: List of repositories and release names to list.
items:
$ref: '#/components/schemas/ReleaseNames'
type: array
required:
- account
- releases
type: object
# yamllint disable-line rule:key-ordering
IncludedJIRAIssues:
description: Mentioned JIRA issues.
example:
jira:
DEV-344:
id: DEV-3440
title: Write the API specs to filter PRs by Jira epic, ticket type and
label.
epic: DEV-149
labels:
- API
type: task
properties:
jira:
additionalProperties:
$ref: '#/components/schemas/LinkedJIRAIssue'
description: Mapping JIRA issue ID -> details.
type: object
type: object
# yamllint disable-line rule:key-ordering
ReleaseMatchRequest:
additionalProperties: false
description: Release matching rule update.
example:
account: 1
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
match: branch
branches: master
tags: .*
properties:
account:
description: Account ID.
type: integer
repositories:
$ref: '#/components/schemas/RepositorySet'
branches:
description: |
Regular expression to match branch names.
The match starts from the beginning of the string.
Special value `{{ "{{default}}" }}` matches to the default branch name - usually, `main` or `master`.
Reference: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP
example: .*-production
type: string
tags:
description: |
Regular expression to match tag names.
The match starts from the beginning of the string.
Reference: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP
example: .*
type: string
events:
description: |
Regular expression to match event releases (submitted by the user via `/events/releases`).
The match starts from the beginning of the string.
Reference: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP
type: string
match:
$ref: '#/components/schemas/ReleaseMatchStrategy'
required:
- account
- match
- repositories
type: object
# yamllint disable-line rule:key-ordering
ReleaseMatchStrategy:
description: |-
Release workflow choice: how we should detect releases.
* `branch`: merges to certain branches are considered releases and nothing else.
* `event`: releases are manually registered with `POST /events/releases`.
* `tag`: tags with certain name patterns are considered releases and nothing else.
* `tag_or_branch`: follow "tag"; if the repository does not have tags, fallback to "branch".
enum:
- branch
- event
- tag
- tag_or_branch
type: string
# yamllint disable-line rule:key-ordering
ReleaseMatchSettings:
additionalProperties:
$ref: '#/components/schemas/ReleaseMatchSetting'
description: Mapping from repository names to their release match settings.
type: object
# yamllint disable-line rule:key-ordering
ReleaseMatchSetting:
additionalProperties: false
description: Release matching setting for a specific repository.
example:
branches: '{{ "{{default}}" }}'
default_branch: master
tags: .*
match: tag_or_branch
properties:
branches:
description: |
Regular expression to match branch names.
The match starts from the beginning of the string.
Special value `{{ "{{default}}" }}` matches to the default branch name - usually, `main` or `master`.
Reference: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP
example: .*-production
type: string
tags:
description: |
Regular expression to match tag names.
The match starts from the beginning of the string.
Reference: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP
example: .*
type: string
events:
description: |
Regular expression to match event releases (submitted by the user via `/events/releases`).
The match starts from the beginning of the string.
Reference: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP
type: string
match:
$ref: '#/components/schemas/ReleaseMatchStrategy'
default_branch:
description: |
Name of the default branch of this repository.
Returned in responses and ignored in requests.
type: string
required:
- branches
- match
- tags
type: object
# yamllint disable-line rule:key-ordering
AccountUserChangeRequest:
additionalProperties: false
description: Request to change an account member's status.
example:
user: github|60340680
account: 1
status: regular
properties:
account:
description: Account ID.
type: integer
user:
description: Account member ID.
type: string
status:
description: Account membership role.
enum:
- regular
- admin
- banished
type: string
required:
- account
- status
- user
type: object
# yamllint disable-line rule:key-ordering
Versions:
additionalProperties: false
example:
api: 0.2.10
metadata: '14'
properties:
api:
type: string
metadata:
type: string
required:
- api
- metadata
type: object
# yamllint disable-line rule:key-ordering
GetJIRAIssuesInclude:
description: |
Additional information to include in the response for the get_jira_issues operation:
* comments: include comments for every issue; returned issues will include a `comment_list`
if they have comments
* description: include the description for every issue; returned issues will include a
`rendered_description` property
* github_users: include details about the users mentioned in the linked pull requests
* jira_users: include details about mentioned Jira users
enum:
- comments
- description
- github_users
- jira_users
type: string
GetJIRAIssuesRequest:
additionalProperties: false
description: |
Request body for the get_jira_issues operation.
Declaration of which issues the user wants to retrieve.
example:
account: 1
include:
- 'jira_users'
issues:
- "DEV-1345"
- "DEV-567"
- "ENG-123"
properties:
account:
description: Account ID.
type: integer
include:
description: Additional informations to include in the response.
items:
$ref: '#/components/schemas/GetJIRAIssuesInclude'
type: array
issues:
description: |
List of issue identifiers (issue keys) to retrieve.
The order of the requested issues will be preserved in the response.
items:
type: string
minItems: 1
type: array
required:
- account
- issues
type: object
GetJIRAIssuesResponse:
additionalProperties: false
description: Response for the get_jira_issues operation.
example:
issues:
- comments: 0
created: '2023-02-21T09:25:30Z'
id: P1-2
acknowledge_time: 132200s
life_time: 259200s
priority: HIGH
project: '1'
prs:
- comments: 0
commits: 0
created: '2023-02-21T09:25:30Z'
events_now:
- created
files_changed: 1
number: 2
participants: []
repository: github.com/o/r
review_comments: 0
reviews: 0
size_added: 10
size_removed: 0
stage_timings:
wip: 259199s
stages_now:
- wip
title: PR 2 Title
updated: '2023-02-23T09:25:30Z'
reporter: Reporter N. 1
status: todo
title: Issue n. 2
type: Type 0
updated: '2023-02-23T09:25:30Z'
url: https://jira.com/issue-2
properties:
include:
additionalProperties: false
properties:
github_users:
additionalProperties:
$ref: '#/components/schemas/IncludedNativeUser'
description: |
Mapping with details of the GitHub users mentioned in the linked pull requests.
type: object
jira_users:
description: Mentioned users in the returned isssues.
items:
$ref: '#/components/schemas/JIRAUser'
type: array
type: object
issues:
items:
$ref: '#/components/schemas/JIRAIssue'
type: array
required:
- issues
type: object
GetPullRequestsRequest:
additionalProperties: false
description: |
Request body of `/get/pull_requests`. Declaration of which PRs the user wants to list.
The order of the requested PRs will be preserved in the response.
example:
account: 1
prs:
- repository: github.com/athenianco/athenian-api
numbers:
- 483
- 484
- 485
environments:
- production
properties:
account:
description: Account ID.
type: integer
prs:
description: List of repositories and PR numbers to list.
items:
$ref: '#/components/schemas/PullRequestNumbers'
minItems: 1
type: array
environments:
description: Deployment environments to apply. If omitted, any deployment counts.
items:
type: string
minItems: 1
type: array
required:
- account
- prs
type: object
# yamllint disable-line rule:key-ordering
PullRequestNumbers:
additionalProperties: false
description: Repository name and a list of PR numbers in that repository.
example:
repository: github.com/athenianco/athenian-api
numbers:
- 483
- 484
- 485
properties:
repository:
$ref: '#/components/schemas/RepositoryID'
numbers:
items:
type: integer
type: array
required:
- numbers
- repository
type: object
# yamllint disable-line rule:key-ordering
ReleaseNames:
additionalProperties: false
description: Repository name and a list of release names in that repository.
example:
repository: github.com/athenianco/athenian-api
names:
- v0.7.53
- v0.6.10
properties:
repository:
$ref: '#/components/schemas/RepositoryID'
names:
description: List of release names. For tag releases, those are the tag
names. For branch releases, those are commit hashes.
items:
type: string
type: array
required:
- names
- repository
type: object
# yamllint disable-line rule:key-ordering
FilterLabelsRequest:
additionalProperties: false
description: Request body of `/filter/labels`. Defines the account and the repositories
where to look for the labels.
example:
account: 1
repositories:
- github.com/athenianco/athenian-api
- github.com/athenianco/athenian-webapp
properties:
account:
description: Account ID.
type: integer
repositories:
$ref: '#/components/schemas/RepositorySet'
required:
- account
type: object
# yamllint disable-line rule:key-ordering
FilteredLabel:
additionalProperties: false
description: Details about a label and some basic stats.
example:
name: bug
color: ff0000
used_prs: 100
properties:
name:
type: string
description:
type: string
color:
$ref: '#/components/schemas/Color'
used_prs:
minimum: 0
type: integer
required:
- color
- name
- used_prs
type: object
# yamllint disable-line rule:key-ordering
FilteredLabels:
description: List of labels.
example:
- name: bug
color: ff0000
used_prs: 100
- name: enhancement
description: New project feature.
color: 00ff00
used_prs: 200
items:
$ref: '#/components/schemas/FilteredLabel'
type: array
# yamllint disable-line rule:key-ordering
JIRAFilter:
additionalProperties: false
description: |
Filters related to JIRA traits. The aggregation between each filter type is *AND*.
example:
epics:
- DEV-167
- DEV-230
labels_include:
- api,performance
- metadata
labels_exclude:
- feature
issue_types:
- Bug
- Task
priorities:
- high
- low
projects:
- DEV
- ENG
status_categories:
- In Progress
properties:
epics:
description: JIRA issues must be included in the epics from the list.
items:
type: string
type: array
labels_include:
description: |
Only issues having at least one label from the list will be included
Several labels may be concatenated by a comma `,` so that all of them
are required.
items:
type: string
type: array
labels_exclude:
description: Issues having one label from the list will be excluded.
items:
type: string
type: array
issue_types:
description: |
Issues must have one of the given types, e.g. Bug, Task, Design Document, etc.
items:
type: string
type: array
priorities:
description: Issues must have a priority from the given list.
items:
type: string
type: array
projects:
description: Issues must be contained in a project in the given project keys list.
items:
type: string
type: array
status_categories:
description: The JIRA issues must have a status belonging to one of these categories.
items:
$ref: '#/components/schemas/JIRAStatusCategory'
type: array
unmapped:
description: Select PRs that are not mapped to any JIRA issue. May not be
specified with anything else.
type: boolean
type: object
JIRAGroups:
description: |
Calculate metrics separately for each JIRA Filter in the list.
Not compatible with `jira` field.
items:
$ref: '#/components/schemas/JIRAFilter'
type: array
# yamllint disable-line rule:key-ordering
LinkedJIRAIssue:
additionalProperties: false
description: Brief details about a JIRA issue.
example:
id: DEV-344
title: Write the API specs to filter PRs by Jira epic, ticket type and label
epic: DEV-149
labels:
- API
type: task
properties:
id:
description: JIRA issue key `PROJECT-###`.
type: string
title:
description: Title of this issue.
type: string
epic:
description: Identifier of the epic that owns this issue.
type: string
labels:
description: List of JIRA labels in this issue.
items:
type: string
type: array
type:
description: Type of this issue.
type: string
required:
- id
- title
- type
type: object
# yamllint disable-line rule:key-ordering
JIRAIssueType:
additionalProperties: false
description: Details about a JIRA issue type.
example:
name: Bug
normalized_name: bug
count: 12
image: https://athenianco.atlassian.net/secure/viewavatar?size=medium&avatarId=10303&avatarType=issuetype
project: '10009'
is_subtask: false
is_epic: false
properties:
name:
description: Name of the issue type.
type: string
normalized_name:
description: Normalized name of the issue type. For example, "Sub-tásks"
becomes "subtask".
type: string
count:
description: Number of issues that satisfy the filters and belong to this
type.
minimum: 1
type: integer
image:
description: Icon URL.
format: url
type: string
project:
description: Bound project identifier.
type: string
is_subtask:
description: Value indicating whether this issue type refers to a sub-task.
type: boolean
is_epic:
description: Value indicating whether this issue type refers to an epic.
type: boolean
required:
- count
- image
- is_epic
- is_subtask
- name
- normalized_name
- project
type: object
# yamllint disable-line rule:key-ordering
ProductFeatures:
description: Enabled client-side product features.
example:
- name: expires_at
parameters: '2030-01-01T00:00:00Z'
- name: jira
parameters:
epics: true
labels: false
items:
$ref: '#/components/schemas/ProductFeature'
type: array
# yamllint disable-line rule:key-ordering
ProductFeature:
additionalProperties: false
description: Client-side product feature definition.
example:
name: jira
parameters:
epics: true
labels: false
properties:
name:
type: string
parameters:
oneOf:
- type: number
- type: string
- type: object
required:
- name
- parameters
type: object
# yamllint disable-line rule:key-ordering
CreateTokenRequest:
additionalProperties: false
description: Request body of `/token/create` - creating a new Personal Access
Token.
example:
account: 1
name: Release webhook
properties:
account:
description: Account ID.
type: integer
name:
type: string
required:
- account
- name
type: object
# yamllint disable-line rule:key-ordering
CreatedToken:
additionalProperties: false
description: Value and ID of the generated Personal Access Token.
example:
id: 1007
token: 99129c581b6d2950233dac583629ba591319b2c6
properties:
id:
description: Token identifier - can be used in `/token/{id}` DELETE.
type: integer
token:
description: Secret token - not stored server-side!
type: string
required:
- id
- token
type: object
# yamllint disable-line rule:key-ordering
ListedTokens:
items:
$ref: '#/components/schemas/ListedToken'
type: array
# yamllint disable-line rule:key-ordering
ListedToken:
additionalProperties: false
description: Details about a token - without the token itself, which is not
stored.
example:
last_used: 2020-06-23T04:56:07Z
name: webhook
id: 1008
properties:
id:
description: Token identifier - can be used in `/token/{id}` DELETE.
type: integer
name:
description: Name of the token (see `/token/create`).
type: string
last_used:
description: When this token was used last time.
format: date-time
type: string
required:
- id
- last_used
- name
type: object
# yamllint disable-line rule:key-ordering
PatchTokenRequest:
additionalProperties: false
description: Request body of `/token/{id}` PATCH. Allows changing the token
name.
example:
name: release-webhook
properties:
name:
description: New name of the token.
type: string
type: object
# yamllint disable-line rule:key-ordering
TimeZone:
description: Local time zone offset in minutes, used to adjust `date_from` and
`date_to`.
maximum: 780
minimum: -720
type: integer
# yamllint disable-line rule:key-ordering
TimeDuration:
description: Time duration value.
pattern: ^\d+s$
type: string
# yamllint disable-line rule:key-ordering
PullRequestHistogramsRequest:
additionalProperties: false
description: Request of `/histograms/pull_requests`.
example:
for:
- repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
with:
author:
- github.com/vmarkovtsev
- github.com/dpordomingo
labels_include:
- bug
histograms:
- scale: log
metric: pr-lead-time
account: 1
date_to: 2020-11-23
date_from: 2020-01-23
timezone: 120
exclude_inactive: true
properties:
for:
description: |-
Sets of developers and repositories for which to calculate the histograms.
The aggregation is `AND` between repositories and developers.
The aggregation is `OR` inside both repositories and developers.
items:
$ref: '#/components/schemas/ForSetPullRequests'
type: array
histograms:
description: Histogram parameters for each wanted topic.
items:
$ref: '#/components/schemas/PullRequestHistogramDefinition'
type: array
date_from:
description: Date from when to start measuring the distribution.
format: date
type: string
date_to:
description: Date until which to measure the distribution.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
exclude_inactive:
description: Value indicating whether PRs without events in the given time
frame shall be ignored.
type: boolean
quantiles:
$ref: '#/components/schemas/Quantiles'
account:
description: Session account ID.
type: integer
fresh:
description: Force histograms calculation on the most up to date data.
type: boolean
required:
- account
- date_from
- date_to
- exclude_inactive
- for
- histograms
type: object
# yamllint disable-line rule:key-ordering
PullRequestHistogramDefinition:
additionalProperties: false
description: 'Histogram parameters: topic, bins.'
example:
metric: pr-size
ticks:
- 1
- 10
- 50
- 100
- 500
properties:
metric:
$ref: '#/components/schemas/PullRequestMetricID'
scale:
allOf:
- $ref: '#/components/schemas/HistogramScale'
- description: Histogram's X axis scale.
bins:
description: Number of bars in the histogram. 0 or null means automatic.
minimum: 0
type: integer
ticks:
description: |-
Alternatively to `bins` and `scale`, set the X axis bar borders manually.
Only one of two may be specified. The ticks are automatically prepended
the distribution minimum and appended the distribution maximum.
items:
oneOf:
- type: number
- $ref: '#/components/schemas/TimeDuration'
minItems: 1
type: array
required:
- metric
type: object
# yamllint disable-line rule:key-ordering
HistogramScale:
description: 'X axis scale: linear or logarithmic.'
enum:
- linear
- log
example: log
type: string
# yamllint disable-line rule:key-ordering
CalculatedPullRequestHistograms:
description: Response from `/histograms/pull_requests`.
items:
$ref: '#/components/schemas/CalculatedPullRequestHistogram'
type: array
# yamllint disable-line rule:key-ordering
CalculatedPullRequestHistogram:
additionalProperties: false
description: Calculated histogram over PR activities.
example:
for:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
metric: pr-size
scale: linear
ticks:
- 0
- 1
- 10
- 50
- 100
- 500
- 10000
frequencies:
- 0
- 38
- 28
- 13
- 12
- 8
interquartile:
left: 3
right: 76
properties:
for:
$ref: '#/components/schemas/ForSetPullRequests'
metric:
$ref: '#/components/schemas/PullRequestMetricID'
scale:
$ref: '#/components/schemas/HistogramScale'
ticks:
description: Series of horizontal bar borders aka X axis. Their count is
`len(y) + 1` because there are `N` intervals between `(N + 1)` ticks.
items:
oneOf:
- type: number
- $ref: '#/components/schemas/TimeDuration'
type: array
frequencies:
description: Series of histogram bar heights aka Y axis.
items:
oneOf:
- type: number
minimum: 0
- $ref: '#/components/schemas/TimeDuration'
type: array
interquartile:
$ref: '#/components/schemas/Interquartile'
required:
- for
- frequencies
- interquartile
- metric
- scale
- ticks
type: object
# yamllint disable-line rule:key-ordering
Interquartile:
additionalProperties: false
description: Middle 50% range.
example:
left: 3
right: 76
properties:
left:
oneOf:
- type: number
- $ref: '#/components/schemas/TimeDuration'
right:
oneOf:
- type: number
- $ref: '#/components/schemas/TimeDuration'
required:
- left
- right
type: object
# yamllint disable-line rule:key-ordering
FilteredJIRAStuff:
additionalProperties: false
description: |-
Response from `/filter/jira`: found JIRA epics, labels, issue types, priorities,
and mentioned users.
example:
epics:
- id: DEV-158
title: Precomputed DB - stage 2
created: 2020-05-21T18:27:00Z
updated: 2020-08-03T23:47:00Z
reporter: Vadim Markovtsev
assignee: Vadim Markovtsev
comments: 1
prs: 0
priority: Low
status: Backlog
type: Epic
acknowledge_time: '132200s'
life_time: '59172893s'
url: https://example.com/?my-jira#DEV-158
project: '10012'
story_points: 5
children:
- id: DEV-157
title: New repository for the precomputing service
created: 2020-05-21T18:29:00Z
updated: 2020-11-25T13:49:00Z
reporter: Vadim Markovtsev
assignee: Oleksandr Chabaiev
comments: 10
priority: Low
status: Released
prs: 0
type: Task
url: https://example.com/?my-jira#DEV-157
acknowledge_time: '132200s'
life_time: '59172892s'
subtasks: 42
- id: DEV-156
title: Design the architecture of the precomputing service
created: 2020-05-21T18:27:00Z
updated: 2020-09-09T00:05:00Z
reporter: Vadim Markovtsev
assignee: Vadim Markovtsev
comments: 0
priority: Low
status: Released
prs: 0
type: Task
url: https://example.com/?my-jira#DEV-156
acknowledge_time: '132200s'
life_time: '59172891s'
subtasks: 3
story_points: 5
issues: []
labels:
- title: performance
last_used: 2020-08-10T12:47:00Z
issues_count: 300
kind: regular
- title: performance
last_used: 2020-08-10T12:47:00Z
issues_count: 300
kind: regular
issue_types:
- name: Bug
normalized_name: bug
count: 12
image: https://athenianco.atlassian.net/secure/viewavatar?size=medium&avatarId=10303&avatarType=issuetype
project: '10009'
is_subtask: false
is_epic: false
- name: Task
normalized_name: task
count: 6
image: https://athenianco.atlassian.net/secure/viewavatar?size=medium&avatarId=10318&avatarType=issuetype
project: '10009'
is_subtask: false
is_epic: false
priorities:
- name: None
image: https://athenianco.atlassian.net/images/icons/priorities/trivial.svg
rank: 3
color: 'FFAA00'
- name: High
image: https://athenianco.atlassian.net/images/icons/priorities/high.svg
rank: 5
color: '001123'
statuses:
- name: Released
stage: Done
project: '10009'
users:
- name: Vadim Markovtsev
avatar: https://avatar-management-avatars.us-west-2.prod.public.atl-paas.net/5de504edde32fb0d03a3b4e3/8c3ffc1b-2ac0-488e-ac55-295ff06f9e28/48
type: atlassian
- name: Lou Marvin Caraig
avatar: https://avatar-management-avatars.us-west-2.prod.public.atl-paas.net/5ddec0b9be6c1f0d071ff82d/24b3b66a-a251-486c-ae1f-5daa954eba54/48
type: atlassian
properties:
epics:
description: List of epics satisfying the filters.
items:
$ref: '#/components/schemas/JIRAEpic'
type: array
issues:
description: List of issues satisfying the filters.
items:
$ref: '#/components/schemas/JIRAIssue'
type: array
issue_types:
description: Mentioned issue types.
items:
$ref: '#/components/schemas/JIRAIssueType'
type: array
labels:
description: Mentioned issue labels.
items:
$ref: '#/components/schemas/JIRALabel'
type: array
priorities:
description: Mentioned issue priorites sorted by importance in ascending
order.
items:
$ref: '#/components/schemas/JIRAPriority'
type: array
statuses:
description: Mentioned issue statuses sorted by name.
items:
$ref: '#/components/schemas/JIRAStatus'
type: array
users:
description: Mentioned users in the filtered issues.
items:
$ref: '#/components/schemas/JIRAUser'
type: array
deployments:
$ref: '#/components/schemas/IncludedDeployments'
required:
- epics
- issues
- issue_types
- labels
- priorities
- statuses
- users
type: object
# yamllint disable-line rule:key-ordering
JIRAComment:
additionalProperties: false
properties:
author:
description: The name of the user who created the comment.
type: string
created:
description: The date and time at which the comment was created.
format: date-time
type: string
rendered_body:
description: The comment text.
type: string
required:
- author
- created
- rendered_body
type: object
JIRAEpic:
allOf:
- $ref: '#/components/schemas/JIRAEpicIssueCommon'
- properties:
project:
description: Identifier of the project where this epic exists.
type: string
children:
description: Details about the child issues.
items:
$ref: '#/components/schemas/JIRAEpicChild'
type: array
prs:
description: Overall number of mapped pull requests (including the children).
type: integer
required:
- project
- prs
description: Details about a JIRA epic together with its child issues.
example:
id: DEV-158
title: Precomputed DB - stage 2
created: 2020-05-21T18:27:00Z
updated: 2020-08-03T23:47:00Z
reporter: Vadim Markovtsev
assignee: Vadim Markovtsev
comments: 1
prs: 0
priority: Low
status: Backlog
type: Epic
acknowledge_time: 132200s
life_time: 10000s
url: https://example.com/?my-jira#DEV-158
project: '1002'
children:
- id: DEV-157
title: New repository for the precomputing service
created: 2020-05-21T18:29:00Z
updated: 2020-11-25T13:49:00Z
reporter: Vadim Markovtsev
assignee: Oleksandr Chabaiev
comments: 10
priority: Low
status: Released
prs: 0
type: Task
url: https://example.com/?my-jira#DEV-157
acknowledge_time: 132200s
life_time: 10000s
subtasks: 0
- id: DEV-156
title: Design the architecture of the precomputing service
created: 2020-05-21T18:27:00Z
updated: 2020-09-09T00:05:00Z
reporter: Vadim Markovtsev
assignee: Vadim Markovtsev
comments: 0
priority: Low
status: Released
prs: 0
type: Task
url: https://example.com/?my-jira#DEV-156
acknowledge_time: 132200s
life_time: 20000s
subtasks: 2
type: object
# yamllint disable-line rule:key-ordering
JIRAEpicChild:
allOf:
- $ref: '#/components/schemas/JIRAEpicIssueCommon'
- properties:
subtasks:
description: Number of sub-tasks.
type: integer
prs:
description: Number of mapped pull requests.
type: integer
required:
- prs
- subtasks
description: Details about a JIRA issue contained in an epic.
example:
id: DEV-157
title: New repository for the precomputing service
created: 2020-05-21T18:29:00Z
updated: 2020-11-25T13:49:00Z
reporter: Vadim Markovtsev
assignee: Oleksandr Chabaiev
comments: 10
priority: Low
status: Released
prs: 0
type: Task
acknowledge_time: 132200s
life_time: 10000s
url: https://example.com/?my-jira#DEV-157
subtasks: 2
type: object
# yamllint disable-line rule:key-ordering
JIRAIssue:
allOf:
- $ref: '#/components/schemas/JIRAEpicIssueCommon'
- properties:
project:
description: Identifier of the project where this issue exists.
type: string
prs:
description: Details about the mapped PRs. `jira` field is unfilled.
items:
$ref: '#/components/schemas/PullRequest'
type: array
required:
- project
# yamllint disable-line rule:key-ordering
JIRAEpicIssueCommon:
description: Common properies if a JIRA issue or epic.
properties:
id:
description: JIRA issue key `PROJECT-###`.
type: string
title:
description: Title of this issue.
type: string
created:
description: When this issue was created.
format: date-time
type: string
updated:
description: When this issue was last updated.
format: date-time
type: string
work_began:
description: |-
When the issue entered the "In Progress" stage or received a PR.
This timestamp can be missing and is always less than or equal to `resolved`.
format: date-time
type: string
resolved:
description: |-
When the issue finished: the stage is "Done" and all PRs are either released or rejected.
This timestamp can be missing and is always greater than or equal to `work_began`.
format: date-time
type: string
acknowledge_time:
allOf:
- description: |-
Issue's time spent between `work_began` and `created`. If work on issue has not
begun, time between `now()` and `created. See also `jira-acknowledge-time` metric.
- $ref: '#/components/schemas/TimeDuration'
lead_time:
allOf:
- description: |-
Issue's time spent between `work_began` and `resolved`. If not resolved,
between `work_began` and `now()`.
- $ref: '#/components/schemas/TimeDuration'
life_time:
allOf:
- description: |-
Issue's time spent between `created` and `resolved`. If not resolved,
between `created` and `now()`.
- $ref: '#/components/schemas/TimeDuration'
reporter:
description: Name of the person who reported the issue.
type: string
assignee:
description: Name of the assigned person.
type: string
comments:
description: Number of comments in the issue excluding sub-tasks and children.
type: integer
comment_list:
description: The list of comments for the issue.
items:
$ref: '#/components/schemas/JIRAComment'
type: array
priority:
description: Name of the priority. The details are returned in `FilteredJIRAStuff.priorities`.
nullable: true
type: string
rendered_description:
description: The description of the issue rendered as HTML.
type: string
status:
description: Name of the status. The details are returned in `FilteredJIRAStuff.statuses`.
type: string
story_points:
description: Value of the "story points" field.
type: number
type:
description: Name of the issue type. The details are returned in `FilteredJIRAStuff.issue_types`.
type: string
url:
description: Link to the issue in JIRA web application.
format: url
type: string
required:
- comments
- created
- id
- acknowledge_time
- life_time
- priority
- reporter
- status
- title
- type
- updated
- url
type: object
# yamllint disable-line rule:key-ordering
JIRALabel:
additionalProperties: false
description: Details about a JIRA label.
example:
title: performance
last_used: 2020-08-10T12:47:00Z
issues_count: 300
kind: Label
properties:
title:
type: string
last_used:
description: When this label was last assigned to an issue.
format: date-time
type: string
issues_count:
description: In how many issues (in the specified time interval) this label
was used.
type: integer
kind:
description: Label kind - "Label", "Component", etc.
type: string
required:
- issues_count
- last_used
- title
type: object
# yamllint disable-line rule:key-ordering
JIRAPriority:
additionalProperties: false
description: JIRA issue priority details.
example:
name: High
image: https://athenianco.atlassian.net/images/icons/priorities/high.svg
rank: 2
color: EA4444
properties:
name:
description: Name of the priority.
type: string
image:
description: URL of the picture that indicates the priority.
format: url
type: string
rank:
description: Measure of importance (smaller is more important).
minimum: 1
type: integer
color:
$ref: '#/components/schemas/Color'
required:
- color
- image
- name
- rank
type: object
# yamllint disable-line rule:key-ordering
JIRAStatus:
additionalProperties: false
description: JIRA issue status details.
example:
name: Released
stage: Done
project: '10009'
properties:
name:
description: Exact status name.
type: string
stage:
$ref: '#/components/schemas/JIRAStatusCategory'
project:
description: Identifier of the project where this status exists.
type: string
required:
- name
- project
- stage
type: object
# yamllint disable-line rule:key-ordering
JIRAStatusCategory:
description: The category of a JIRA issue status.
enum:
- To Do
- In Progress
- Done
- No Category
type: string
JIRAUser:
additionalProperties: false
description: Details about a JIRA user.
example:
name: Vadim Markovtsev
avatar: https://avatar-management-avatars.us-west-2.prod.public.atl-paas.net/5de504edde32fb0d03a3b4e3/8c3ffc1b-2ac0-488e-ac55-295ff06f9e28/48
type: atlassian
properties:
name:
description: Full name of the user.
type: string
avatar:
description: User's profile picture URL.
format: url
type: string
type:
description: |-
* `atlassian` indicates a regular account backed by a human.
* `app` indicates a service account.
* `customer` indicates an external service desk account.
enum:
- atlassian
- app
- customer
type: string
developer:
allOf:
- $ref: '#/components/schemas/DeveloperID'
- description: Mapped developer identity.
required:
- avatar
- name
- type
type: object
# yamllint disable-line rule:key-ordering
FilterJIRAStuff:
additionalProperties: false
description: Request of `/filter/jira` to retrieve epics, labels, types, priorities,
users, etc.
example:
account: 1
date_from: 2020-01-01
date_to: 2020-12-01
timezone: 120
exclude_inactive: true
properties:
account:
description: Session account ID.
type: integer
date_from:
description: '`null` disables the time filter boundary, thus everything
is returned. `date_from` and `date_to` must be both either `null` or not
`null`.'
format: date
nullable: true
type: string
date_to:
description: '`null` disables the time filter boundary, thus everything
is returned. `date_from` and `date_to` must be both either `null` or not
`null`.'
format: date
nullable: true
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
priorities:
description: Selected issue priorities.
items:
type: string
type: array
types:
description: Selected issue types. Ignored for epics.
items:
type: string
type: array
labels_include:
description: JIRA issues must contain at least one label from the list.
Several labels may be concatenated by a comma `,` so that all of them
are required.
items:
type: string
type: array
labels_exclude:
description: JIRA issues may not contain labels from this list.
items:
type: string
type: array
exclude_inactive:
description: Value indicating whether issues with the last update older
than `date_from` should be ignored. If `date_from` and `date_to` are `null`,
does nothing.
type: boolean
with:
allOf:
- description: JIRA issue participants.
- $ref: '#/components/schemas/JIRAFilterWith'
type: object
projects:
description: Issues must belong to these JIRA projects.
items:
example: DEV
type: string
type: array
return:
description: Specifies which items are required, an empty or missing array
means everything.
items:
$ref: '#/components/schemas/JIRAFilterReturn'
type: array
required:
- account
- date_from
- date_to
- exclude_inactive
type: object
# yamllint disable-line rule:key-ordering
JIRAFilterReturn:
description: |-
Requested chapter to return in `/filter/jira`.
* `epics`: Activates the epic flow.
* `issues`: Activates the issue flow.
* `issue_bodies`: Include the details about filtered issues.
* `labels`: Include the details about the mentioned issue labels.
* `issue_types`: Include the details about the mentioned issue types.
* `priorities`: Include the details about the mentioned issue priorities.
* `statuses`: Include the details about the mentioned issue statuses.
* `users`: Include the details about the issue participants.
* `only_flying`: Exclude the epics' children and epics themselves from `issues`.
If neither `epics` nor `issues` are specified, nothing is returned.
If `epics` is not specified, the corresponding `epics` list is not populated.
The difference is that `issues` flow examines all the issues that satisfy the given filters,
whereas `epics` flow examines only the epics that satisfy the given filters, and their children.
`only_flying` does not affect the `epics` flow.
enum:
- epics
- issues
- issue_bodies
- labels
- issue_types
- priorities
- statuses
- users
- only_flying
type: string
# yamllint disable-line rule:key-ordering
ReleaseMetricsRequest:
additionalProperties: false
description: Request of `/metrics/releases` to calculate metrics on releases.
example:
for:
- - athenianco/athenian-api
- athenianco/athenian-webapp
with:
- pr_author:
- github.com/se7entyse7en
releaser:
- github.com/gkwillie
metrics:
- release-count
granularities:
- day
date_from: 2020-01-01
date_to: 2020-10-01
account: 1
not:
$ref: '#/components/schemas/WithBothJiraAndJiragroups'
properties:
for:
description: |
List of repository groups for which to calculate the metrics.
An empty repository (empty array) group will match nothing.
Use `null` as repository group to match every repository.
items:
oneOf:
- $ref: '#/components/schemas/RepositorySet'
- enum:
- null
nullable: true
type: string
type: array
with:
description: List of developer groups for which to calculate the metrics.
items:
$ref: '#/components/schemas/ReleaseWith'
type: array
labels_include:
description: At least one of these labels must be present in at least one
released PR.
items:
type: string
type: array
labels_exclude:
description: None of these labels must be present in each released PR.
items:
type: string
type: array
jira:
$ref: '#/components/schemas/JIRAFilter'
jiragroups:
$ref: '#/components/schemas/JIRAGroups'
metrics:
description: List of desired release metrics.
items:
$ref: '#/components/schemas/ReleaseMetricID'
type: array
date_from:
description: Date from when to start measuring the metrics.
format: date
type: string
date_to:
description: Date until which to measure the metrics.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
granularities:
$ref: '#/components/schemas/Granularities'
quantiles:
$ref: '#/components/schemas/Quantiles'
account:
description: Session account ID.
type: integer
required:
- account
- date_from
- date_to
- for
- granularities
- metrics
type: object
# yamllint disable-line rule:key-ordering
ReleaseMetricID:
description: |-
Currently supported release metric types.
* `release-count` - number of all releases in the time interval.
* `release-tag-count` - number of releases by tag in the time interval.
* `release-branch-count` - number of releases by branch merge in the time interval.
* `release-prs` - number of PRs released in the time interval.
* `release-tag-prs` - number of PRs released by tag in the time interval.
* `release-branch-prs` - number of PRs released by branch merge in the time interval.
* `release-commits` - number of commits which were released in the time interval.
* `release-tag-commits` - number of commits which were released by tag in the time interval.
* `release-branch-commits` - number of commits which were released by branch merge in the time interval.
* `release-lines` - sum of the changed (added or removed) diff lines of the commits released in the time interval.
* `release-tag-lines` - sum of the changed (added or removed) diff lines of the commits released by tag in the time interval.
* `release-branch-lines` - sum of the changed (added or removed) diff lines of the commits released by branch merge in the time interval.
* `release-avg-prs` - average (by release) number of PRs released in the time interval. Quantiles are applied.
* `release-tag-avg-prs` - average (by release) number of PRs released by tag in the time interval. Quantiles are applied.
* `release-branch-avg-prs` - average number of PRs released by branch merge in the time interval. Quantiles are applied.
* `release-avg-commits` - average (by release) number of commits released in the time interval. Quantiles are applied.
* `release-tag-avg-commits` - average (by release) number of commits released by tag in the time interval. Quantiles are applied.
* `release-branch-avg-commits` - average (by release) number of commits released by branch merge in the time interval. Quantiles are applied.
* `release-avg-lines` - average (by release) number of changed (added + removed) diff lines of the commits released in the time interval. Quantiles are applied.
* `release-tag-avg-lines` - average (by release) number of changed (added + removed) diff lines of the commits released by tag in the time interval. Quantiles are applied.
* `release-branch-avg-lines` - average (by release) number of changed (added + removed) diff lines of the commits released by branch merge in the time interval. Quantiles are applied.
* `release-age` - average timedelta between releases of the same alignment (as determined by the commit DAG). Quantiles are applied.
* `release-tag-age` - average timedelta between releases by tag of the same alignment (as determined by the commit DAG). Quantiles are applied.
* `release-branch-age` - average timedelta between releases by branch of the same alignment (as determined by the commit DAG). Quantiles are applied.
* `release-time-to-deploy` - average time passed since release happened until deployed.
enum:
- release-count
- release-tag-count
- release-branch-count
- release-prs
- release-tag-prs
- release-branch-prs
- release-commits
- release-tag-commits
- release-branch-commits
- release-lines
- release-tag-lines
- release-branch-lines
- release-avg-prs
- release-tag-avg-prs
- release-branch-avg-prs
- release-avg-commits
- release-tag-avg-commits
- release-branch-avg-commits
- release-avg-lines
- release-tag-avg-lines
- release-branch-avg-lines
- release-age
- release-tag-age
- release-branch-age
- release-time-to-deploy
type: string
# yamllint disable-line rule:key-ordering
CalculatedReleaseMetrics:
description: |
Response from `/metrics/releases`.
The order of the items is *not* guaranteed to match any expectations.
items:
$ref: '#/components/schemas/CalculatedReleaseMetric'
type: array
# yamllint disable-line rule:key-ordering
CalculatedReleaseMetric:
additionalProperties: false
description: Calculated release metric values.
example:
for:
- athenianco/athenian-api
- athenianco/athenian-webapp
metrics:
- release-count
granularity: day
matches:
athenianco/athenian-api: branch
athenianco/athenian-webapp: event
values:
- confidence_maxs:
- 1.0
- 1.0
confidence_mins:
- 0.5
- 0.5
confidence_scores:
- 75
- 75
date: 2020-01-23
values:
- 0.8008282
- 0.8008282
properties:
for:
$ref: '#/components/schemas/RepositorySet'
with:
$ref: '#/components/schemas/ReleaseWith'
jira:
$ref: '#/components/schemas/JIRAFilter'
matches:
additionalProperties:
$ref: '#/components/schemas/ReleaseMatchStrategy'
description: Applied release matching strategies for the repositories in
`for`.
type: object
metrics:
items:
$ref: '#/components/schemas/ReleaseMetricID'
type: array
granularity:
$ref: '#/components/schemas/Granularity'
values:
description: The sequence steps from `date_from` till `date_to` by `granularity`.
items:
$ref: '#/components/schemas/CalculatedLinearMetricValues'
type: array
required:
- granularity
- matches
- metrics
- values
type: object
# yamllint disable-line rule:key-ordering
PaginatePullRequestsRequest:
additionalProperties: false
description: |-
Request of `/paginate/pull_requests`. According to the target batch size,
compute the optimal PR updated timestamp ranges. `request` should match
the body to be sent to `/filter/pull_requests`. `updated_from` and `updated_to`
inside `request` are ignored.
example:
request:
account: 1
date_from: 2020-01-23
date_to: 2020-05-23
exclude_inactive: true
in:
- '{1}'
- github.com/athenianco/athenian-webapp
stages:
- wip
with:
author:
- github.com/vmarkovtsev
batch: 100
properties:
batch:
description: Target batch size. The returned ranges do not guarantee the
exact match.
minimum: 1
type: integer
request:
$ref: '#/components/schemas/FilterPullRequestsRequest'
required:
- batch
- request
type: object
# yamllint disable-line rule:key-ordering
PullRequestPaginationPlan:
additionalProperties: false
description: Response of `/paginate/pull_requests`. Computed split of the PR
updated timestamp range.
example:
updated:
- 2020-10-08
- 2020-10-07
- 2020-10-01
properties:
updated:
description: Split borders in *descending* order.
items:
format: date
type: string
type: array
type: object
# yamllint disable-line rule:key-ordering
IndexedGroups:
description: |-
Lists of indexes in `repositories` or `developers` that define independent groups
that must be processed individually. The groups may have intersections.
example:
- - 0
- 1
- - 1
items:
items:
minimum: 0
type: integer
minItems: 1
type: array
minItems: 1
type: array
# yamllint disable-line rule:key-ordering
ReleaseWith:
additionalProperties: false
description: |
Release contribution roles. The aggregation is `OR` everywhere.
It is possible to mention whole teams using the syntax `{id}` where `id` is a team identifier (see `/teams`).
example:
pr_author:
- github.com/se7entyse7en
releaser:
- github.com/gkwillie
properties:
pr_author:
allOf:
- $ref: '#/components/schemas/DeveloperSet'
- description: Authors of released pull requests.
commit_author:
allOf:
- $ref: '#/components/schemas/DeveloperSet'
- description: Authors of released commits.
releaser:
allOf:
- $ref: '#/components/schemas/DeveloperSet'
- description: Release publishers.
type: object
# yamllint disable-line rule:key-ordering
JIRAMetricID:
description: |-
Currently supported JIRA activity metrics.
* `jira-open` - number of issues active by the end of the time interval.
* `jira-resolved` - number of issues closed in the given time range.
* `jira-raised` - number of issues reported in the given time range.
* `jira-acknowledged` - number of issues that are "In Progress" or "Resolved". This number matches the issues considered to calculate `jira-acknowledge-time` before applying the quantiles.
* `jira-acknowledged-q` - number of issues that are "In Progress" or "Resolved". This number matches the issues considered to calculate `jira-acknowledge-time` after applying the quantiles.
* `jira-life-time` - Mean Life Time - the time between min(issue creation, work began) and max(issue resolution, fixes released).
* `jira-life-time-below-threshold-ratio` - ratio of issues with a `jira-life-time` below the threshold, disregarding the quantiles. The default threshold is 5 days.
* `jira-lead-time` - Mean Lead Time - the time between when the work began and max(issue resolution, fixes released).
* `jira-lead-time-below-threshold-ratio` - ratio of issues with a `jira-lead-time` below the threshold, disregarding the quantiles. The default threshold is 5 days.
* `jira-acknowledge-time` - Mean Acknowledge Time - the time between when the issue was created and the work began = `min(transitioned to "In Progress", PR created)`. It equals to 0 for retrofitted issues with PRs before their creation times.
* `jira-acknowledge-time-below-threshold-ratio` - ratio of issues with a `jira-acknowledge-time` below the threshold, disregarding the quantiles. The default threshold is 3 days.
* `jira-pr-lag-time` - the time between when the issue transitioned to "In Progress" and the first PR was created. It equals to 0 if the difference is negative or no PRs are mapped to the issue.
* `jira-backlog-time` - the time between when the issue was created and transitioned to "In Progress".
* `jira-resolution-rate` - ratio between the number of resolved issues to the number of raised issues.
enum:
- jira-open
- jira-resolved
- jira-raised
- jira-acknowledged
- jira-acknowledged-q
- jira-life-time
- jira-life-time-below-threshold-ratio
- jira-lead-time
- jira-lead-time-below-threshold-ratio
- jira-acknowledge-time
- jira-acknowledge-time-below-threshold-ratio
- jira-pr-lag-time
- jira-backlog-time
- jira-resolution-rate
example: jira-resolved
type: string
# yamllint disable-line rule:key-ordering
JIRAMetricsRequest:
additionalProperties: false
description: Request body of `/metrics/jira`.
example:
account: 1
date_from: 2020-10-01
date_to: 2020-10-30
priorities:
- High
types:
- Bug
metrics:
- jira-open
- jira-resolved
- jira-raised
granularities:
- all
exclude_inactive: true
properties:
account:
description: Session account ID.
type: integer
date_from:
description: Issues must be resolved after this date.
format: date
type: string
date_to:
description: Issues must be created before this date.
format: date
type: string
for:
description: |
Calculate metrics separately for each JIRA Filter in the list.
Not compatible with other jira filters in the request:
`priorities`, `types`, `labels_include`, `labels_exclude`, `epics`, `projects`.
items:
$ref: '#/components/schemas/JIRAFilter'
type: array
timezone:
$ref: '#/components/schemas/TimeZone'
priorities:
description: Selected issue priorities.
items:
type: string
type: array
types:
description: Selected issue types.
items:
type: string
type: array
labels_include:
description: JIRA issues must contain at least one label from the list.
Several labels may be concatenated by a comma `,` so that all of them
are required.
items:
type: string
type: array
labels_exclude:
description: JIRA issues may not contain labels from this list.
items:
type: string
type: array
exclude_inactive:
description: Value indicating whether issues with the last update older
than `date_from` should be ignored. If `date_from` and `date_to` are `null`,
does nothing.
type: boolean
epics:
description: JIRA issues must be attached to any of the epic IDs from this
list.
items:
type: string
type: array
with:
description: Groups of issue participants. The metrics will be calculated
for each group.
items:
$ref: '#/components/schemas/JIRAFilterWith'
type: array
projects:
description: Issues must belong to these JIRA projects.
items:
example: DEV
type: string
type: array
metrics:
description: List of measured metrics.
items:
$ref: '#/components/schemas/JIRAMetricID'
type: array
quantiles:
$ref: '#/components/schemas/Quantiles'
granularities:
$ref: '#/components/schemas/Granularities'
group_by_jira_label:
description: Value indicating whether the metrics should be grouped by assigned
JIRA issue label.
type: boolean
required:
- account
- date_from
- date_to
- exclude_inactive
- granularities
- metrics
type: object
# yamllint disable-line rule:key-ordering
FilterJIRACommon:
description: Common JIRA issue filters.
example:
account: 1
timezone: 120
exclude_inactive: true
properties:
account:
description: Session account ID.
type: integer
timezone:
$ref: '#/components/schemas/TimeZone'
priorities:
description: Selected issue priorities.
items:
type: string
type: array
types:
description: Selected issue types. Ignored for epics.
items:
type: string
type: array
labels_include:
description: JIRA issues must contain at least one label from the list.
Several labels may be concatenated by a comma `,` so that all of them
are required.
items:
type: string
type: array
labels_exclude:
description: JIRA issues may not contain labels from this list.
items:
type: string
type: array
exclude_inactive:
description: Value indicating whether issues with the last update older
than `date_from` should be ignored. If `date_from` and `date_to` are `null`,
does nothing.
type: boolean
required:
- account
- exclude_inactive
type: object
# yamllint disable-line rule:key-ordering
JIRAFilterWith:
additionalProperties: false
description: Group of JIRA issue participant names split by role.
example:
assignees:
- Vadim Markovtsev
properties:
assignees:
description: Selected issue assignee users. `null` means unassigned.
items:
nullable: true
type: string
type: array
reporters:
description: Selected issue reporter users.
items:
type: string
type: array
commenters:
description: Selected issue commenter users.
items:
type: string
type: array
type: object
# yamllint disable-line rule:key-ordering
CalculatedJIRAMetrics:
description: |
Response from `/metrics/jira`.
The order of the items is *not* guaranteed to match any expectations.
items:
$ref: '#/components/schemas/CalculatedJIRAMetricValues'
type: array
# yamllint disable-line rule:key-ordering
CalculatedJIRAMetricValues:
additionalProperties: false
description: Calculated JIRA metrics for a specific granularity.
example:
granularity: 2 week
values:
- date: 2020-01-23
values:
- 0.8008282
- 0.8008282
confidence_mins:
- 0.5
- 0.5
confidence_maxs:
- 1.0
- 1.0
confidence_scores:
- 75
- 75
- date: 2020-01-23
values:
- 0.8008282
- 0.8008282
confidence_mins:
- 0.5
- 0.5
confidence_maxs:
- 1.0
- 1.0
confidence_scores:
- 75
- 75
properties:
granularity:
$ref: '#/components/schemas/Granularity'
for:
$ref: '#/components/schemas/JIRAFilter'
jira_label:
description: Title of the assigned JIRA label, if `group_by_jira_label`
was previously set to `true`. If is missing and `group_by_jira_label`
was set to `true` then the metrics are calculated for issues without labels.
type: string
with:
$ref: '#/components/schemas/JIRAFilterWith'
values:
description: The sequence steps from `date_from` till `date_to` by `granularity`.
items:
$ref: '#/components/schemas/CalculatedLinearMetricValues'
type: array
required:
- granularity
- values
type: object
# yamllint disable-line rule:key-ordering
JIRAHistogramsRequest:
additionalProperties: false
description: Request of `/histograms/jira`.
example:
types:
- Bug
histograms:
- metric: jira-raised
account: 1
date_to: 2020-11-23
date_from: 2020-01-23
timezone: 120
exclude_inactive: true
properties:
priorities:
description: Selected issue priorities.
items:
type: string
type: array
types:
description: Selected issue types.
items:
type: string
type: array
epics:
items:
$ref: '#/components/schemas/JIRAEpic'
type: array
labels_include:
description: PRs must relate to at least one JIRA issue label from the list.
Several labels may be concatenated by a comma `,` so that all of them
are required.
items:
type: string
type: array
labels_exclude:
description: PRs cannot relate to JIRA issue labels from the list.
items:
type: string
type: array
with:
description: Groups of issue participants. The histograms will be calculated
for each group.
items:
$ref: '#/components/schemas/JIRAFilterWith'
type: array
projects:
description: Issues must belong to these JIRA projects.
items:
example: DEV
type: string
type: array
histograms:
description: Histogram parameters for each wanted topic.
items:
$ref: '#/components/schemas/JIRAHistogramDefinition'
type: array
date_from:
description: Date from when to start measuring the distribution.
format: date
type: string
date_to:
description: Date until which to measure the distribution.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
exclude_inactive:
description: Value indicating whether issues with the last update older
than `date_from` should be ignored.
type: boolean
quantiles:
$ref: '#/components/schemas/Quantiles'
account:
description: Session account ID.
type: integer
required:
- account
- date_from
- date_to
- exclude_inactive
- histograms
type: object
# yamllint disable-line rule:key-ordering
JIRAHistogramDefinition:
additionalProperties: false
description: 'Histogram parameters: topic, bins.'
example:
metric: jira-raised
ticks:
- 1
- 10
- 50
- 100
- 500
properties:
metric:
$ref: '#/components/schemas/JIRAMetricID'
scale:
allOf:
- $ref: '#/components/schemas/HistogramScale'
- description: Histogram's X axis scale.
bins:
description: Number of bars in the histogram. 0 or null means automatic.
minimum: 0
type: integer
ticks:
description: |-
Alternatively to `bins` and `scale`, set the X axis bar borders manually.
Only one of two may be specified. The ticks are automatically prepended
the distribution minimum and appended the distribution maximum.
items:
oneOf:
- type: number
- $ref: '#/components/schemas/TimeDuration'
minItems: 1
type: array
required:
- metric
type: object
# yamllint disable-line rule:key-ordering
CalculatedJIRAHistograms:
description: Response from `/histograms/jira`.
items:
$ref: '#/components/schemas/CalculatedJIRAHistogram'
type: array
# yamllint disable-line rule:key-ordering
CalculatedJIRAHistogram:
additionalProperties: false
description: Calculated histogram over JIRA issue activities.
example:
metric: jira-raised
scale: linear
ticks:
- 0
- 1
- 10
- 50
- 100
- 500
- 10000
frequencies:
- 0
- 38
- 28
- 13
- 12
- 8
interquartile:
left: 3
right: 76
properties:
with:
$ref: '#/components/schemas/JIRAFilterWith'
metric:
$ref: '#/components/schemas/JIRAMetricID'
scale:
$ref: '#/components/schemas/HistogramScale'
ticks:
description: Series of horizontal bar borders aka X axis. Their count is
`len(y) + 1` because there are `N` intervals between `(N + 1)` ticks.
items:
oneOf:
- type: number
- $ref: '#/components/schemas/TimeDuration'
type: array
frequencies:
description: Series of histogram bar heights aka Y axis.
items:
minimum: 0
type: integer
type: array
interquartile:
$ref: '#/components/schemas/Interquartile'
required:
- frequencies
- interquartile
- metric
- scale
- ticks
type: object
# yamllint disable-line rule:key-ordering
JIRAProjects:
description: List of JIRA project activity settings.
items:
$ref: '#/components/schemas/JIRAProject'
type: array
# yamllint disable-line rule:key-ordering
JIRAProject:
additionalProperties: false
description: JIRA project setting.
example:
name: Product Development
key: DEV
id: '10009'
avatar_url: https://athenianco.atlassian.net/secure/projectavatar?pid=10009&avatarId=10551
enabled: true
issues_count: 100
last_update: 2021-08-10T12:47:00Z
properties:
name:
description: Long name of the project.
type: string
key:
description: Short prefix of the project.
type: string
id:
description: |
Internal project identifier that corresponds to `project` in `/filter/jira`.
Note: this is a string even though this looks like an integer. That's what JIRA API
sends us.
type: string
avatar_url:
description: Avatar URL of the project.
format: url
type: string
enabled:
description: Indicates whether this project is enabled for analysis.
type: boolean
issues_count:
description: Total number of issues in the project.
type: integer
last_update:
description: |
Timestamp of the last event in the project. Can be `null` if there are no issues.
format: date-time
nullable: true
type: string
required:
- avatar_url
- enabled
- id
- issues_count
- key
- last_update
- name
type: object
# yamllint disable-line rule:key-ordering
JIRAProjectsRequest:
additionalProperties: false
description: Enable or disable a JIRA project.
example:
account: 1
projects:
ENG: false
DEV: true
properties:
account:
description: Account ID.
type: integer
projects:
additionalProperties:
type: boolean
description: Map from project keys to their enabled/disabled flags.
type: object
required:
- account
- projects
type: object
# yamllint disable-line rule:key-ordering
DiffReleasesRequest:
additionalProperties: false
description: Request of `/diff/releases`. Define pairs of releases for several
repositories to find the releases in between.
example:
account: 1
borders:
github.com/athenianco/athenian-api:
- old: v0.7.50
new: v0.7.59
properties:
account:
type: integer
borders:
additionalProperties:
items:
$ref: '#/components/schemas/ReleasePair'
type: array
description: Mapping from repository names to analyzed release pairs.
type: object
required:
- account
- borders
type: object
# yamllint disable-line rule:key-ordering
ReleasePair:
additionalProperties: false
description: A pair of release names within the same repository.
example:
old: v0.7.50
new: v0.7.59
properties:
old:
description: Older release name.
type: string
new:
description: Newer release name.
type: string
required:
- new
- old
type: object
# yamllint disable-line rule:key-ordering
DiffedReleases:
additionalProperties: false
description: Response of `/diff/releases` - the found inner releases for each
repository.
example:
include:
users:
github.com/gkwillie:
avatar: https://avatars0.githubusercontent.com/u/60340680?v=4
jira:
DEV-999:
id: DEV-999
title: 'Ticket DEV-999'
type: task
data:
github.com/athenianco/athenian-api:
- old: v0.0.92
new: v0.0.93
releases:
- added_lines: 1000
commits: 20
deleted_lines: 200
name: v0.0.93
sha: e337123fc32c38cf6a8149b518f2e58ae836c8e6
published: 2020-03-25T10:57:00Z
publisher: github.com/vmarkovtsev
repository: github.com/athenianco/athenian-api
url: https://github.com/athenianco/athenian-api/releases/tag/v0.0.93
age: '1000s'
commit_authors:
- github.com/vmarkovtsev
prs:
- additions: 34
author: github.com/se7entyse7en
created: 2020-05-21T18:29:00Z
deletions: 3
number: 176
title: Fix first account creation
properties:
include:
allOf:
- $ref: '#/components/schemas/IncludedNativeUsers'
- $ref: '#/components/schemas/IncludedJIRAIssues'
type: object
data:
additionalProperties:
items:
$ref: '#/components/schemas/ReleaseDiff'
type: array
description: Mapping from repository names to diff results.
type: object
required:
- data
- include
type: object
# yamllint disable-line rule:key-ordering
ReleaseDiff:
additionalProperties: false
description: Inner releases between `old` and `new`, including the latter.
example:
old: v0.0.92
new: v0.0.93
releases:
- added_lines: 1000
commits: 20
deleted_lines: 200
name: v0.0.93
sha: e337123fc32c38cf6a8149b518f2e58ae836c8e6
published: 2020-03-25T10:57:00Z
publisher: github.com/vmarkovtsev
repository: github.com/athenianco/athenian-api
url: https://github.com/athenianco/athenian-api/releases/tag/v0.0.93
age: '10000s'
commit_authors:
- github.com/vmarkovtsev
prs:
- additions: 3
author: github.com/vmarkovtsev
created: 2020-03-25T10:57:00Z
deletions: 3
number: 176
title: Bug fix
properties:
old:
type: string
new:
type: string
releases:
description: List of matching release metadata.
items:
$ref: '#/components/schemas/FilteredRelease'
type: array
required:
- new
- old
- releases
type: object
# yamllint disable-line rule:key-ordering
MappedJIRAIdentities:
description: |-
List of currently mapped GitHub<>JIRA users.
Additionally, we include unmapped JIRA users to provide a complete list of them.
items:
$ref: '#/components/schemas/MappedJIRAIdentity'
type: array
# yamllint disable-line rule:key-ordering
MappedJIRAIdentity:
additionalProperties: false
description: GitHub user (developer) mapped to a JIRA user.
example:
developer_id: github.com/vmarkovtsev
developer_name: Vadim Markovtsev
jira_name: Vadim Markovtsev
confidence: 1.0
properties:
developer_id:
anyOf:
- $ref: '#/components/schemas/DeveloperID'
- nullable: true
type: string
developer_name:
description: Full name of the mapped GitHub user.
nullable: true
type: string
jira_name:
description: Full name of the mapped JIRA user.
type: string
confidence:
description: Value from 0 to 1 indicating how similar are the users.
format: float
maximum: 1
minimum: 0
type: number
required:
- confidence
- developer_id
- developer_name
- jira_name
type: object
# yamllint disable-line rule:key-ordering
SetMappedJIRAIdentitiesRequest:
additionalProperties: false
description: Request body of `/settings/jira/identities`. Describes a patch
to the GitHub<>JIRA identity mapping.
example:
account: 123
changes:
- developer_id: github.com/vmarkovtsev
jira_name: Vadim Markovtsev
- developer_id: github.com/warenlg
jira_name: null
properties:
account:
description: Account ID.
type: integer
changes:
description: Individual GitHub<>JIRA user mapping change.
items:
$ref: '#/components/schemas/MappedJIRAIdentityChange'
type: array
required:
- account
- changes
type: object
# yamllint disable-line rule:key-ordering
MappedJIRAIdentityChange:
additionalProperties: false
description: Individual GitHub<>JIRA user mapping change.
example:
developer_id: github.com/vmarkovtsev
jira_name: Vadim Markovtsev
properties:
developer_id:
$ref: '#/components/schemas/DeveloperID'
jira_name:
description: Full name of the mapped JIRA user. `null` means the removal.
nullable: true
type: string
required:
- developer_id
- jira_name
type: object
# yamllint disable-line rule:key-ordering
NotifyDeploymentsRequest:
items:
$ref: '#/components/schemas/DeploymentNotification'
type: array
NotifiedDeployments:
description: The list of notified deployments.
example:
- name: prod-1984-05-01-ABCDEFGH
resolved: true
items:
additionalProperties: false
properties:
name:
description: Name of the deployment.
type: string
resolved:
description: |
Value indicating whether we resolved the received Git reference on the spot.
`false` is probably still OK for new references that we haven't synchronized yet.
type: boolean
required:
- name
- resolved
type: object
type: array
# yamllint disable-line rule:key-ordering
NotifyReleasesRequest:
description: |
Request body of `/events/releases`: list of release notifications.
items:
$ref: '#/components/schemas/ReleaseNotification'
type: array
# yamllint disable-line rule:key-ordering
NotifyReleasesResponse:
description: |
Response from `/events/releases`. The status of each release notification
in the order of `NotifyReleasesRequest`.
items:
$ref: '#/components/schemas/ReleaseNotificationStatus'
type: array
# yamllint disable-line rule:key-ordering
ReleaseNotificationStatus:
description: |
What happened to the notification:
- `accepted_resolved`: all is OK, we found the repository reference.
- `accepted_pending`: we haven't found the repository reference, it will take up to 1 hour for the release to become visible.
- `ignored_duplicate`: we found another release with the same name in the same repository in the request and hence skipped.
enum:
- accepted-resolved
- accepted-pending
- ignored-duplicate
type: string
# yamllint disable-line rule:key-ordering
CommitHash:
description: Commit hash, either short (7 chars) or long (40 chars) form.
maxLength: 40
minLength: 7
type: string
# yamllint disable-line rule:key-ordering
DeployedComponent:
additionalProperties: false
description: Definition of the deployed software unit.
example:
repository: github.com/athenianco/athenian-api
reference: v0.10.34
properties:
repository:
$ref: '#/components/schemas/RepositoryID'
reference:
description: |
We accept three ways to define a Git reference:
1. Tag name.
2. Full commit hash (40 characters).
3. Short commit hash (7 characters).
We ignore the reference while we cannot find it in our database. There can be
two reasons:
- There is a mistake or a typo in the provided data.
- We are temporarily unable to synchronize with GitHub.
minLength: 1
type: string
required:
- reference
- repository
type: object
# yamllint disable-line rule:key-ordering
DeploymentConclusion:
description: State of the completed deployment. Case-insensitive.
enum:
- SUCCESS
- FAILURE
- CANCELLED
type: string
# yamllint disable-line rule:key-ordering
DeploymentLabels:
description: Arbitrary key-value metadata that associates with the deployment.
type: object
DeploymentModifyLabelsRequest:
additionalProperties: false
description: |
Request to modify the labels associated with the deployment.
Each property in this object represents a command to execute.
example: {}
properties:
delete:
description: Delete the labels with the given keys. Unexisting labels are ignored.
items:
type: string
type: array
upsert:
allOf:
- description: Set the given labels, overwriting values for already associated labels.
- $ref: '#/components/schemas/DeploymentLabels'
type: object
DeploymentNotification:
description: |
Push message about a deployment. We remove unresolved components after 24h.
example:
components:
- repository: github.com/athenianco/athenian-api
reference: v0.10.34
environment: production
date_finished: 2022-01-23T05:01:07.000+00:00
date_started: 2022-01-23T04:56:07.000+00:00
conclusion: SUCCESS
labels:
helm_chart: 0.0.67
properties:
components:
description: |
List of deployed software version. Each item identifies a Git reference
in a repository, either a tag or a commit hash.
items:
$ref: '#/components/schemas/DeployedComponent'
minItems: 1
type: array
environment:
description: Name of the environment where the deployment happened.
minLength: 1
type: string
name:
description: Name of the deployment. If is not specified, we generate our
own by the template `--`.
The value may not contain \n - new line character, and ' - single quote.
nullable: true
pattern: ^([^'\s]| ){1,100}$
type: string
url:
description: URL pointing at the internal details of the deployment.
format: url
type: string
date_started:
description: Timestamp of when the deployment procedure launched.
format: date-time
type: string
date_finished:
description: Timestamp of when the deployment procedure completed.
format: date-time
type: string
conclusion:
$ref: '#/components/schemas/DeploymentConclusion'
labels:
$ref: '#/components/schemas/DeploymentLabels'
required:
- components
- conclusion
- date_finished
- date_started
- environment
type: object
# yamllint disable-line rule:key-ordering
ReleaseNotification:
additionalProperties: false
description: Push message about a custom release event.
example:
author: Vadim Markovtsev
commit: c3f4d3a
name: 0.8.66
repository: github.com/athenianco/athenian-api
published_at: 2021-02-23T15:16:07Z
url: https://github.com/athenianco/athenian-api/releases/tag/v0.8.66
properties:
repository:
$ref: '#/components/schemas/RepositoryID'
commit:
$ref: '#/components/schemas/CommitHash'
name:
description: |
Release name.
The value may not contain \n - new line character, and ' - single quote.
nullable: true
pattern: ^([^'\s]| ){1,100}$
type: string
author:
description: Release author.
type: string
url:
description: Release URL.
format: url
type: string
published_at:
description: When the release was created. If missing, set to `now()`.
format: date-time
type: string
required:
- commit
- repository
type: object
# yamllint disable-line rule:key-ordering
DeleteEventsCacheRequest:
additionalProperties: false
description: Definition of the cache reset operation.
example:
account: 1
repositories:
- github.com/athenianco/athenian-api
targets:
- release
properties:
account:
description: Account ID.
type: integer
repositories:
$ref: '#/components/schemas/RepositorySet'
targets:
description: Parts of the precomputed cache to reset.
items:
enum:
- release
- deployment
type: string
type: array
required:
- account
- repositories
- targets
type: object
# yamllint disable-line rule:key-ordering
MatchIdentitiesRequest:
additionalProperties: false
description: Request body of `/match/identities`.
example:
account: 1
identities:
- emails:
- eiso@athenian.co
- names:
- Vadim Markovtsev
- vmarkovtsev
properties:
account:
description: User's account ID.
type: integer
identities:
items:
$ref: '#/components/schemas/ContributorIdentity'
type: array
required:
- account
- identities
type: object
# yamllint disable-line rule:key-ordering
ContributorIdentity:
additionalProperties: false
description: Information about a contributor that may be utilized to match identities.
example:
emails:
- vadim@athenian.co
names:
- Vadim Markovtsev
- vmarkovtsev
- Vadim
properties:
emails:
description: Email addresses belonging to the person.
items:
format: email
type: string
type: array
names:
description: The person is known as each of these full names. The format
is arbitrary.
items:
type: string
type: array
type: object
# yamllint disable-line rule:key-ordering
MatchedIdentities:
description: Response from `/match/identities` - mapping from supplied identities
to GitHub organization members. The order matches the order of `MatchIdentitiesRequest.identities`.
example:
- from:
emails:
- gkwillie@athenian.co
to: null
confidence: 0.5
- from:
names:
- Vadim Markovtsev
to: github.com/vmarkovtsev
confidence: 1
items:
$ref: '#/components/schemas/MatchedIdentity'
type: array
# yamllint disable-line rule:key-ordering
MatchedIdentity:
description: Identity mapping of a specific contributor.
example:
confidence: 1
from:
names:
- Vadim Markovtsev
to: github.com/vmarkovtsev
properties:
from:
$ref: '#/components/schemas/ContributorIdentity'
to:
anyOf:
- nullable: true
type: string
- $ref: '#/components/schemas/DeveloperID'
confidence:
description: Value from 0 to 1 indicating how similar are the users.
format: float
maximum: 1
minimum: 0
type: number
required:
- confidence
- from
- to
type: object
# yamllint disable-line rule:key-ordering
CodeCheckMetricsRequest:
additionalProperties: false
description: Request for calculating metrics on top of code check runs (CI)
data.
example:
for:
- repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
pusher_groups:
- - github.com/vmarkovtsev
- github.com/dpordomingo
- - github.com/se7entyse7en
- repositories:
- github.com/athenianco/metadata
- github.com/athenianco/athenian-api
pushers:
- github.com/vmarkovtsev
- github.com/se7entyse7en
metrics:
- chk-suites-count
date_from: 2020-01-23
date_to: 2021-01-24
granularities:
- all
account: 1
properties:
for:
description: |-
Sets of developers and repositories for which to calculate the metrics.
The aggregation is `AND` between repositories and developers.
The aggregation is `OR` inside both repositories and developers.
items:
$ref: '#/components/schemas/ForSetCodeChecks'
type: array
metrics:
description: Requested metric identifiers.
items:
$ref: '#/components/schemas/CodeCheckMetricID'
type: array
date_from:
description: Date from when to start measuring the metrics.
format: date
type: string
date_to:
description: Date until which to measure the metrics.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
granularities:
$ref: '#/components/schemas/Granularities'
quantiles:
$ref: '#/components/schemas/Quantiles'
account:
description: Session account ID.
type: integer
split_by_check_runs:
description: Calculate metrics separately for each number of check runs
in suite.
type: boolean
required:
- account
- date_from
- date_to
- for
- granularities
- metrics
type: object
# yamllint disable-line rule:key-ordering
ForSetCodeChecks:
additionalProperties: false
description: |
Filters for `/metrics/code_checks` and `/histograms/code_checks`.
Achieve the best performance by packing all your filters in a single `ForSetCodeChecks`
instead of sending multiple `ForSetCodeChecks`-s. For example, use `repogroups` and `pushers`
to request separate metrics for several repository sets and teams.
example:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
pushers:
- github.com/vmarkovtsev
- github.com/dpordomingo
jira:
labels_include:
- bug
properties:
repositories:
$ref: '#/components/schemas/RepositorySet'
repogroups:
$ref: '#/components/schemas/IndexedGroups'
pushers:
$ref: '#/components/schemas/CommitPushers'
pusher_groups:
description: |-
Check runs must be triggered by commits authored by these people.
We aggregate by each group so that you can request metrics of several teams at once.
We treat `pushers` as another group, if specified.
items:
$ref: '#/components/schemas/CommitPushers'
type: array
labels_include:
description: At least one of these labels must be present in the checked
PRs.
items:
type: string
type: array
labels_exclude:
description: None of these labels must be present in each checked PR.
items:
type: string
type: array
jira:
allOf:
- description: Analyze only those check runs that belong to PRs mapped to
JIRA issues that satisfy this filter.
- $ref: '#/components/schemas/JIRAFilter'
lines:
description: Split by changed number of lines (inserted + removed) in pull requests.
items:
minimum: 0
type: integer
minItems: 2
type: array
required:
- repositories
type: object
# yamllint disable-line rule:key-ordering
CodeCheckMetricID:
description: |-
The mentioned terms such as "check suite" and "check run" belong to [the official documentation on GitHub](https://docs.github.com/en/rest/guides/getting-started-with-the-checks-api#about-check-runs).
* `chk-suites-count` - number of executed check suites.
* `chk-suites-in-prs-count` - number of executed check suites in pull requests.
* `chk-successful-suites-count` - number of successfully executed check suites.
* `chk-failed-suites-count` - number of failed check suites.
* `chk-cancelled-suites-count` - number of cancelled check suites.
* `chk-success-ratio` - `chk-successful-suites-count` divided by `chk-suites-count`.
* `chk-suite-time` - average check suite execution time.
* `chk-robust-suite-time` - average check suite execution time, alternative algorithm. We consider each suite size group separately, fill missing daily values by averaging the neighbors, and then take the average of group averages.
* `chk-suites-per-pr` - average number of times check suites executed in a pull request.
* `chk-suite-time-per-pr` - average check suite execution time by pull request. The difference with `chk-suite-time` is that we don't consider checks triggered by direct pushes, e.g. by merge commits.
* `chk-prs-with-checks-count` - number of PRs that triggered at least one check suite.
* `chk-flaky-commit-checks-count` - number of check suites triggered by the same commit but having different outcomes - both successful and failed.
* `chk-prs-merged-with-failed-checks-count` - how many PRs were merged despite failing checks.
* `chk-prs-merged-with-failed-checks-ratio` - ratio of PRs merged with failing checks to all merged PRs with checks.
* `chk-concurrency-max` - maximum number of check runs of the same type executing in parallel. We consider check runs executing in parallel if their time intervals overlap ≥ 50%.
* `chk-concurrency` - average number of check runs of the same type executing in parallel; we choose the check run type that corresponds to the maximum concurrency for each day. We consider check runs executing in parallel if their time intervals overlap ≥ 50%.
* `chk-elapsed-time-per-concurrency` - cumulative time spent on each concurrency level across check runs. Only allowed for histograms.
* `chk-suite-occupancy` - average ratio between summed time of check runs in a check suite and the product of the number of check runs with the maximum check run time in that check suite. 1 means ideal resource utilization, down to 0 for absolute inefficiency. For example, there are one slow check run that executes in 10x seconds, and N fast check runs that execute in x seconds, in the same check suite. The metric value will be (10x + Nx) / (10*(N+1)*x) → 0.1 if N → +∞.
* `chk-suite-critical-occupancy` - `chk-suite-occupancy` calculated for critical check runs only. A critical check run is a check run of type that at least once dominated the check suite execution time on the time interval. This is the measure of check suite "trebble" when there are several slowest check runs that elapse time with some standard deviation.
* `chk-suite-imbalance` - average difference between the time of the slowest and the second slowest check runs in a check suite. High values signal unbalanced jobs and CI/CD inefficiency.
enum:
- chk-suites-count
- chk-suites-in-prs-count
- chk-successful-suites-count
- chk-failed-suites-count
- chk-cancelled-suites-count
- chk-success-ratio
- chk-suite-time
- chk-robust-suite-time
- chk-suites-per-pr
- chk-suite-time-per-pr
- chk-prs-with-checks-count
- chk-flaky-commit-checks-count
- chk-prs-merged-with-failed-checks-count
- chk-prs-merged-with-failed-checks-ratio
- chk-concurrency-max
- chk-concurrency
- chk-elapsed-time-per-concurrency
- chk-suite-occupancy
- chk-suite-critical-occupancy
- chk-suite-imbalance
example: chk-suites-count
type: string
# yamllint disable-line rule:key-ordering
CalculatedCodeCheckMetrics:
additionalProperties: false
description: |
Response from `/metrics/code_checks`. The dates start from `date_from`
and end earlier or equal to `date_to`.
The order of the items is *not* guaranteed to match any expectations.
example:
metrics:
- chk-suites-count
date_from: 2020-01-23
date_to: 2021-01-24
granularities:
- all
calculated:
- values:
- date: 2020-01-23
values:
- 200
for:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
pushers:
- github.com/vmarkovtsev
- github.com/dpordomingo
granularity: all
properties:
calculated:
description: Values of the requested metrics through time.
items:
$ref: '#/components/schemas/CalculatedCodeCheckMetricsItem'
type: array
metrics:
description: Repeats `CodeCheckMetricsRequest.metrics`.
items:
$ref: '#/components/schemas/CodeCheckMetricID'
type: array
date_from:
description: Repeats `CodeCheckMetricsRequest.date_from`.
format: date
type: string
date_to:
description: Repeats `CodeCheckMetricsRequest.date_to`.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
granularities:
$ref: '#/components/schemas/Granularities'
quantiles:
$ref: '#/components/schemas/Quantiles'
split_by_check_runs:
description: Repeats `CodeCheckMetricsRequest.split_by_check_runs`.
type: boolean
required:
- calculated
- date_from
- date_to
- granularities
- metrics
type: object
# yamllint disable-line rule:key-ordering
CalculatedCodeCheckMetricsItem:
additionalProperties: false
description: Series of calculated metrics for a specific set of repositories
and commit authors.
example:
values:
- date: 2020-01-23
values:
- 200
for:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
pushers:
- github.com/vmarkovtsev
- github.com/dpordomingo
granularity: all
properties:
for:
$ref: '#/components/schemas/ForSetCodeChecks'
granularity:
$ref: '#/components/schemas/Granularity'
check_runs:
description: We calculated metrics for check suites with this number of
runs. Not null only if the user specified `split_by_check_runs = true`.
type: integer
suites_ratio:
description: Number of check suites with `check_runs` number of check runs
divided by the overall number of check suites. Not null only if the user
specified `split_by_check_runs = true`.
format: float
maximum: 1
minimum: 0
type: number
values:
description: The sequence steps from `date_from` till `date_to` by `granularity`.
items:
$ref: '#/components/schemas/CalculatedLinearMetricValues'
type: array
required:
- for
- values
type: object
# yamllint disable-line rule:key-ordering
CodeCheckHistogramsRequest:
additionalProperties: false
description: Request of `/histograms/code_checks`.
example:
for:
- repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
pushers:
- github.com/vmarkovtsev
- github.com/dpordomingo
histograms:
- scale: log
metric: chk-suite-time
account: 1
date_to: 2020-11-23
date_from: 2020-01-23
timezone: 120
properties:
for:
description: |-
Sets of developers and repositories for which to calculate the histograms.
The aggregation is `AND` between repositories and developers.
The aggregation is `OR` inside both repositories and developers.
items:
$ref: '#/components/schemas/ForSetCodeChecks'
type: array
histograms:
description: Histogram parameters for each wanted topic.
items:
$ref: '#/components/schemas/CodeCheckHistogramDefinition'
type: array
date_from:
description: Date from when to start measuring the distribution.
format: date
type: string
date_to:
description: Date until which to measure the distribution.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
quantiles:
$ref: '#/components/schemas/Quantiles'
split_by_check_runs:
description: Calculate histograms separately for each number of check runs
in suite.
type: boolean
account:
description: Session account ID.
type: integer
required:
- account
- date_from
- date_to
- for
- histograms
type: object
# yamllint disable-line rule:key-ordering
CodeCheckHistogramDefinition:
additionalProperties: false
description: 'Histogram parameters: topic, bins.'
example:
metric: chk-suite-time
ticks:
- 60s
- 120s
- 180s
- 360s
- 720s
- 1440s
properties:
metric:
$ref: '#/components/schemas/CodeCheckMetricID'
scale:
allOf:
- $ref: '#/components/schemas/HistogramScale'
- description: Histogram's X axis scale.
bins:
description: Number of bars in the histogram. 0 or null means automatic.
minimum: 0
type: integer
ticks:
description: |-
Alternatively to `bins` and `scale`, set the X axis bar borders manually.
Only one of two may be specified. The ticks are automatically prepended
the distribution minimum and appended the distribution maximum.
items:
oneOf:
- type: number
- $ref: '#/components/schemas/TimeDuration'
minItems: 1
type: array
required:
- metric
type: object
# yamllint disable-line rule:key-ordering
CalculatedCodeCheckHistograms:
description: Response from `/histograms/code_checks`.
items:
$ref: '#/components/schemas/CalculatedCodeCheckHistogram'
type: array
# yamllint disable-line rule:key-ordering
CalculatedCodeCheckHistogram:
additionalProperties: false
description: Calculated histogram over code checks (CI).
example:
for:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
metric: chk-suites-per-pr
scale: linear
ticks:
- 0
- 1
- 2
- 3
- 5
- 8
- 12
frequencies:
- 0
- 38
- 28
- 13
- 120
- 100
interquartile:
left: 2
right: 8
properties:
for:
$ref: '#/components/schemas/ForSetCodeChecks'
metric:
$ref: '#/components/schemas/CodeCheckMetricID'
scale:
$ref: '#/components/schemas/HistogramScale'
ticks:
description: Series of horizontal bar borders aka X axis. Their count is
`len(y) + 1` because there are `N` intervals between `(N + 1)` ticks.
items:
oneOf:
- type: number
- $ref: '#/components/schemas/TimeDuration'
type: array
frequencies:
description: Series of histogram bar heights aka Y axis.
items:
minimum: 0
type: integer
type: array
interquartile:
$ref: '#/components/schemas/Interquartile'
required:
- for
- frequencies
- interquartile
- metric
- scale
- ticks
type: object
# yamllint disable-line rule:key-ordering
CommitPushers:
description: |
Check runs must be triggered by commits pushed by these people.
When it is impossible to determine who pushed, e.g. in legacy API based checks,
they are committers.
It is possible to mention whole teams using the syntax `{id}` where `id` is a team identifier (see `/teams`).
example:
- github.com/vmarkovtsev
- github.com/se7entyse7en
items:
$ref: '#/components/schemas/DeveloperID'
type: array
# yamllint disable-line rule:key-ordering
FilterCodeChecksRequest:
additionalProperties: false
description: Request body of `/filter/code_checks`.
example:
in:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
triggered_by:
- github.com/vmarkovtsev
- github.com/se7entyse7en
date_from: 2020-05-01
date_to: 2021-05-01
timezone: 120
account: 1
properties:
in:
$ref: '#/components/schemas/RepositorySet'
triggered_by:
$ref: '#/components/schemas/CommitPushers'
labels_include:
description: At least one of these labels must be present in the checked
PRs.
items:
type: string
type: array
labels_exclude:
description: None of these labels must be present in each checked PR.
items:
type: string
type: array
jira:
allOf:
- description: Analyze only those check runs that belong to PRs mapped to
JIRA issues that satisfy this filter.
- $ref: '#/components/schemas/JIRAFilter'
date_from:
description: Date from when to start measuring the metrics.
format: date
type: string
date_to:
description: Date until which to measure the metrics.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
account:
description: Session account ID.
type: integer
quantiles:
allOf:
- description: Quantiles to apply to the execution time series before calculating
the average.
- $ref: '#/components/schemas/Quantiles'
required:
- account
- date_from
- date_to
- in
type: object
# yamllint disable-line rule:key-ordering
FilteredCodeCheckRuns:
additionalProperties: false
description: |-
Response from `/filter/code_checks`, found code check runs ordered by repository
name and then by title. Note: we always consider the completed run executions only.
example:
items:
- title: Unit tests
repository: github.com/src-d/athenian-api
last_execution_time: 2021-05-18T11:47:42Z
last_execution_url: https://github.com/athenianco/athenian-api/pull/1448/checks?check_run_id=2610787628
size_groups:
- 3
- 5
- 8
total_stats:
count: 100
successes: 50
critical: true
mean_execution_time: 200s
stddev_execution_time: 20s
median_execution_time: 120s
skips: 30
flaky_count: 0
count_timeline:
- 0
- 20
- 40
- 10
successes_timeline:
- 0
- 10
- 20
- 5
mean_execution_time_timeline:
- 150s
- 160s
- 210s
- 180s
median_execution_time_timeline:
- 110s
- 100s
- 125s
- 110s
prs_stats:
count: 100
successes: 50
critical: true
mean_execution_time: 200s
stddev_execution_time: 30s
median_execution_time: 120s
skips: 30
flaky_count: 0
count_timeline:
- 0
- 20
- 40
- 0
successes_timeline:
- 0
- 10
- 20
- 0
mean_execution_time_timeline:
- 170s
- 160s
- 210s
- 205s
median_execution_time_timeline:
- 175s
- 100s
- 125s
- 120s
timeline:
- 2020-05-01
- 2020-05-02
- 2020-05-03
- 2020-05-04
properties:
timeline:
description: |-
Sequence of dates from `date_from` till `date_to`. We choose
the adaptive intervals by applying these rules on `(date_to - date_from)`:
- Less than 5 weeks: daily.
- Less than 5 months: weekly (*not aligned*).
- Aligned monthly.
items:
format: date
type: string
type: array
items:
description: Found check runs and their stats.
items:
$ref: '#/components/schemas/FilteredCodeCheckRun'
type: array
required:
- items
- timeline
type: object
# yamllint disable-line rule:key-ordering
CodeCheckRunStatistics:
additionalProperties: false
description: Gathered statistics about a group of check runs.
example:
count: 100
successes: 50
critical: true
mean_execution_time: 200s
stddev_execution_time: 30s
median_execution_time: 120s
skips: 30
flaky_count: 0
count_timeline:
- 0
- 20
- 40
- 30
- 0
- 10
successes_timeline:
- 0
- 10
- 20
- 15
- 0
- 5
mean_execution_time_timeline:
- 140s
- 160s
- 210s
- 205s
- 140s
- 180s
median_execution_time_timeline:
- 90s
- 100s
- 125s
- 120s
- 105s
- 110s
properties:
count:
description: Number of executions with respect to `date_from` and `date_to`.
type: integer
successes:
description: Number of successful executions with respect to `date_from`
and `date_to`.
minimum: 0
type: integer
critical:
description: This code check dominated the overall check suite execution time
at least once.
type: boolean
mean_execution_time:
anyOf:
- description: Average elapsed execution time.
nullable: true
type: string
- $ref: '#/components/schemas/TimeDuration'
stddev_execution_time:
anyOf:
- description: |
Standard deviation of the execution time.
Higher values for a `critical` code check indicate an optimization opportunity:
it is better to have a stable execution time with the same average.
nullable: true
type: string
- $ref: '#/components/schemas/TimeDuration'
median_execution_time:
anyOf:
- description: Median elapsed execution time.
nullable: true
type: string
- $ref: '#/components/schemas/TimeDuration'
skips:
description: Number of times this check run was skipped.
minimum: 0
type: integer
flaky_count:
description: |-
Number of times this check run appeared flaky: it both failed and succeeded for
the same commit.
minimum: 0
type: integer
count_timeline:
description: Number of executions through time. The dates sequence is `FilteredCodeCheckRuns.timeline`.
items:
minimum: 0
type: integer
type: array
successes_timeline:
description: Number of successful executions through time. The dates sequence
is `FilteredCodeCheckRuns.timeline`.
items:
minimum: 0
type: integer
type: array
mean_execution_time_timeline:
description: Average elapsed execution time through time. The dates sequence
is `FilteredCodeCheckRuns.timeline`.
items:
$ref: '#/components/schemas/TimeDuration'
type: array
median_execution_time_timeline:
description: Median elapsed execution time through time. The dates sequence
is `FilteredCodeCheckRuns.timeline`.
items:
$ref: '#/components/schemas/TimeDuration'
type: array
required:
- count
- count_timeline
- critical
- flaky_count
- mean_execution_time
- mean_execution_time_timeline
- median_execution_time
- median_execution_time_timeline
- skips
- stddev_execution_time
- successes
- successes_timeline
type: object
# yamllint disable-line rule:key-ordering
FilteredCodeCheckRun:
additionalProperties: false
description: Mined information about a code check run.
example:
title: Unit tests
repository: github.com/src-d/athenian-api
last_execution_time: 2021-05-18T11:47:42Z
last_execution_url: https://github.com/athenianco/athenian-api/pull/1448/checks?check_run_id=2610787628
size_groups:
- 3
- 5
- 8
total_stats:
count: 100
successes: 50
critical: true
mean_execution_time: 200s
stddev_execution_time: 20s
median_execution_time: 120s
skips: 30
flaky_count: 0
count_timeline:
- 0
- 20
- 40
- 30
- 0
- 10
successes_timeline:
- 0
- 10
- 20
- 15
- 0
- 5
mean_execution_time_timeline:
- 110s
- 160s
- 210s
- 205s
- 120s
- 180s
median_execution_time_timeline:
- 120s
- 100s
- 125s
- 120s
- 100s
- 110s
prs_stats:
count: 100
successes: 50
critical: true
mean_execution_time: 200s
stddev_execution_time: 30s
median_execution_time: 120s
skips: 30
flaky_count: 0
count_timeline:
- 0
- 20
- 40
- 30
- 0
- 10
successes_timeline:
- 0
- 10
- 20
- 15
- 0
- 5
mean_execution_time_timeline:
- 110s
- 160s
- 210s
- 205s
- 200s
- 180s
median_execution_time_timeline:
- 120s
- 100s
- 125s
- 120s
- 190s
- 110s
properties:
title:
description: Unique name of the check run.
type: string
repository:
$ref: '#/components/schemas/RepositoryID'
last_execution_time:
description: Timestamp of when the check run launched the latest.
format: date-time
type: string
last_execution_url:
description: Link to the check run that launched the latest.
format: url
type: string
total_stats:
allOf:
- description: Gathered statistics for executions triggered by both direct
commit pushes and pull requests.
- $ref: '#/components/schemas/CodeCheckRunStatistics'
prs_stats:
allOf:
- description: Gathered statistics for executions triggered by pull requests.
- $ref: '#/components/schemas/CodeCheckRunStatistics'
size_groups:
description: Check suite sizes this check run belongs to.
items:
minimum: 1
type: integer
type: array
required:
- last_execution_time
- prs_stats
- repository
- size_groups
- title
- total_stats
type: object
# yamllint disable-line rule:key-ordering
DeploymentWith:
additionalProperties: false
description: |
Deployment contribution roles. The aggregation is `OR` everywhere.
It is possible to mention whole teams using the syntax `{id}` where `id` is a team identifier (see `/teams`).
example:
pr_author:
- github.com/se7entyse7en
properties:
pr_author:
allOf:
- $ref: '#/components/schemas/DeveloperSet'
- description: Authors of deployed pull requests.
commit_author:
allOf:
- $ref: '#/components/schemas/DeveloperSet'
- description: Authors of deployed commits.
releaser:
allOf:
- $ref: '#/components/schemas/DeveloperSet'
- description: Deployed release publishers.
type: object
# yamllint disable-line rule:key-ordering
FilterDeploymentsRequest:
additionalProperties: false
description: Filters to select the deployments in `/filter/deployments`.
example:
account: 1
date_from: 2021-06-23
date_to: 2021-12-24
in:
- github.com/athenianco/athenian-api
- github.com/athenianco/athenian-webapp
- github.com/athenianco/metadata
environments:
- production
- staging
conclusions:
- FAILURE
with_labels:
user: github.com/lwsanty
rollback: null
properties:
date_from:
description: Search for the deployments since this date.
format: date
type: string
date_to:
description: Search for the deployments until this date.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
account:
description: Session account ID.
type: integer
in:
$ref: '#/components/schemas/RepositorySet'
with:
$ref: '#/components/schemas/DeploymentWith'
pr_labels_include:
description: At least one of these labels must be present in at least one
deployed PR.
items:
type: string
type: array
pr_labels_exclude:
description: None of these labels must be present in each deployed PR.
items:
type: string
type: array
jira:
$ref: '#/components/schemas/JIRAFilter'
environments:
description: Deployments must belong to one of these environments.
items:
type: string
type: array
conclusions:
description: Deployments must execute with any of these conclusions.
items:
$ref: '#/components/schemas/DeploymentConclusion'
type: array
with_labels:
description: Deployments should contain at least one of the specified label
values. `null` matches any label value and effectively checks the label
existence.
type: object
without_labels:
description: Deployments may not contain the specified label values. `null`
matches any label value and effectively ensures that the label does not
exist.
type: object
required:
- account
- date_from
- date_to
type: object
# yamllint disable-line rule:key-ordering
FilteredDeployments:
description: Found deployments, response from `/filter/deployments`.
example:
include:
users:
github.com/vmarkovtsev:
avatar: https://avatars0.githubusercontent.com/u/60340680?v=4
github.com/se7entyse7en:
avatar: https://avatars0.githubusercontent.com/u/60340680?v=4
deployments:
- components:
- repository: github.com/athenianco/athenian-api
reference: v0.0.93
environment: production
date_finished: 2020-03-25T11:11:00Z
date_started: 2020-03-25T11:04:00Z
conclusion: SUCCESS
labels:
helm_chart: 0.0.15
name: production-2020-03-26-W9J3uzHl
code:
prs:
github.com/athenianco/athenian-webapp: 32
lines_prs:
github.com/athenianco/athenian-api: 37
lines_overall:
github.com/athenianco/athenian-webapp: 1200
commits_prs:
github.com/athenianco/athenian-api: 2
commits_overall:
github.com/athenianco/athenian-api: 20
prs:
- additions: 34
author: github.com/se7entyse7en
created: 2020-05-21T18:29:00Z
deletions: 3
number: 176
title: Fix first account creation
repository: github.com/athenianco/athenian-api
releases:
- added_lines: 1000
commits: 20
deleted_lines: 200
name: v0.0.93
sha: e337123fc32c38cf6a8149b518f2e58ae836c8e6
published: 2020-03-25T10:57:00Z
publisher: github.com/vmarkovtsev
repository: github.com/athenianco/athenian-api
url: https://github.com/athenianco/athenian-api/releases/tag/v0.0.93
age: '1000s'
commit_authors:
- github.com/vmarkovtsev
prs: 3
properties:
include:
allOf:
- $ref: '#/components/schemas/IncludedNativeUsers'
- $ref: '#/components/schemas/IncludedJIRAIssues'
description: All people and JIRA issues mentioned in the deployments.
deployments:
description: List of matched deployments.
items:
$ref: '#/components/schemas/FilteredDeployment'
type: array
required:
- deployments
- include
type: object
# yamllint disable-line rule:key-ordering
DeploymentAnalysis:
description: Statistics and contents of the deployment.
example:
code:
prs:
github.com/athenianco/athenian-api: 12
github.com/athenianco/athenian-webapp: 101
lines_prs:
github.com/athenianco/athenian-api: 37
lines_overall:
github.com/athenianco/athenian-webapp: 40
commits_prs:
github.com/athenianco/athenian-api: 300
commits_overall:
github.com/athenianco/athenian-api: 200
prs:
- additions: 34
author: github.com/se7entyse7en
created: 2020-05-21T18:29:00Z
deletions: 3
number: 176
title: Fix first account creation
repository: github.com/athenianco/athenian-api
releases:
- added_lines: 1000
commits: 20
deleted_lines: 200
name: v0.0.93
sha: e337123fc32c38cf6a8149b518f2e58ae836c8e6
published: 2020-03-25T10:57:00Z
publisher: github.com/vmarkovtsev
repository: github.com/athenianco/athenian-api
url: https://github.com/athenianco/athenian-api/releases/tag/v0.0.93
age: '10000s'
commit_authors:
- github.com/vmarkovtsev
prs: 4
properties:
code:
additionalProperties: false
description: Summary of the deployed code.
properties:
prs:
description: Number of deployed pull requests per repository.
additionalProperties:
minimum: 0
type: integer
type: object
lines_prs:
description: Number of changed lines in the deployed PRs per repository.
additionalProperties:
minimum: 0
type: integer
type: object
lines_overall:
description: Number of changed lines in the deployment per repository.
additionalProperties:
minimum: 0
type: integer
type: object
commits_prs:
description: Number of deployed PR commits per repository.
additionalProperties:
minimum: 0
type: integer
type: object
commits_overall:
description: Number of deployed commits per repository.
additionalProperties:
minimum: 0
type: integer
type: object
jira:
description: JIRA issues mentioned in the deployed PRs.
additionalProperties:
items:
type: string
type: array
type: object
required:
- commits_overall
- commits_prs
- lines_overall
- lines_prs
- prs
type: object
prs:
description: List of deployed pull requests.
items:
$ref: '#/components/schemas/DeployedPullRequest'
type: array
releases:
description: Deployed releases. The format matches `FilteredRelease`
except that `prs` is the number of released pull requests instead of a list.
items:
$ref: '#/components/schemas/DeployedRelease'
type: array
required:
- code
type: object
# yamllint disable-line rule:key-ordering
FilteredDeployment:
allOf:
- $ref: '#/components/schemas/DeploymentNotification'
- $ref: '#/components/schemas/DeploymentAnalysis'
description: Everything we know about the deployment.
type: object
# yamllint disable-line rule:key-ordering
DeployedPullRequest:
allOf:
- properties:
repository:
$ref: '#/components/schemas/RepositoryID'
required:
- repository
type: object
- $ref: '#/components/schemas/ReleasedPullRequest'
description: Brief information about a deployed pull request.
type: object
# yamllint disable-line rule:key-ordering
WorkTypeName:
description: Work type name. It is unique within the account scope.
minLength: 1
type: string
# yamllint disable-line rule:key-ordering
WorkTypeGetRequest:
description: Identifier of a work type - a set of rules to group PRs, releases,
etc. together.
example:
account: 1
name: Bug Fixing
properties:
account:
description: User's account ID.
type: integer
name:
$ref: '#/components/schemas/WorkTypeName'
required:
- account
- name
type: object
# yamllint disable-line rule:key-ordering
WorkTypes:
description: |
List of work types. Response from `/settings/work_types/{account}`.
items:
$ref: '#/components/schemas/WorkType'
type: array
# yamllint disable-line rule:key-ordering
WorkType:
description: Definition of a work type - a set of rules to group PRs, releases,
etc. together.
example:
name: Bug Fixing
color: FF0000
rules:
- name: pull_request/label_include
body:
crazy_args:
- javascript
- really
sucks: true
properties:
name:
$ref: '#/components/schemas/WorkTypeName'
color:
$ref: '#/components/schemas/Color'
rules:
items:
$ref: '#/components/schemas/WorkTypeRule'
type: array
required:
- color
- name
- rules
type: object
# yamllint disable-line rule:key-ordering
WorkTypeRule:
description: 'Specific rule details: name and parameters.'
example:
name: pull_request/label_include
body:
crazy_args:
- javascript
- really
sucks: true
properties:
name:
description: Rule name - must be unique within the parent work type.
minLength: 1
type: string
body:
description: Freeform parameters of the rule.
type: object
required:
- body
- name
type: object
# yamllint disable-line rule:key-ordering
WorkTypePutRequest:
description: Request body of `PUT /settings/work_type`.
example:
work_type:
name: Bug Fixing
color: FF0000
rules:
- name: pull_request/label_include
body:
crazy_args:
- javascript
- really
sucks: true
account: 1
properties:
account:
description: Account ID.
type: integer
work_type:
$ref: '#/components/schemas/WorkType'
required:
- account
- work_type
type: object
# yamllint disable-line rule:key-ordering
DeploymentMetricID:
description: |
Supported deployment metrics.
* `dep-count` - number of deployments in the time period.
* `dep-duration-all` - average deployment procedure time - the difference between `date_finished` and `date_started` of `DeploymentNotification`.
* `dep-duration-successful` - average successful deployment procedure time - the difference between `date_finished` and `date_started` of `DeploymentNotification` with `conclusion = 'SUCCESS'`.
* `dep-duration-failed` - average failed deployment procedure time - the difference between `date_finished` and `date_started` of `DeploymentNotification` with `conclusion = 'FAILURE'`.
* `dep-success-count` - number of successful deployments in the time period.
* `dep-failure-count` - number of failed deployments in the time period.
* `dep-success-ratio` - ratio between successful and all deployments.
* `dep-change-failure-count` - number of successful deployments introducing a failure in the system. This pertains deployments effects so is different from `dep-failure-count` which is about deployments execution. A deployment can be marked as introducing a failure by associating it with the `failure` label, with any value.
* `dep-change-failure-ratio` - ratio between `dep-change-failure-count` and `dep-success-count`.
* `dep-size-prs` - average number of deployed pull requests.
* `dep-size-releases` - average number of deployed releases.
* `dep-size-lines` - average number of deployed lines of code (changed = insertions + removals).
* `dep-size-commits` - average number of deployed commits.
* `dep-prs-count` - number of pull requests deployed in the time period.
* `dep-releases-count` - number of releases deployed in the time period.
* `dep-lines-count` - number of deployed lines of code (changed = insertions + removals).
* `dep-commits-count` - number of deployed commits.
* `dep-jira-issues-count` - number of JIRA issues mapped to deployed pull requests.
* `dep-jira-bug-fixes-count` - number of deployed bug fixes.
enum:
- dep-count
- dep-duration-all
- dep-duration-successful
- dep-duration-failed
- dep-success-count
- dep-failure-count
- dep-success-ratio
- dep-change-failure-count
- dep-change-failure-ratio
- dep-size-prs
- dep-size-releases
- dep-size-lines
- dep-size-commits
- dep-prs-count
- dep-releases-count
- dep-lines-count
- dep-commits-count
- dep-jira-issues-count
- dep-jira-bug-fixes-count
type: string
# yamllint disable-line rule:key-ordering
ForSetDeployments:
additionalProperties: false
description: |
Filters for `/metrics/deployments`. Nothing is strictly required.
Achieve the best performance by packing all your filters in a single `ForSetDeployments`
instead of sending multiple `ForSetDeployments`-s. For example, use `repogroups` and `withgroups`
to request separate metrics for several repository sets and teams.
example:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
withgroups:
- pr_author:
- github.com/se7entyse7en
- github.com/vmarkovtsev
jira:
labels_include:
- bug
environments:
- production
properties:
repositories:
$ref: '#/components/schemas/RepositorySet'
repogroups:
$ref: '#/components/schemas/IndexedGroups'
with:
$ref: '#/components/schemas/DeploymentWith'
withgroups:
description: Alternative to `with` - calculate metrics for distinct filters
separately.
items:
$ref: '#/components/schemas/DeploymentWith'
type: array
pr_labels_include:
description: At least one of these labels must be present in at least one
deployed PR.
items:
type: string
type: array
pr_labels_exclude:
description: None of these labels must be present in each deployed PR.
items:
type: string
type: array
jira:
$ref: '#/components/schemas/JIRAFilter'
with_labels:
description: Deployments should contain at least one of the specified label
values. `null` matches any label value and effectively checks the label
existence.
type: object
without_labels:
description: Deployments may not contain the specified label values. `null`
matches any label value and effectively ensures that the label does not
exist.
type: object
environments:
description: |
List of environments for which to calculate the metrics.
We calculate the metrics for each environment independently.
items:
type: string
type: array
envgroups:
description: |
List of environment groups for which to calculate the metrics.
items:
items:
type: string
type: array
type: array
type: object
# yamllint disable-line rule:key-ordering
DeploymentMetricsRequest:
additionalProperties: false
description: Request body of `/metrics/deployments`, the deployments selector.
example:
for:
- repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
withgroups:
- pr_author:
- github.com/se7entyse7en
- github.com/vmarkovtsev
jira:
labels_include:
- bug
metrics:
- dep-duration-successful
- dep-success-ratio
date_from: 2021-07-20
date_to: 2021-10-07
granularities:
- all
- 2 week
account: 1
properties:
for:
description: |-
Sets of filters for which to calculate the metrics.
The aggregation is `AND` between individual properties like `repositories` or `with`.
The aggregation is `OR` inside each property.
items:
$ref: '#/components/schemas/ForSetDeployments'
type: array
metrics:
description: Requested metric identifiers.
items:
$ref: '#/components/schemas/DeploymentMetricID'
type: array
date_from:
description: Date from when to start measuring the metrics.
format: date
type: string
date_to:
description: Date until which to measure the metrics.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
granularities:
$ref: '#/components/schemas/Granularities'
quantiles:
$ref: '#/components/schemas/Quantiles'
account:
description: Session account ID.
type: integer
required:
- account
- date_from
- date_to
- for
- granularities
- metrics
type: object
# yamllint disable-line rule:key-ordering
CalculatedDeploymentMetric:
additionalProperties: false
description: Calculated metrics for a deployments group.
example:
for:
repositories:
- github.com/athenianco/athenian-webapp
- github.com/athenianco/athenian-api
with:
pr_author:
- github.com/se7entyse7en
- github.com/vmarkovtsev
metrics:
- dep-duration-successful
- dep-success-ratio
granularity: all
values:
- date: 2020-07-20
values:
- 600s
- 0.91
confidence_mins:
- 550s
- null
confidence_maxs:
- 630s
- null
confidence_scores:
- 84
- null
properties:
for:
$ref: '#/components/schemas/ForSetDeployments'
metrics:
items:
$ref: '#/components/schemas/DeploymentMetricID'
type: array
granularity:
$ref: '#/components/schemas/Granularity'
values:
description: The sequence steps from `date_from` till `date_to` by `granularity`.
items:
$ref: '#/components/schemas/CalculatedLinearMetricValues'
type: array
required:
- for
- granularity
- metrics
- values
type: object
# yamllint disable-line rule:key-ordering
CalculatedDeploymentMetrics:
description: |
Response from `/metrics/deployments`, metrics calculated for each
selected deployments group.
The order of the items is *not* guaranteed to match any expectations.
items:
$ref: '#/components/schemas/CalculatedDeploymentMetric'
type: array
# yamllint disable-line rule:key-ordering
LogicalRepositories:
description: List of configured logical repositories.
items:
$ref: '#/components/schemas/LogicalRepository'
type: array
# yamllint disable-line rule:key-ordering
LogicalRepositoryRequest:
additionalProperties: false
description: |
Set of rules to match PRs, releases, and deployments that has a name and
pretends to be a regular GitHub repository everywhere in UI and API requests.
Release settings become visible in `/settings/release_match`.
example:
account: 1
prs:
title: .*[Cc]omponent [Aa]lpha
labels_include:
- alpha
- webapp
parent: github.com/athenianco/athenian-monorepo
deployments: {}
name: Webapp
releases:
branches: '{{ "{{default}}" }}'
tags: webapp-.*
match: tag
properties:
account:
description: Account ID.
type: integer
name:
description: |
The logical part of the repository name.
Compared to GitHub repository name requirements, we additionally allow /
to express the hierarchy further.
maxLength: 100
pattern: ^([a-zA-Z0-9-_]+/?)*[a-zA-Z0-9-_]+$
type: string
parent:
$ref: '#/components/schemas/RepositoryID'
prs:
$ref: '#/components/schemas/LogicalPRRules'
releases:
$ref: '#/components/schemas/ReleaseMatchSetting'
deployments:
$ref: '#/components/schemas/LogicalDeploymentRules'
required:
- account
- name
- parent
- prs
- releases
type: object
# yamllint disable-line rule:key-ordering
LogicalRepository:
additionalProperties: false
description: |
Set of rules to match PRs, releases, and deployments that has a name and
pretends to be a regular GitHub repository everywhere in UI and API requests.
Release settings are also visible in `/settings/release_match`.
example:
prs:
title: .*[Cc]omponent [Aa]lpha
labels_include:
- alpha
- webapp
parent: github.com/athenianco/athenian-monorepo
deployments: {}
name: Webapp
releases:
branches: '{{ "{{default}}" }}'
tags: webapp-.*
match: tag
properties:
name:
description: |
The logical part of the repository name.
Compared to GitHub repository name requirements, we additionally allow /
to express the hierarchy further.
maxLength: 100
pattern: ^([a-zA-Z0-9-_]+/?)*[a-zA-Z0-9-_]+$
type: string
parent:
$ref: '#/components/schemas/RepositoryID'
prs:
$ref: '#/components/schemas/LogicalPRRules'
releases:
$ref: '#/components/schemas/ReleaseMatchSetting'
deployments:
$ref: '#/components/schemas/LogicalDeploymentRules'
required:
- name
- parent
- prs
- releases
type: object
# yamllint disable-line rule:key-ordering
LogicalPRRules:
additionalProperties: false
description: Rules to match PRs to logical repository.
example:
title: .*[Cc]omponent [Aa]lpha
labels_include:
- alpha
- webapp
properties:
title:
description: |
Regular expression to match the PR title. It must be a match starting from
the start of the string.
example: .*[Cc]omponent [Aa]lpha
type: string
labels_include:
description: Any matching label puts the PR into the logical repository.
items:
type: string
type: array
type: object
# yamllint disable-line rule:key-ordering
LogicalDeploymentRules:
additionalProperties: false
description: Rules to match deployments to logical repository.
example:
title: .*[Aa]lpha
labels_include:
repositories:
- alpha
properties:
title:
description: |
Regular expression to match the deployment name. It must be a match starting from
the start of the string.
example: .*[Aa]lpha
type: string
labels_include:
additionalProperties:
items:
type: string
minItems: 1
type: array
description: |
Match deployments labeled by any key and having at least one value in the list.
type: object
type: object
# yamllint disable-line rule:key-ordering
LogicalRepositoryGetRequest:
additionalProperties: false
description: Pointer to a logical repository.
example:
account: 1
name: github.com/athenianco/athenian-api/alpha
properties:
account:
description: Account ID.
type: integer
name:
$ref: '#/components/schemas/RepositoryID'
required:
- account
- name
type: object
# yamllint disable-line rule:key-ordering
FilterEnvironmentsRequest:
additionalProperties: false
description: Request body of `/filter/environments`. Filters for deployment
environments.
example:
repositories:
- github.com/athenianco/athenian-api
- github.com/athenianco/athenian-webapp
date_to: 2022-02-23
account: 1
date_from: 2022-01-23
properties:
account:
description: Account ID.
type: integer
repositories:
allOf:
- $ref: '#/components/schemas/RepositorySet'
- description: |
At least one repository in the list must be deployed in `[date_from, date_to)`.
date_from:
description: Date from when to start looking for deployments.
format: date
type: string
date_to:
description: Date until which to look for deployments.
format: date
type: string
timezone:
$ref: '#/components/schemas/TimeZone'
required:
- account
- date_from
- date_to
type: object
# yamllint disable-line rule:key-ordering
FilteredEnvironments:
description: List of distinct deployment environments.
items:
$ref: '#/components/schemas/FilteredEnvironment'
type: array
# yamllint disable-line rule:key-ordering
FilteredEnvironment:
additionalProperties: false
description: Details about a deployment environment.
example:
deployments_count: 100
last_conclusion: SUCCESS
name: production
repositories:
- github.com/athenianco/athenian-api
- github.com/athenianco/athenian-webapp
properties:
deployments_count:
description: Number of deployments (successful or not) in the specified time interval.
minimum: 1
type: integer
last_conclusion:
allOf:
- $ref: '#/components/schemas/DeploymentConclusion'
- description: The conclusion of the most recent deployment before `date_to`.
name:
description: Name of the environment.
type: string
repositories:
allOf:
- $ref: '#/components/schemas/RepositorySet'
- description: List of repositories which had at least one deployment between date_from and date_to.
required:
- deployments_count
- last_conclusion
- name
- repositories
type: object
# yamllint disable-line rule:key-ordering
Share:
additionalProperties: false
description: Saved UI views state with metadata.
example:
author: Vadim Markovtsev
created: 2022-05-05T12:00:00Z
data:
whatever: 777
properties:
author:
description: User name who submitted.
type: string
created:
description: Submission timestamp.
format: date-time
type: string
data:
description: Saved object.
type: object
required:
- author
- created
- data
type: object
WithBothJiraAndJiragroups:
description: An object having both jira and jiragroups fields.
properties:
jira: {}
jiragroups: {}
required:
- jira
- jiragroups
type: object
securitySchemes:
apiKeyAuth:
description: |-
Authorization by the value of `X-API-Key` header aka API token.
The tokens are user- and account-specific. Create them by calling `/token/create`.
The server automatically inserts `account` in the request's body if it was not
supplied by the user.
in: header
name: X-API-Key
type: apiKey
x-apikeyInfoFunc: athenian.api.controllers.security_controller.info_from_apiKeyAuth
bearerAuth:
bearerFormat: JWT
description: |-
Regular JSON Web Token authorization powered by Auth0.
The server expects an `Authorization: Bearer ` header and checks `` by
sending it to Auth0. Visit [{{ server_url | replace("api", "app") }}/bearer]({{ server_url | replace("api", "app") }}/bearer)
to copy your current JWT that will expire within 24 hours.
scheme: bearer
type: http
x-bearerInfoFunc: athenian.api.controllers.security_controller.info_from_bearerAuth