mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
feat: Add Github get release by tag
Signed-off-by: Marcel Dias <marcel@pltf.dev>
This commit is contained in:
parent
03135702f1
commit
18040cedaa
|
@ -340,6 +340,12 @@ export class Github implements INodeType {
|
||||||
description: 'Get a release',
|
description: 'Get a release',
|
||||||
action: 'Get a release',
|
action: 'Get a release',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Get by Tag',
|
||||||
|
value: 'getByTag',
|
||||||
|
description: 'Get a release by Tag',
|
||||||
|
action: 'Get a release by Tag',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Get Many',
|
name: 'Get Many',
|
||||||
value: 'getAll',
|
value: 'getAll',
|
||||||
|
@ -1273,6 +1279,13 @@ export class Github implements INodeType {
|
||||||
default: false,
|
default: false,
|
||||||
description: 'Whether to point out that the release is non-production ready',
|
description: 'Whether to point out that the release is non-production ready',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Latest',
|
||||||
|
name: 'make_latest',
|
||||||
|
type: 'boolean',
|
||||||
|
default: true,
|
||||||
|
description: 'Whether to mark the release as latest or not',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Target Commitish',
|
displayName: 'Target Commitish',
|
||||||
name: 'target_commitish',
|
name: 'target_commitish',
|
||||||
|
@ -1351,6 +1364,13 @@ export class Github implements INodeType {
|
||||||
default: false,
|
default: false,
|
||||||
description: 'Whether to point out that the release is non-production ready',
|
description: 'Whether to point out that the release is non-production ready',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Latest',
|
||||||
|
name: 'make_latest',
|
||||||
|
type: 'boolean',
|
||||||
|
default: true,
|
||||||
|
description: 'Whether to mark the release as latest or not',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Tag Name',
|
displayName: 'Tag Name',
|
||||||
name: 'tag_name',
|
name: 'tag_name',
|
||||||
|
@ -1402,6 +1422,23 @@ export class Github implements INodeType {
|
||||||
default: 50,
|
default: 50,
|
||||||
description: 'Max number of results to return',
|
description: 'Max number of results to return',
|
||||||
},
|
},
|
||||||
|
// ----------------------------------
|
||||||
|
// release:getByTag
|
||||||
|
// ----------------------------------
|
||||||
|
{
|
||||||
|
displayName: 'Tag Name',
|
||||||
|
name: 'tag_name',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: ['release'],
|
||||||
|
operation: ['getByTag'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
default: '',
|
||||||
|
description: 'Release Tag Name',
|
||||||
|
},
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// repository
|
// repository
|
||||||
|
@ -2031,6 +2068,7 @@ export class Github implements INodeType {
|
||||||
'repository:listReferrers',
|
'repository:listReferrers',
|
||||||
'user:getRepositories',
|
'user:getRepositories',
|
||||||
'release:getAll',
|
'release:getAll',
|
||||||
|
'release:getByTag',
|
||||||
'review:getAll',
|
'review:getAll',
|
||||||
'organization:getRepositories',
|
'organization:getRepositories',
|
||||||
];
|
];
|
||||||
|
@ -2307,6 +2345,16 @@ export class Github implements INodeType {
|
||||||
qs.per_page = this.getNodeParameter('limit', 0);
|
qs.per_page = this.getNodeParameter('limit', 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (operation === 'getByTag') {
|
||||||
|
// ----------------------------------
|
||||||
|
// getbyTag
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
|
requestMethod = 'GET';
|
||||||
|
const tagName = this.getNodeParameter('tag_name', i) as string;
|
||||||
|
|
||||||
|
endpoint = `/repos/${owner}/${repository}/releases/tags/${tagName}`;
|
||||||
|
}
|
||||||
if (operation === 'update') {
|
if (operation === 'update') {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// update
|
// update
|
||||||
|
|
Loading…
Reference in a new issue