mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-28 22:12:26 -05:00
Add nodes generated by the Node CLI, update README (#96)
This commit is contained in:
parent
67ee5b8e80
commit
4fb0cd0bc8
41 changed files with 8549 additions and 745 deletions
124
nodes/GithubIssues/resources/issue/getAll.ts
Normal file
124
nodes/GithubIssues/resources/issue/getAll.ts
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import { parseLinkHeader } from '../../shared/utils';
|
||||
|
||||
const showOnlyForIssueGetMany = {
|
||||
operation: ['getAll'],
|
||||
resource: ['issue'],
|
||||
};
|
||||
|
||||
export const issueGetManyDescription: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
...showOnlyForIssueGetMany,
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 100,
|
||||
},
|
||||
default: 50,
|
||||
routing: {
|
||||
send: {
|
||||
type: 'query',
|
||||
property: 'per_page',
|
||||
},
|
||||
output: {
|
||||
maxResults: '={{$value}}',
|
||||
},
|
||||
},
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: showOnlyForIssueGetMany,
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
routing: {
|
||||
send: {
|
||||
paginate: '={{ $value }}',
|
||||
type: 'query',
|
||||
property: 'per_page',
|
||||
value: '100',
|
||||
},
|
||||
operations: {
|
||||
pagination: {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
continue: `={{ !!(${parseLinkHeader.toString()})($response.headers?.link).next }}`,
|
||||
request: {
|
||||
url: `={{ (${parseLinkHeader.toString()})($response.headers?.link)?.next ?? $request.url }}`,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Filters',
|
||||
name: 'filters',
|
||||
type: 'collection',
|
||||
typeOptions: {
|
||||
multipleValueButtonText: 'Add Filter',
|
||||
},
|
||||
displayOptions: {
|
||||
show: showOnlyForIssueGetMany,
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Updated Since',
|
||||
name: 'since',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
description: 'Return only issues updated at or after this time',
|
||||
routing: {
|
||||
request: {
|
||||
qs: {
|
||||
since: '={{$value}}',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'State',
|
||||
name: 'state',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'All',
|
||||
value: 'all',
|
||||
description: 'Returns issues with any state',
|
||||
},
|
||||
{
|
||||
name: 'Closed',
|
||||
value: 'closed',
|
||||
description: 'Return issues with "closed" state',
|
||||
},
|
||||
{
|
||||
name: 'Open',
|
||||
value: 'open',
|
||||
description: 'Return issues with "open" state',
|
||||
},
|
||||
],
|
||||
default: 'open',
|
||||
description: 'The issue state to filter on',
|
||||
routing: {
|
||||
request: {
|
||||
qs: {
|
||||
state: '={{$value}}',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue