Pull Request Templates
Configures a group level pull request template that will be used on any org or project within that group
Required permissions
Edit Group settings (group.settings.edit)
Snyk Group ID
7626925e-4b0f-11ee-be56-0242ac120002
Requested API version
2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Pull Request Template created for group.
Bad Request: A parameter provided as a part of the request was invalid.
Unauthorized: the request requires an authentication token.
Forbidden: the request requires an authentication token with more or different permissions.
Not Found: The resource being operated on could not be found.
Internal Server Error: An error was encountered while attempting to process the request.
POST /rest/groups/{group_id}/settings/pull_request_template HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 519
{
"data": {
"attributes": {
"commit_message": "chore(deps): bump {{package_name}} from {{package_from}} to {{package_to}}",
"description": "{{ #is_upgrade_pr }} This PR has been opened to make sure our repositories are kept up-to-date. It updates {{ package_name }} from version {{ package_from }} to version {{ package_to }}. Review relevant docs for possible breaking changes. {{ /is_upgrade_pr }}\n",
"title": "Snyk has created this PR to upgrade {{package_name}} from {{package_from}} to {{package_to}}."
},
"type": "resource"
}
}
{
"data": {
"attributes": {
"commit_message": "chore(deps): bump {{package_name}} from {{package_from}} to {{package_to}}",
"description": "{{ #is_upgrade_pr }} This PR has been opened to make sure our repositories are kept up-to-date. It updates {{ package_name }} from version {{ package_from }} to version {{ package_to }}. Review relevant docs for possible breaking changes. {{ /is_upgrade_pr }}\n",
"title": "Snyk has created this PR to upgrade {{package_name}} from {{package_from}} to {{package_to}}."
},
"id": "https://api.snyk.io/rest/groups/7626925e-4b0f-11ee-be56-0242ac120002/pull_request_template",
"type": "resource"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
"last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
"next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
}
}
Get your groups pull request template
Required permissions
View Group settings (group.settings.read)
Snyk Group ID
7626925e-4b0f-11ee-be56-0242ac120002
Requested API version
2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Return the page of results immediately after this cursor
v1.eyJpZCI6IjEwMDAifQo=
Return the page of results immediately before this cursor
v1.eyJpZCI6IjExMDAifQo=
Number of results to return per page
10
Example: 10
Fetch Pull Request Template for group.
Bad Request: A parameter provided as a part of the request was invalid.
Unauthorized: the request requires an authentication token.
Forbidden: the request requires an authentication token with more or different permissions.
Not Found: The resource being operated on could not be found.
Internal Server Error: An error was encountered while attempting to process the request.
GET /rest/groups/{group_id}/settings/pull_request_template HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"attributes": {
"commit_message": "chore(deps): bump {{package_name}} from {{package_from}} to {{package_to}}",
"description": "{{ #is_upgrade_pr }} This PR has been opened to make sure our repositories are kept up-to-date. It updates {{ package_name }} from version {{ package_from }} to version {{ package_to }}. Review relevant docs for possible breaking changes. {{ /is_upgrade_pr }}\n",
"title": "Snyk has created this PR to upgrade {{package_name}} from {{package_from}} to {{package_to}}."
},
"id": "https://api.snyk.io/rest/groups/7626925e-4b0f-11ee-be56-0242ac120002/pull_request_template",
"type": "resource"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
"last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
"next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
}
}
Delete your groups pull request template. This means Snyk pull requests will start to use the default template for this group.
Required permissions
Edit Group settings (group.settings.edit)
Snyk Group ID
7626925e-4b0f-11ee-be56-0242ac120002
Requested API version
2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
The operation completed successfully with no content
Bad Request: A parameter provided as a part of the request was invalid.
Unauthorized: the request requires an authentication token.
Forbidden: the request requires an authentication token with more or different permissions.
Not Found: The resource being operated on could not be found.
Internal Server Error: An error was encountered while attempting to process the request.
DELETE /rest/groups/{group_id}/settings/pull_request_template HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
No content
Last updated
Was this helpful?