mirror of
				https://github.com/n8n-io/n8n-nodes-starter.git
				synced 2025-10-30 23:02:25 -05:00 
			
		
		
		
	Add nodes generated by the Node CLI, update README
This commit is contained in:
		
					parent
					
						
							
								67ee5b8e80
							
						
					
				
			
			
				commit
				
					
						95f3124b0d
					
				
			
		
					 41 changed files with 8549 additions and 745 deletions
				
			
		
							
								
								
									
										32
									
								
								nodes/GithubIssues/shared/transport.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								nodes/GithubIssues/shared/transport.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,32 @@ | |||
| import type { | ||||
| 	IHookFunctions, | ||||
| 	IExecuteFunctions, | ||||
| 	IExecuteSingleFunctions, | ||||
| 	ILoadOptionsFunctions, | ||||
| 	IHttpRequestMethods, | ||||
| 	IDataObject, | ||||
| 	IHttpRequestOptions, | ||||
| } from 'n8n-workflow'; | ||||
| 
 | ||||
| export async function githubApiRequest( | ||||
| 	this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, | ||||
| 	method: IHttpRequestMethods, | ||||
| 	resource: string, | ||||
| 	qs: IDataObject = {}, | ||||
| 	body: IDataObject | undefined = undefined, | ||||
| ) { | ||||
| 	const authenticationMethod = this.getNodeParameter('authentication', 0); | ||||
| 
 | ||||
| 	const options: IHttpRequestOptions = { | ||||
| 		method: method, | ||||
| 		qs, | ||||
| 		body, | ||||
| 		url: `https://api.github.com${resource}`, | ||||
| 		json: true, | ||||
| 	}; | ||||
| 
 | ||||
| 	const credentialType = | ||||
| 		authenticationMethod === 'accessToken' ? 'githubIssuesApi' : 'githubIssuesOAuth2Api'; | ||||
| 
 | ||||
| 	return this.helpers.httpRequestWithAuthentication.call(this, credentialType, options); | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue