fix(GitHub Node): Fix workflow resource locator (#13599)

This commit is contained in:
Shireen Missi
2025-03-03 14:09:38 +00:00
committed by GitHub
parent 850d458858
commit b7f7121cb8
3 changed files with 196 additions and 4 deletions

View File

@@ -457,14 +457,12 @@ export class Github implements INodeType {
required: true,
modes: [
{
displayName: 'Workflow',
displayName: 'From List',
name: 'list',
type: 'list',
placeholder: 'Select a workflow...',
typeOptions: {
searchListMethod: 'getWorkflows',
searchable: true,
searchFilterRequired: true,
},
},
{
@@ -482,6 +480,21 @@ export class Github implements INodeType {
},
],
},
{
displayName: 'By File Name',
name: 'filename',
type: 'string',
placeholder: 'e.g. main.yaml or main.yml',
validation: [
{
type: 'regex',
properties: {
regex: '[a-zA-Z0-9_-]+.(yaml|yml)',
errorMessage: 'Not a valid Github Workflow File Name',
},
},
],
},
],
displayOptions: {
show: {
@@ -2501,7 +2514,9 @@ export class Github implements INodeType {
requestMethod = 'POST';
const workflowId = this.getNodeParameter('workflowId', i) as string;
const workflowId = this.getNodeParameter('workflowId', i, undefined, {
extractValue: true,
}) as string;
endpoint = `/repos/${owner}/${repository}/actions/workflows/${workflowId}/dispatches`;
body.ref = this.getNodeParameter('ref', i) as string;