mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-28 06:02:25 -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
96
nodes/GithubIssues/GithubIssues.node.ts
Normal file
96
nodes/GithubIssues/GithubIssues.node.ts
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
import { NodeConnectionType, type INodeType, type INodeTypeDescription } from 'n8n-workflow';
|
||||
import { issueDescription } from './resources/issue';
|
||||
import { issueCommentDescription } from './resources/issueComment';
|
||||
import { getRepositories } from './listSearch/getRepositories';
|
||||
import { getUsers } from './listSearch/getUsers';
|
||||
import { getIssues } from './listSearch/getIssues';
|
||||
|
||||
export class GithubIssues implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'GitHub Issues',
|
||||
name: 'githubIssues',
|
||||
icon: { light: 'file:../../icons/github.svg', dark: 'file:../../icons/github.dark.svg' },
|
||||
group: ['input'],
|
||||
version: 1,
|
||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||
description: 'Consume issues from the GitHub API',
|
||||
defaults: {
|
||||
name: 'GitHub Issues',
|
||||
},
|
||||
usableAsTool: true,
|
||||
inputs: [NodeConnectionType.Main],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
credentials: [
|
||||
{
|
||||
name: 'githubIssuesApi',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: ['accessToken'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'githubIssuesOAuth2Api',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: ['oAuth2'],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
requestDefaults: {
|
||||
baseURL: 'https://api.github.com',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
},
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Authentication',
|
||||
name: 'authentication',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Access Token',
|
||||
value: 'accessToken',
|
||||
},
|
||||
{
|
||||
name: 'OAuth2',
|
||||
value: 'oAuth2',
|
||||
},
|
||||
],
|
||||
default: 'accessToken',
|
||||
},
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
options: [
|
||||
{
|
||||
name: 'Issue',
|
||||
value: 'issue',
|
||||
},
|
||||
{
|
||||
name: 'Issue Comment',
|
||||
value: 'issueComment',
|
||||
},
|
||||
],
|
||||
default: 'issue',
|
||||
},
|
||||
...issueDescription,
|
||||
...issueCommentDescription,
|
||||
],
|
||||
};
|
||||
|
||||
methods = {
|
||||
listSearch: {
|
||||
getRepositories,
|
||||
getUsers,
|
||||
getIssues,
|
||||
},
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue