Tokens
Tokens types
String
Template: [GROUP:PROPERTY].
Boolean
Template: [GROUP:PROPERTY|<TEXT IF TRUE>|<TEXT IF FALSE>].
Date
Template: [GROUP:PROPERTY|<FORMAT>]. For format allowed use any letters of PHP's date function.
Collection
Template: [GROUP:PROPERTY|<SEPARATOR>|<FILTER>]<RENDERED STRING FOR EVERY ITEM OF THE COLLECTION>[/GROUP:PROPERTY].
Add several filter properties using plus (+).
Tokens
Task
| Token | Type | Example | Result |
|---|---|---|---|
| [task:id] | string | [task:id] | 123 |
| [task:status] | string | [task:status] | new_updates_available |
| [task:branch] | string | [task:branch] | master |
| [task:update-from-vulnerable-version] | boolean | [task:update-from-vulnerable-version|yes|no] | yes |
| [task:updated-at] | date | [task:updated-at|d-m-Y-H-i-s], [task:updated-at|U] | 17-12-2018-12-32-12, 1538937477334 |
| [task:created-at] | date | [task:created-at|d-m-Y-H-i-s], [task:created-at|U] | 17-12-2018-12-32-12, 1538937477334 |
| [task:url] | string | [task:url] | https://app.codario.io/projects/xxx/tasks/xxx |
| [task:external-issue-id] | string | [task:external-issue-id] | 748332 (the issue ID from the corresponding project management system) |
| [task:packages] | collection | [task:packages|,|main+sub+with_vulnerabilities+without_vulnerabilities][package:name]: [package:current-version] -> [package:new-version][/task:packages] | vendor/a: 1.2.3 -> 1.2.4,vendor/b: 1.7.3 -> 1.8.2 |
For the [task:packages] token you can use the following filter properties:
- main: get "main" packages (specified in a manifest file)
- sub: get "subpackages" (dependencies from "main" packages)
- with_vulnerabilities: get packages with vulnerabilities
- without_vulnerabilities: get packages without vulnerabilities
For example:
- to get all
mainpackages use:main+with_vulnerabilities+without_vulnerabilities - to get all
subpackageswithout vulnerabilitiesuse:sub+without_vulnerabilities - to get all packages use:
main+sub+with_vulnerabilities+without_vulnerabilitiesor just use empty value for the filter.
Packages
Available only inside [task:packages].
| Token | Type | Example | Result |
|---|---|---|---|
| [package:name] | string | [package:name] | vendor/a |
| [package:path] | string | [package:path] | composer.lock |
| [package:current-version] | string | [package:current-version] | 1.2.3 |
| [package:new-version] | string | [package:new-version] | 1.2.4 |
| [package:update-from-vulnerable-version] | boolean | [package:update-from-vulnerable-version|yes|no] | yes |
| [package:is-applied] | boolean | [package:is-applied] | yes |
| [package:created-at] | date | [package:created-at|d-m-Y-H-i-s], [package:created-at|U] | 17-12-2018-12-32-12, 1538937477334 |
Project
| Token | Type | Example | Result |
|---|---|---|---|
| [project:id] | string | [project:id] | xxxxxx |
| [project:workspace:id] | string | [project:workspace:id] | 1 |
| [project:name] | string | [project:name] | Project A |
| [project:manager] | string | [project:manager] | composer |
| [project:git-path] | string | [project:git-path] | git@host:repo.git |
| [project:main-branch] | string | [project:main-branch] | master |
| [project:root-folder] | string | [project:root-folder] | app |
| [project:created-at] | date | [project:created-at|d-m-Y-H-i-s], [project:created-at|U] | 17-12-2018-12-32-12, 1538937477334 |
| [project:url] | string | [project:url] | https://app.codario.io/projects/xxx |
| [project:integration:pm] | string | [project:integration:pm] | my_jira_system |
| [project:integration:collaboration] | string | [project:integration:collaboration] | my_slack |
| [project:integration:cicd] | string | [project:integration:cicd] | ssh.server-1 |
Workspace
| Token | Type | Example | Result |
|---|---|---|---|
| [workspace:id] | string | [workspace:id] | xxxxxxxx |
| [workspace:name] | string | [workspace:name] | My Workspace |
| [workspace:members] | collection | [workspace:members|,|admins+users][member:email][/workspace:members] | [email protected],[email protected],[email protected] |
| [workspace:created-at] | date | [workspace:created-at|d-m-Y-H-i-s], [workspace:created-at|U] | 17-12-2018-12-32-12, 1538937477334 |
For the [workspace:members] token you can use the following filter properties:
- admins: get users with "admin" role
- users: get users with "user" role
Members
Available only inside [workspace:members].
| Token | Type | Example | Result |
|---|---|---|---|
| [member:email] | string | [member:email] | [email protected] |
Date
| Token | Type | Example | Result |
|---|---|---|---|
| [date:current] | date | [date:current|d-m-Y-H-i-s], [date:current|U] | 17-12-2018-12-32-12, 1538937477334 |
Integrations
Available to use only inside extra.private_data section.
Instead ALIAS use the alias of necessary integration.
| Token | Type | Example | Result |
|---|---|---|---|
| [integration:host|ALIAS] | string | [integration:host|my-github] | https://github.com |
| [integration:username|ALIAS] | string | [integration:username|my-github] | john.doe |
| [integration:token|ALIAS] | string | [integration:token|my-github] | xxxxxxxxxxxxxxxxxxxxxxxxx |