Skip to content

Commit 60d5d70

Browse files
committed
refactor: ♻️ Adjusting creation tag structure
1 parent d139a56 commit 60d5d70

6 files changed

Lines changed: 283 additions & 846 deletions

File tree

changeLogger.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const core = require('@actions/core');
66
const { getPRInformation } = require('./utils/getPRInformation');
77
const { getNewTagVersion } = require('./utils/getLatestTag');
88
const { appendToChangelog } = require('./utils/appendToChangelog');
9+
const { createTag } = require('./utils/createTag');
910

1011

1112
async function main() {
@@ -27,14 +28,7 @@ async function main() {
2728
const nextVersion = await getNewTagVersion(prData.title, octokit, owner, repo);
2829

2930
if (shouldCreateNewTag === "true") {
30-
await octokit.request('POST /repos/{owner}/{repo}/git/tags', {
31-
owner,
32-
repo,
33-
tag: nextVersion,
34-
message: prData.title,
35-
object: prData.commits.at(-1).sha,
36-
type: 'commit'
37-
});
31+
await createTag(octokit, prData, owner, repo, nextVersion);
3832
}
3933

4034
appendToChangelog(prData, nextVersion, changelogRelativePath, commitEmail, commitUserName);

0 commit comments

Comments
 (0)