mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-28 14:12:24 -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
65
nodes/GithubIssues/resources/issueComment/getAll.ts
Normal file
65
nodes/GithubIssues/resources/issueComment/getAll.ts
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import { parseLinkHeader } from '../../shared/utils';
|
||||
|
||||
const showOnlyForIssueCommentGetMany = {
|
||||
operation: ['getAll'],
|
||||
resource: ['issueComment'],
|
||||
};
|
||||
|
||||
export const issueCommentGetManyDescription: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
...showOnlyForIssueCommentGetMany,
|
||||
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: showOnlyForIssueCommentGetMany,
|
||||
},
|
||||
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 }}`,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
47
nodes/GithubIssues/resources/issueComment/index.ts
Normal file
47
nodes/GithubIssues/resources/issueComment/index.ts
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import { repoNameSelect, repoOwnerSelect } from '../../shared/descriptions';
|
||||
import { issueCommentGetManyDescription } from './getAll';
|
||||
|
||||
const showOnlyForIssueComments = {
|
||||
resource: ['issueComment'],
|
||||
};
|
||||
|
||||
export const issueCommentDescription: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: showOnlyForIssueComments,
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get issue comments',
|
||||
description: 'Get issue comments',
|
||||
routing: {
|
||||
request: {
|
||||
method: 'GET',
|
||||
url: '=/repos/{{$parameter.owner}}/{{$parameter.repository}}/issues/comments',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
default: 'getAll',
|
||||
},
|
||||
{
|
||||
...repoOwnerSelect,
|
||||
displayOptions: {
|
||||
show: showOnlyForIssueComments,
|
||||
},
|
||||
},
|
||||
{
|
||||
...repoNameSelect,
|
||||
displayOptions: {
|
||||
show: showOnlyForIssueComments,
|
||||
},
|
||||
},
|
||||
...issueCommentGetManyDescription,
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue