Skip to content

Commit

Permalink
feat(GitHub Node): Add support for state reasons when editing an issue (
Browse files Browse the repository at this point in the history
  • Loading branch information
Joffcom authored Jul 2, 2024
1 parent db29e84 commit 61c20d1
Showing 1 changed file with 59 additions and 36 deletions.
95 changes: 59 additions & 36 deletions packages/nodes-base/nodes/Github/Github.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -903,11 +903,23 @@ export class Github implements INodeType {
default: {},
options: [
{
displayName: 'Title',
name: 'title',
type: 'string',
default: '',
description: 'The title of the issue',
displayName: 'Assignees',
name: 'assignees',
type: 'collection',
typeOptions: {
multipleValues: true,
multipleValueButtonText: 'Add Assignee',
},
default: { assignee: '' },
options: [
{
displayName: 'Assignees',
name: 'assignee',
type: 'string',
default: '',
description: 'User to assign issue to',
},
],
},
{
displayName: 'Body',
Expand All @@ -919,6 +931,25 @@ export class Github implements INodeType {
default: '',
description: 'The body of the issue',
},
{
displayName: 'Labels',
name: 'labels',
type: 'collection',
typeOptions: {
multipleValues: true,
multipleValueButtonText: 'Add Label',
},
default: { label: '' },
options: [
{
displayName: 'Label',
name: 'label',
type: 'string',
default: '',
description: 'Label to add to issue',
},
],
},
{
displayName: 'State',
name: 'state',
Expand All @@ -939,46 +970,38 @@ export class Github implements INodeType {
description: 'The state to set',
},
{
displayName: 'Labels',
name: 'labels',
type: 'collection',
typeOptions: {
multipleValues: true,
multipleValueButtonText: 'Add Label',
},
default: { label: '' },
displayName: 'State Reason',
name: 'state_reason',
type: 'options',
options: [
{
displayName: 'Label',
name: 'label',
type: 'string',
default: '',
description: 'Label to add to issue',
name: 'Completed',
value: 'completed',
description: 'Issue is completed',
},
],
},
{
displayName: 'Assignees',
name: 'assignees',
type: 'collection',
typeOptions: {
multipleValues: true,
multipleValueButtonText: 'Add Assignee',
},
default: { assignee: '' },
options: [
{
displayName: 'Assignees',
name: 'assignee',
type: 'string',
default: '',
description: 'User to assign issue to',
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
// ----------------------------------
Expand Down

0 comments on commit 61c20d1

Please sign in to comment.