Variables list and description
You can use the following variables in your template.
jira_ids: string[]
jira_ids: string[]
A list of Jira tickets associated with the issues contained within the pull request. Ensurethat the Snyk Jira integration is enabled on the Project or repository that contains the Project and that you have linked Snyk issues to JIRA tickets.
To automatically link Jira to the relevant pull requests, include a list of associated Jira tickets in the commit message.
Input
Output
The commit message of your PR will be:
This output indicates that the suggested solution successfully resolved three problems. It also includes links to every Jira ticket.
snyk_project_url: string
snyk_project_url: string
This is the Snyk Project URL and can be used to link to the Snyk Project page.
Input
Output
The description of your PR will be:
In this output, my-org
is your Snyk Organization name and xx-xxx-xx-xx-xxxx
is the public ID of your Project or repository.
snyk_project_name: string
snyk_project_name: string
This is the Snyk Project name. You can add the Snyk Project name to your description.
Input
Output
The description of your PR will be:
snyk_org_name: string
snyk_org_name: string
This is the Snyk Organization name. You can add the Snyk Organization name to your description.
Input
Output
The description of your PR will be:
package_name: string
package_name: string
This is the name of the package being fixed or upgraded. When more than one package is changed, this variable will default to the first one.
Follow this example to display in the description the package name of the first dependency being fixed in the PR.
Input
Output
The description of your PR will be:
package_from: string
package_from: string
This is the version of the package that is being fixed or upgraded. In cases where more than one package is changed, this variable will default to the from
version of the first one.
Input
Output
The description of your PR will be:
package_to: string
package_to: string
The package is transitioning to this particular version. In cases where more than one package is changed, this variable will default to the to
version of the first one.
Input
Output
The description of your PR will be:
issue_count: number
issue_count: number
This is the number of issues in your Project or repository that are covered by the PR.
Input
Output
The description of your PR will be:
product_is_container: boolean
product_is_container: boolean
This variable can be used to customize attributes based on whether the PR is a Snyk Container product. Currently, there are two different product types at Snyk that can open PRs (Snyk Open Source PRs and Snyk Container PRs). Using this variable will help you customize your template to differentiate between the two.
Input
Output
If your PR is an Open Source product, then the description of your PR will be:
product_is_open_source: boolean
product_is_open_source: boolean
This variable can be used to customize attributes based on whether the PR is an Open-Source product. Currently, Snyk has two different product types that can open PRs (Open-Source PRs and Container PRs). Using this variable will help you customize your template to differentiate between the two.
Input
Output
If your PR is an Open Source product then the description of your PR will be:
is_fix_pr: boolean
is_fix_pr: boolean
This variable can be used to customize attributes based on whether the PR is a backlog PR, for example, opened to fix new vulnerabilities introduced to the Project or repository in the latest scan. In the example below, you can see that the description of the PR will only show if it is a fixed PR.
Input
Output
If your PR is a fixed PR ,then the description of your PR will be:
is_backlog_pr: boolean
is_backlog_pr: boolean
This variable can be used to customize attributes based on whether the PR is a backlog PR, for example, opened to fix known vulnerabilities already in the Project or repository. In the example below you can see that the description of the PR will only show if it is a backlog PR.
Input
Output
If your PR is a backlog PR then the description of your PR will be:
is_upgrade_pr: boolean
is_upgrade_pr: boolean
This variable can be used to customize attributes based on whether the PR is an Upgrade PR, or to upgrade dependencies to newer versions regardless of vulnerabilities. In the example below you can see that the description of the PR will only show if it is an upgrade PR.
Input
Output
If your PR is an upgrade PR then the description of your PR will be:
files_changed
files_changed
This variable can be used in your template to list the files changed as part of the pull request.
Input
Output
If the pull request was for a maven project and the changes made were in the pom.xml file then this is what the description of your PR would look like.
container.recommended_base_image_name
container.recommended_base_image_name
This variable is for container projects only. It can be used to display the name of the recommended base image applied in this PR.
Input
Output
The description of your PR will be:
container.current_base_image_name
container.current_base_image_name
This variable is for container projects only. It can be used to display the current base image.
Input
Output
The description of your PR will be:
snyk_pull_request_type: prType (fix, upgrade, backlog, unknown)
snyk_pull_request_type: prType (fix, upgrade, backlog, unknown)
This is the prType of your Project or repository. You can use it to display the PR type from the pull request description.
Input
Output
If you have opened a Fix PR, then the commit message of your PR will be:
Last updated