2020-09-07 08:56:14 -07:00
import {
INodeProperties ,
} from 'n8n-workflow' ;
2021-12-03 00:44:16 -08:00
export const releaseOperations : INodeProperties [ ] = [
2020-09-07 08:56:14 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-09-07 08:56:14 -07:00
displayOptions : {
show : {
resource : [
'release' ,
] ,
} ,
} ,
options : [
{
name : 'Create' ,
value : 'create' ,
description : 'Create a release' ,
} ,
2021-04-23 15:38:15 -07:00
{
name : 'Delete' ,
value : 'delete' ,
description : 'Delete a release' ,
} ,
2020-09-07 08:56:14 -07:00
{
name : 'Get' ,
value : 'get' ,
description : 'Get release by version identifier' ,
} ,
{
name : 'Get All' ,
value : 'getAll' ,
description : 'Get all releases' ,
} ,
2021-04-23 15:37:37 -07:00
{
name : 'Update' ,
value : 'update' ,
description : 'Update a release' ,
} ,
2020-09-07 08:56:14 -07:00
] ,
default : 'get' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-09-07 08:56:14 -07:00
2021-12-03 00:44:16 -08:00
export const releaseFields : INodeProperties [ ] = [
2020-09-07 08:56:14 -07:00
/* -------------------------------------------------------------------------- */
/* release:getAll */
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Organization Slug Name or ID' ,
2020-09-07 08:56:14 -07:00
name : 'organizationSlug' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getOrganizations' ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
required : true ,
2022-06-03 10:23:49 -07:00
description : 'The slug of the organization the releases belong to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
operation : [
'getAll' ,
] ,
resource : [
'release' ,
] ,
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
operation : [
'getAll' ,
] ,
resource : [
'release' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 500 ,
} ,
default : 100 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
options : [
{
displayName : 'Query' ,
name : 'query' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'This parameter can be used to create a “starts with” filter for the version' ,
2020-09-07 08:56:14 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
2021-04-23 15:38:15 -07:00
2020-09-07 08:56:14 -07:00
/* -------------------------------------------------------------------------- */
2021-04-23 15:37:37 -07:00
/* release:get/delete */
2020-09-07 08:56:14 -07:00
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Organization Slug Name or ID' ,
2020-09-07 08:56:14 -07:00
name : 'organizationSlug' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getOrganizations' ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'get' ,
2021-04-23 15:37:37 -07:00
'delete' ,
2020-09-07 08:56:14 -07:00
] ,
} ,
} ,
required : true ,
2022-06-03 10:23:49 -07:00
description : 'The slug of the organization the release belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Version' ,
name : 'version' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'get' ,
2021-04-23 15:37:37 -07:00
'delete' ,
2020-09-07 08:56:14 -07:00
] ,
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The version identifier of the release' ,
2020-09-07 08:56:14 -07:00
} ,
2021-04-23 15:38:15 -07:00
2020-09-07 08:56:14 -07:00
/* -------------------------------------------------------------------------- */
/* release:create */
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Organization Slug Name or ID' ,
2020-09-07 08:56:14 -07:00
name : 'organizationSlug' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getOrganizations' ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'create' ,
] ,
} ,
} ,
required : true ,
2022-06-03 10:23:49 -07:00
description : 'The slug of the organization the release belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Version' ,
name : 'version' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'create' ,
] ,
} ,
} ,
required : true ,
2021-04-23 15:37:37 -07:00
description : 'A version identifier for this release. Can be a version number, a commit hash etc.' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'URL' ,
name : 'url' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'create' ,
] ,
} ,
} ,
required : true ,
2021-04-23 15:37:37 -07:00
description : 'A URL that points to the release. This can be the path to an online interface to the sourcecode for instance.' ,
2020-09-07 08:56:14 -07:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Project Names or IDs' ,
2020-09-07 08:56:14 -07:00
name : 'projects' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getProjects' ,
} ,
2022-04-22 09:29:51 -07:00
default : [ ] ,
2020-09-07 08:56:14 -07:00
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'create' ,
] ,
} ,
} ,
required : true ,
2022-06-20 07:54:01 -07:00
description : 'A list of project slugs that are involved in this release. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'create' ,
] ,
} ,
} ,
options : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Date Released' ,
2020-09-07 08:56:14 -07:00
name : 'dateReleased' ,
type : 'dateTime' ,
default : '' ,
2021-04-23 15:37:37 -07:00
description : 'An optional date that indicates when the release went live. If not provided the current time is assumed.' ,
} ,
{
displayName : 'Commits' ,
name : 'commits' ,
2022-05-06 14:01:25 -07:00
description : 'An optional list of commit data to be associated with the release' ,
2021-04-23 15:37:37 -07:00
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'commitProperties' ,
displayName : 'Commit Properties' ,
values : [
{
displayName : 'ID' ,
name : 'id' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The sha of the commit' ,
2021-04-23 15:37:37 -07:00
required : true ,
} ,
{
displayName : 'Author Email' ,
name : 'authorEmail' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Authors email' ,
2021-04-23 15:37:37 -07:00
} ,
{
displayName : 'Author Name' ,
name : 'authorName' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Name of author' ,
2021-04-23 15:37:37 -07:00
} ,
{
displayName : 'Message' ,
name : 'message' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Message of commit' ,
2021-04-23 15:37:37 -07:00
} ,
{
displayName : 'Patch Set' ,
name : 'patchSet' ,
description : 'A list of the files that have been changed in the commit. Specifying the patch_set is necessary to power suspect commits and suggested assignees.' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'patchSetProperties' ,
displayName : 'Patch Set Properties' ,
values : [
{
displayName : 'Path' ,
name : 'path' ,
type : 'string' ,
default : '' ,
description : 'The path to the file. Both forward and backward slashes are supported.' ,
required : true ,
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The types of changes that happend in that commit' ,
2021-04-23 15:37:37 -07:00
options : [
{
name : 'Add' ,
value : 'add' ,
} ,
{
name : 'Modify' ,
value : 'modify' ,
} ,
{
name : 'Delete' ,
value : 'delete' ,
} ,
] ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Repository' ,
name : 'repository' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Repository name' ,
2021-04-23 15:37:37 -07:00
} ,
{
displayName : 'Timestamp' ,
name : 'timestamp' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Timestamp of commit' ,
2021-04-23 15:37:37 -07:00
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Refs' ,
name : 'refs' ,
2022-05-06 14:01:25 -07:00
description : 'An optional way to indicate the start and end commits for each repository included in a release' ,
2021-04-23 15:37:37 -07:00
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'refProperties' ,
displayName : 'Ref Properties' ,
values : [
{
displayName : 'Commit' ,
name : 'commit' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The head sha of the commit' ,
2021-04-23 15:37:37 -07:00
required : true ,
} ,
{
displayName : 'Repository' ,
name : 'repository' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Repository name' ,
2021-04-23 15:37:37 -07:00
required : true ,
} ,
{
displayName : 'Previous Commit' ,
name : 'previousCommit' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The sha of the HEAD of the previous release' ,
2021-04-23 15:37:37 -07:00
} ,
] ,
} ,
] ,
} ,
] ,
} ,
2021-04-23 15:38:15 -07:00
2021-04-23 15:37:37 -07:00
/* -------------------------------------------------------------------------- */
/* release:update */
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Organization Slug Name or ID' ,
2021-04-23 15:37:37 -07:00
name : 'organizationSlug' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getOrganizations' ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'update' ,
] ,
} ,
} ,
required : true ,
2022-06-03 10:23:49 -07:00
description : 'The slug of the organization the release belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2021-04-23 15:37:37 -07:00
} ,
{
displayName : 'Version' ,
name : 'version' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'update' ,
] ,
} ,
} ,
required : true ,
description : 'A version identifier for this release. Can be a version number, a commit hash etc.' ,
} ,
{
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'release' ,
] ,
operation : [
'update' ,
] ,
} ,
} ,
options : [
2020-09-07 08:56:14 -07:00
{
displayName : 'Commits' ,
name : 'commits' ,
2022-05-06 14:01:25 -07:00
description : 'An optional list of commit data to be associated with the release' ,
2020-09-07 08:56:14 -07:00
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'commitProperties' ,
displayName : 'Commit Properties' ,
values : [
{
2021-04-23 15:37:37 -07:00
displayName : 'ID' ,
2020-09-07 08:56:14 -07:00
name : 'id' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The sha of the commit' ,
2020-10-22 06:46:03 -07:00
required : true ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Author Email' ,
name : 'authorEmail' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Authors email' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Author Name' ,
name : 'authorName' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Name of author' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Message' ,
name : 'message' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Message of commit' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Patch Set' ,
name : 'patchSet' ,
2021-04-23 15:37:37 -07:00
description : 'A list of the files that have been changed in the commit. Specifying the patch_set is necessary to power suspect commits and suggested assignees.' ,
2020-09-07 08:56:14 -07:00
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'patchSetProperties' ,
displayName : 'Patch Set Properties' ,
values : [
{
displayName : 'Path' ,
name : 'path' ,
type : 'string' ,
default : '' ,
2021-04-23 15:37:37 -07:00
description : 'The path to the file. Both forward and backward slashes are supported.' ,
2020-10-22 06:46:03 -07:00
required : true ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The types of changes that happend in that commit' ,
2020-09-07 08:56:14 -07:00
options : [
{
name : 'Add' ,
2020-10-22 06:46:03 -07:00
value : 'add' ,
2020-09-07 08:56:14 -07:00
} ,
{
name : 'Modify' ,
2020-10-22 06:46:03 -07:00
value : 'modify' ,
2020-09-07 08:56:14 -07:00
} ,
{
name : 'Delete' ,
2020-10-22 06:46:03 -07:00
value : 'delete' ,
2020-09-07 08:56:14 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
] ,
} ,
{
displayName : 'Repository' ,
name : 'repository' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Repository name' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Timestamp' ,
name : 'timestamp' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Timestamp of commit' ,
2020-09-07 08:56:14 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
] ,
} ,
2021-04-23 15:38:15 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Date Released' ,
2021-04-23 15:38:15 -07:00
name : 'dateReleased' ,
type : 'dateTime' ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'An optional date that indicates when the release went live. If not provided the current time is assumed.' ,
2021-04-23 15:38:15 -07:00
} ,
{
displayName : 'Ref' ,
name : 'ref' ,
type : 'string' ,
default : '' ,
description : 'A URL that points to the release. This can be the path to an online interface to the sourcecode for instance.' ,
} ,
2020-09-07 08:56:14 -07:00
{
displayName : 'Refs' ,
name : 'refs' ,
2022-05-06 14:01:25 -07:00
description : 'An optional way to indicate the start and end commits for each repository included in a release' ,
2020-09-07 08:56:14 -07:00
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'refProperties' ,
displayName : 'Ref Properties' ,
values : [
{
displayName : 'Commit' ,
name : 'commit' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The head sha of the commit' ,
2020-10-22 06:46:03 -07:00
required : true ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Repository' ,
name : 'repository' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Repository name' ,
2020-10-22 06:46:03 -07:00
required : true ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Previous Commit' ,
name : 'previousCommit' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The sha of the HEAD of the previous release' ,
2020-09-07 08:56:14 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
] ,
} ,
2021-04-23 15:38:15 -07:00
{
displayName : 'URL' ,
name : 'url' ,
type : 'string' ,
default : '' ,
description : 'A URL that points to the release. This can be the path to an online interface to the sourcecode for instance.' ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;