Reviewed-on: #89 Co-authored-by: Timo Behrendt <t.behrendt@t00n.de> Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
This commit was merged in pull request #89.
This commit is contained in:
+9
-9
@@ -100,7 +100,7 @@ export class TagIncrementer {
|
||||
private gitService: GitService,
|
||||
private coreService: CoreService,
|
||||
private commitAnalyzer: ConventionalCommitAnalyzer,
|
||||
private tagService: TagService
|
||||
private tagService: TagService,
|
||||
) {}
|
||||
|
||||
async getBaseTag(lastTag: string | undefined, maxTags: number = 50): Promise<string> {
|
||||
@@ -138,7 +138,7 @@ export class TagIncrementer {
|
||||
|
||||
const analyzedCommit = this.commitAnalyzer.analyzeCommit(commit.message);
|
||||
this.coreService.info(
|
||||
`Analyzed commit - type: ${analyzedCommit.type}, breaking: ${analyzedCommit.breaking}`
|
||||
`Analyzed commit - type: ${analyzedCommit.type}, breaking: ${analyzedCommit.breaking}`,
|
||||
);
|
||||
|
||||
const incrementType = this.commitAnalyzer.determineIncrementType(analyzedCommit);
|
||||
@@ -147,14 +147,14 @@ export class TagIncrementer {
|
||||
return incrementType;
|
||||
} catch (error) {
|
||||
this.coreService.info(
|
||||
`Error fetching commit ${ref}: ${error instanceof Error ? error.message : String(error)}`
|
||||
`Error fetching commit ${ref}: ${error instanceof Error ? error.message : String(error)}`,
|
||||
);
|
||||
|
||||
// Additional debugging for commit-related errors
|
||||
if (error instanceof Error && error.message.includes("404")) {
|
||||
this.coreService.info(`404 error suggests commit ${ref} was not found in repository`);
|
||||
this.coreService.info(
|
||||
`This could indicate: 1) SHA doesn't exist, 2) Repository access issue, 3) API endpoint mismatch`
|
||||
`This could indicate: 1) SHA doesn't exist, 2) Repository access issue, 3) API endpoint mismatch`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ export class TagIncrementer {
|
||||
ref: string,
|
||||
maxTags: number = 50,
|
||||
prerelease: boolean = false,
|
||||
githubSha: string = ""
|
||||
githubSha: string = "",
|
||||
): Promise<string> {
|
||||
this.coreService.info(`Starting tag increment process at ref ${ref}`);
|
||||
|
||||
@@ -175,7 +175,7 @@ export class TagIncrementer {
|
||||
const parsedTag = this.tagService.parseTag(baseTag);
|
||||
|
||||
this.coreService.info(
|
||||
`Parsed version: ${parsedTag.major}.${parsedTag.minor}.${parsedTag.patch}`
|
||||
`Parsed version: ${parsedTag.major}.${parsedTag.minor}.${parsedTag.patch}`,
|
||||
);
|
||||
|
||||
const incrementType = await this.determineIncrementType(ref);
|
||||
@@ -187,7 +187,7 @@ export class TagIncrementer {
|
||||
|
||||
this.coreService.info(`New tag: ${renderedTag}`);
|
||||
this.coreService.info(
|
||||
`Successfully determined new tag: ${renderedTag} (${incrementType} increment)`
|
||||
`Successfully determined new tag: ${renderedTag} (${incrementType} increment)`,
|
||||
);
|
||||
|
||||
return renderedTag;
|
||||
@@ -215,7 +215,7 @@ export class LocalGitService implements GitService {
|
||||
return { commit: { message } };
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
`Failed to get commit ${ref}: ${error instanceof Error ? error.message : String(error)}`
|
||||
`Failed to get commit ${ref}: ${error instanceof Error ? error.message : String(error)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -296,7 +296,7 @@ export async function run(): Promise<void> {
|
||||
ref,
|
||||
maxTags,
|
||||
prerelease,
|
||||
githubSha
|
||||
githubSha,
|
||||
);
|
||||
|
||||
coreService.info(`Process completed successfully. New tag: ${newTag}`);
|
||||
|
||||
Reference in New Issue
Block a user