mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-12 23:54:07 -08:00
6dcdb30bf4
* ✏️ Alphabetize lint rules * 🔥 Remove duplicates * ⚡ Update `lintfix` script * 👕 Apply `node-param-operation-without-no-data-expression` (#3329) * 👕 Apply `node-param-operation-without-no-data-expression` * 👕 Add exceptions * 👕 Apply `node-param-description-weak` (#3328) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply `node-param-option-value-duplicate` (#3331) * 👕 Apply `node-param-description-miscased-json` (#3337) * 👕 Apply `node-param-display-name-excess-inner-whitespace` (#3335) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply `node-param-type-options-missing-from-limit` (#3336) * Rule workig as intended * ✏️ Uncomment rules Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply `node-param-option-name-duplicate` (#3338) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply `node-param-description-wrong-for-simplify` (#3334) * ⚡ fix * ⚡ exceptions * ⚡ changed rule ignoring from file to line * 👕 Apply `node-param-resource-without-no-data-expression` (#3339) * 👕 Apply `node-param-display-name-untrimmed` (#3341) * 👕 Apply `node-param-display-name-miscased-id` (#3340) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply `node-param-resource-with-plural-option` (#3342) * 👕 Apply `node-param-description-wrong-for-upsert` (#3333) * ⚡ fix * ⚡ replaced record with contact in description * ⚡ fix Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply `node-param-option-description-identical-to-name` (#3343) * 👕 Apply `node-param-option-name-containing-star` (#3347) * 👕 Apply `node-param-display-name-wrong-for-update-fields` (#3348) * 👕 Apply `node-param-option-name-wrong-for-get-all` (#3345) * ⚡ fix * ⚡ exceptions * 👕 Apply node-param-display-name-wrong-for-simplify (#3344) * Rule working as intended * Uncomented other rules * 👕 Undo and add exceptions Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * ⚡ Alphabetize lint rules * ⚡ Restore `lintfix` script Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com> Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com>
676 lines
15 KiB
TypeScript
676 lines
15 KiB
TypeScript
import {
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export const releaseOperations: INodeProperties[] = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'release',
|
|
],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Create',
|
|
value: 'create',
|
|
description: 'Create a release',
|
|
},
|
|
{
|
|
name: 'Delete',
|
|
value: 'delete',
|
|
description: 'Delete a release',
|
|
},
|
|
{
|
|
name: 'Get',
|
|
value: 'get',
|
|
description: 'Get release by version identifier',
|
|
},
|
|
{
|
|
name: 'Get All',
|
|
value: 'getAll',
|
|
description: 'Get all releases',
|
|
},
|
|
{
|
|
name: 'Update',
|
|
value: 'update',
|
|
description: 'Update a release',
|
|
},
|
|
],
|
|
default: 'get',
|
|
},
|
|
];
|
|
|
|
export const releaseFields: INodeProperties[] = [
|
|
/* -------------------------------------------------------------------------- */
|
|
/* release:getAll */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Organization Slug',
|
|
name: 'organizationSlug',
|
|
type: 'options',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getOrganizations',
|
|
},
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'release',
|
|
],
|
|
operation: [
|
|
'getAll',
|
|
],
|
|
},
|
|
},
|
|
required: true,
|
|
description: 'The slug of the organization the releases belong to',
|
|
},
|
|
{
|
|
displayName: 'Return All',
|
|
name: 'returnAll',
|
|
type: 'boolean',
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'getAll',
|
|
],
|
|
resource: [
|
|
'release',
|
|
],
|
|
},
|
|
},
|
|
default: false,
|
|
description: 'Whether to return all results or only up to a given limit',
|
|
},
|
|
{
|
|
displayName: 'Limit',
|
|
name: 'limit',
|
|
type: 'number',
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'getAll',
|
|
],
|
|
resource: [
|
|
'release',
|
|
],
|
|
returnAll: [
|
|
false,
|
|
],
|
|
},
|
|
},
|
|
typeOptions: {
|
|
minValue: 1,
|
|
maxValue: 500,
|
|
},
|
|
default: 100,
|
|
description: 'Max number of results to return',
|
|
},
|
|
{
|
|
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: '',
|
|
description: 'This parameter can be used to create a “starts with” filter for the version',
|
|
},
|
|
],
|
|
},
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* release:get/delete */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Organization Slug',
|
|
name: 'organizationSlug',
|
|
type: 'options',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getOrganizations',
|
|
},
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'release',
|
|
],
|
|
operation: [
|
|
'get',
|
|
'delete',
|
|
],
|
|
},
|
|
},
|
|
required: true,
|
|
description: 'The slug of the organization the release belongs to',
|
|
},
|
|
{
|
|
displayName: 'Version',
|
|
name: 'version',
|
|
type: 'string',
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'release',
|
|
],
|
|
operation: [
|
|
'get',
|
|
'delete',
|
|
],
|
|
},
|
|
},
|
|
required: true,
|
|
description: 'The version identifier of the release',
|
|
},
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* release:create */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Organization Slug',
|
|
name: 'organizationSlug',
|
|
type: 'options',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getOrganizations',
|
|
},
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'release',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
},
|
|
required: true,
|
|
description: 'The slug of the organization the release belongs to',
|
|
},
|
|
{
|
|
displayName: 'Version',
|
|
name: 'version',
|
|
type: 'string',
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'release',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
},
|
|
required: true,
|
|
description: 'A version identifier for this release. Can be a version number, a commit hash etc.',
|
|
},
|
|
{
|
|
displayName: 'URL',
|
|
name: 'url',
|
|
type: 'string',
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'release',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
},
|
|
required: true,
|
|
description: 'A URL that points to the release. This can be the path to an online interface to the sourcecode for instance.',
|
|
},
|
|
{
|
|
displayName: 'Projects',
|
|
name: 'projects',
|
|
type: 'multiOptions',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getProjects',
|
|
},
|
|
default: [],
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'release',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
},
|
|
required: true,
|
|
description: 'A list of project slugs that are involved in this release',
|
|
},
|
|
{
|
|
displayName: 'Additional Fields',
|
|
name: 'additionalFields',
|
|
type: 'collection',
|
|
placeholder: 'Add Field',
|
|
default: {},
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'release',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
displayName: 'Date released',
|
|
name: 'dateReleased',
|
|
type: 'dateTime',
|
|
default: '',
|
|
description: 'An optional date that indicates when the release went live. If not provided the current time is assumed.',
|
|
},
|
|
{
|
|
displayName: 'Commits',
|
|
name: 'commits',
|
|
description: 'An optional list of commit data to be associated with the release',
|
|
type: 'fixedCollection',
|
|
typeOptions: {
|
|
multipleValues: true,
|
|
},
|
|
default: {},
|
|
options: [
|
|
{
|
|
name: 'commitProperties',
|
|
displayName: 'Commit Properties',
|
|
values: [
|
|
{
|
|
displayName: 'ID',
|
|
name: 'id',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'The sha of the commit',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Author Email',
|
|
name: 'authorEmail',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Authors email',
|
|
},
|
|
{
|
|
displayName: 'Author Name',
|
|
name: 'authorName',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Name of author',
|
|
},
|
|
{
|
|
displayName: 'Message',
|
|
name: 'message',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Message of commit',
|
|
},
|
|
{
|
|
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: '',
|
|
description: 'The types of changes that happend in that commit',
|
|
options: [
|
|
{
|
|
name: 'Add',
|
|
value: 'add',
|
|
},
|
|
{
|
|
name: 'Modify',
|
|
value: 'modify',
|
|
},
|
|
{
|
|
name: 'Delete',
|
|
value: 'delete',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
displayName: 'Repository',
|
|
name: 'repository',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Repository name',
|
|
},
|
|
{
|
|
displayName: 'Timestamp',
|
|
name: 'timestamp',
|
|
type: 'dateTime',
|
|
default: '',
|
|
description: 'Timestamp of commit',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
displayName: 'Refs',
|
|
name: 'refs',
|
|
description: 'An optional way to indicate the start and end commits for each repository included in a release',
|
|
type: 'fixedCollection',
|
|
typeOptions: {
|
|
multipleValues: true,
|
|
},
|
|
default: {},
|
|
options: [
|
|
{
|
|
name: 'refProperties',
|
|
displayName: 'Ref Properties',
|
|
values: [
|
|
{
|
|
displayName: 'Commit',
|
|
name: 'commit',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'The head sha of the commit',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Repository',
|
|
name: 'repository',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Repository name',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Previous Commit',
|
|
name: 'previousCommit',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'The sha of the HEAD of the previous release',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* release:update */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Organization Slug',
|
|
name: 'organizationSlug',
|
|
type: 'options',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getOrganizations',
|
|
},
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'release',
|
|
],
|
|
operation: [
|
|
'update',
|
|
],
|
|
},
|
|
},
|
|
required: true,
|
|
description: 'The slug of the organization the release belongs to',
|
|
},
|
|
{
|
|
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: [
|
|
{
|
|
displayName: 'Commits',
|
|
name: 'commits',
|
|
description: 'An optional list of commit data to be associated with the release',
|
|
type: 'fixedCollection',
|
|
typeOptions: {
|
|
multipleValues: true,
|
|
},
|
|
default: {},
|
|
options: [
|
|
{
|
|
name: 'commitProperties',
|
|
displayName: 'Commit Properties',
|
|
values: [
|
|
{
|
|
displayName: 'ID',
|
|
name: 'id',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'The sha of the commit',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Author Email',
|
|
name: 'authorEmail',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Authors email',
|
|
},
|
|
{
|
|
displayName: 'Author Name',
|
|
name: 'authorName',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Name of author',
|
|
},
|
|
{
|
|
displayName: 'Message',
|
|
name: 'message',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Message of commit',
|
|
},
|
|
{
|
|
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: '',
|
|
description: 'The types of changes that happend in that commit',
|
|
options: [
|
|
{
|
|
name: 'Add',
|
|
value: 'add',
|
|
},
|
|
{
|
|
name: 'Modify',
|
|
value: 'modify',
|
|
},
|
|
{
|
|
name: 'Delete',
|
|
value: 'delete',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
displayName: 'Repository',
|
|
name: 'repository',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Repository name',
|
|
},
|
|
{
|
|
displayName: 'Timestamp',
|
|
name: 'timestamp',
|
|
type: 'dateTime',
|
|
default: '',
|
|
description: 'Timestamp of commit',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
displayName: 'Date released',
|
|
name: 'dateReleased',
|
|
type: 'dateTime',
|
|
default: '',
|
|
description: 'an optional date that indicates when the release went live. If not provided the current time is assumed.',
|
|
},
|
|
{
|
|
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.',
|
|
},
|
|
{
|
|
displayName: 'Refs',
|
|
name: 'refs',
|
|
description: 'An optional way to indicate the start and end commits for each repository included in a release',
|
|
type: 'fixedCollection',
|
|
typeOptions: {
|
|
multipleValues: true,
|
|
},
|
|
default: {},
|
|
options: [
|
|
{
|
|
name: 'refProperties',
|
|
displayName: 'Ref Properties',
|
|
values: [
|
|
{
|
|
displayName: 'Commit',
|
|
name: 'commit',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'The head sha of the commit',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Repository',
|
|
name: 'repository',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Repository name',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Previous Commit',
|
|
name: 'previousCommit',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'The sha of the HEAD of the previous release',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
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.',
|
|
},
|
|
],
|
|
},
|
|
];
|