2022-08-17 08:50:24 -07:00
import { INodeProperties } from 'n8n-workflow' ;
2020-09-07 08:56:14 -07:00
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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
options : [
{
name : 'Create' ,
value : 'create' ,
description : 'Create a release' ,
2022-07-10 13:50:51 -07:00
action : 'Create a release' ,
2020-09-07 08:56:14 -07:00
} ,
2021-04-23 15:38:15 -07:00
{
name : 'Delete' ,
value : 'delete' ,
description : 'Delete a release' ,
2022-07-10 13:50:51 -07:00
action : 'Delete a release' ,
2021-04-23 15:38:15 -07:00
} ,
2020-09-07 08:56:14 -07:00
{
name : 'Get' ,
value : 'get' ,
description : 'Get release by version identifier' ,
2022-07-10 13:50:51 -07:00
action : 'Get a release by version ID' ,
2020-09-07 08:56:14 -07:00
} ,
{
2022-09-07 07:51:14 -07:00
name : 'Get Many' ,
2020-09-07 08:56:14 -07:00
value : 'getAll' ,
2022-09-13 03:36:36 -07:00
description : 'Get many releases' ,
2022-09-08 08:10:13 -07:00
action : 'Get many releases' ,
2020-09-07 08:56:14 -07:00
} ,
2021-04-23 15:37:37 -07:00
{
name : 'Update' ,
value : 'update' ,
description : 'Update a release' ,
2022-07-10 13:50:51 -07:00
action : 'Update a release' ,
2021-04-23 15:37:37 -07:00
} ,
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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'getAll' ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -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/code-examples/expressions/">expression</a>.' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'release' ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
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 : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'release' ] ,
returnAll : [ false ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'getAll' ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'get' , 'delete' ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -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/code-examples/expressions/">expression</a>.' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Version' ,
name : 'version' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'get' , '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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'create' ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -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/code-examples/expressions/">expression</a>.' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Version' ,
name : 'version' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'create' ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'create' ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'create' ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -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/code-examples/expressions/">expression</a>.' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'create' ] ,
2020-09-07 08:56:14 -07:00
} ,
} ,
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 : '' ,
2022-08-17 08:50:24 -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:37:37 -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' ,
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' ,
2022-08-17 08:50:24 -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.' ,
2021-04-23 15:37:37 -07:00
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'patchSetProperties' ,
displayName : 'Patch Set Properties' ,
values : [
{
displayName : 'Path' ,
name : 'path' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The path to the file. Both forward and backward slashes are supported.' ,
2021-04-23 15:37:37 -07:00
required : true ,
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
default : '' ,
2022-09-21 00:19:06 -07:00
description : 'The types of changes that happened 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-08-17 08:50:24 -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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'update' ] ,
2021-04-23 15:37:37 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -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/code-examples/expressions/">expression</a>.' ,
2021-04-23 15:37:37 -07:00
} ,
{
displayName : 'Version' ,
name : 'version' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'update' ] ,
2021-04-23 15:37:37 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'A version identifier for this release. Can be a version number, a commit hash etc.' ,
2021-04-23 15:37:37 -07:00
} ,
{
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'release' ] ,
operation : [ 'update' ] ,
2021-04-23 15:37:37 -07:00
} ,
} ,
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' ,
2022-08-17 08:50:24 -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 : '' ,
2022-08-17 08:50:24 -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-09-21 00:19:06 -07:00
description : 'The types of changes that happened 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-08-17 08:50:24 -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 : '' ,
2022-08-17 08:50:24 -07:00
description :
'A URL that points to the release. This can be the path to an online interface to the sourcecode for instance.' ,
2021-04-23 15:38:15 -07:00
} ,
2020-09-07 08:56:14 -07:00
{
displayName : 'Refs' ,
name : 'refs' ,
2022-08-17 08:50:24 -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 : '' ,
2022-08-17 08:50:24 -07:00
description :
'A URL that points to the release. This can be the path to an online interface to the sourcecode for instance.' ,
2021-04-23 15:38:15 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;