mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -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',
|
||||
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',
|
||||
value: 'getAll',
|
||||
|
@ -1273,6 +1279,13 @@ export class Github implements INodeType {
|
|||
default: false,
|
||||
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',
|
||||
name: 'target_commitish',
|
||||
|
@ -1351,6 +1364,13 @@ export class Github implements INodeType {
|
|||
default: false,
|
||||
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',
|
||||
name: 'tag_name',
|
||||
|
@ -1402,6 +1422,23 @@ export class Github implements INodeType {
|
|||
default: 50,
|
||||
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
|
||||
|
@ -2031,6 +2068,7 @@ export class Github implements INodeType {
|
|||
'repository:listReferrers',
|
||||
'user:getRepositories',
|
||||
'release:getAll',
|
||||
'release:getByTag',
|
||||
'review:getAll',
|
||||
'organization:getRepositories',
|
||||
];
|
||||
|
@ -2307,6 +2345,16 @@ export class Github implements INodeType {
|
|||
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') {
|
||||
// ----------------------------------
|
||||
// update
|
||||
|
|
Loading…
Reference in a new issue