feat(GitHub Node): Add support for state reasons when editing an issue (#9848)

This commit is contained in:
Jon 2024-07-02 14:40:24 +01:00 committed by GitHub
parent db29e84666
commit 61c20d1ae3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -903,11 +903,23 @@ export class Github implements INodeType {
default: {}, default: {},
options: [ options: [
{ {
displayName: 'Title', displayName: 'Assignees',
name: 'title', name: 'assignees',
type: 'string', type: 'collection',
default: '', typeOptions: {
description: 'The title of the issue', multipleValues: true,
multipleValueButtonText: 'Add Assignee',
},
default: { assignee: '' },
options: [
{
displayName: 'Assignees',
name: 'assignee',
type: 'string',
default: '',
description: 'User to assign issue to',
},
],
}, },
{ {
displayName: 'Body', displayName: 'Body',
@ -919,25 +931,6 @@ export class Github implements INodeType {
default: '', default: '',
description: 'The body of the issue', description: 'The body of the issue',
}, },
{
displayName: 'State',
name: 'state',
type: 'options',
options: [
{
name: 'Closed',
value: 'closed',
description: 'Set the state to "closed"',
},
{
name: 'Open',
value: 'open',
description: 'Set the state to "open"',
},
],
default: 'open',
description: 'The state to set',
},
{ {
displayName: 'Labels', displayName: 'Labels',
name: 'labels', name: 'labels',
@ -958,27 +951,57 @@ export class Github implements INodeType {
], ],
}, },
{ {
displayName: 'Assignees', displayName: 'State',
name: 'assignees', name: 'state',
type: 'collection', type: 'options',
typeOptions: {
multipleValues: true,
multipleValueButtonText: 'Add Assignee',
},
default: { assignee: '' },
options: [ options: [
{ {
displayName: 'Assignees', name: 'Closed',
name: 'assignee', value: 'closed',
type: 'string', description: 'Set the state to "closed"',
default: '', },
description: 'User to assign issue to', {
name: 'Open',
value: 'open',
description: 'Set the state to "open"',
}, },
], ],
default: 'open',
description: 'The state to set',
},
{
displayName: 'State Reason',
name: 'state_reason',
type: 'options',
options: [
{
name: 'Completed',
value: 'completed',
description: 'Issue is completed',
},
{
name: 'Not Planned',
value: 'not_planned',
description: 'Issue is not planned',
},
{
name: 'Reopened',
value: 'reopened',
description: 'Issue is reopened',
},
],
default: 'completed',
description: 'The reason for the state change',
},
{
displayName: 'Title',
name: 'title',
type: 'string',
default: '',
description: 'The title of the issue',
}, },
], ],
}, },
// ---------------------------------- // ----------------------------------
// issue:get // issue:get
// ---------------------------------- // ----------------------------------