Repository configuration¶
A repository must be configured (example) before use:
datastore_id = "..."
qa_statuses = ["..."]
[teams."..."]
github_team = "..."
jira_project = "..."
jira_issue_type = "..."
jira_statuses = ["..."]
The config file is located by default in your repository at /.ddqa/config.toml and can be overridden with the top level --config option.
Core options¶
Member source (required, choose one)¶
The GitHub-username-to-Jira-account-ID mapping that the tool needs in order to operate must come from exactly one of the following two sources. Configuring both, or neither, is an error.
Datastore ID¶
Key: datastore_id
This is the ID of the Datadog Actions Datastore that contains the mapping of GitHub usernames to Jira account IDs.
The Jira server URL is not configured in ddqa itself; it must be stored in the same datastore, as an item whose github_user field is the reserved value ddqa__jira_server__ and whose jira_user field is the Jira server URL, for example https://<ORG>.atlassian.net.
Global config source¶
Key: global_config_source
This is the URL to a raw TOML file, hosted in a GitHub repository, that contains the mapping of GitHub usernames to Jira account IDs, for example:
global_config_source = "https://raw.githubusercontent.com/<ORG>/<REPO>/main/config.toml"
The referenced TOML file must define a jira_server key and a members table mapping GitHub usernames to Jira account IDs:
jira_server = "https://<ORG>.atlassian.net"
[members]
some-github-user = "<JIRA_ACCOUNT_ID>"
QA statuses (required)¶
Key: qa_statuses
The entries and order of this list correspond to the desired QA workflow, for example:
qa_statuses = [
"TODO",
"Testing",
"Done",
]
Ignored labels¶
Key: ignored_labels
Any pull requests labeled with any of the entries will not be assigned by default:
ignored_labels = [
"changelog/no-changelog",
]
Teams¶
Each team must be configured.
[teams."..."]
# Per-team options
The name of each team is arbitrary but should be the human readable version or a nickname. The order of teams is also arbitrary but would benefit from being ordered by teams that commit/would be assigned most frequently as manual selection would potentially require less scrolling.
GitHub team (required)¶
Key: github_team
This is the team's GitHub name, excluding the organization <ORG>/ prefix.
Jira project (required)¶
Key: jira_project
This is the team's Jira project in which issues will be created. If there exists an issue FOO-123, the project name is FOO.
Jira issue type (required)¶
Key: jira_issue_type
This is the type of Jira issue that will be created and will most often be Task. The issue type can be found as the fields.issuetype.name returned value in the payload from the /rest/api/2/issue/{issueIdOrKey} endpoint.
Jira statuses (required)¶
Key: jira_statuses
This is an array of Jira statuses that correspond to the order of QA status entries. Alternatively, this may be a mapping of QA statuses to Jira statuses. The available Jira statuses may be found using the /rest/api/2/project/{projectIdOrKey}/statuses endpoint.
GitHub labels¶
Key: github_labels
When a pull request author belongs to a configured GitHub team, only that team will be assigned by default. When the author is not a member of any configured team, this team will be assigned by default to any pull requests that are labeled with any of the entries (as long as the pull request has no labels that match any of those defined as ignored).
Jira component¶
Key: jira_component
This is the name of a Jira project component with which to create issues.
Excluded members¶
Key: exclude_members
This is an array of GitHub usernames who should be excluded from QA participation.