Skip to content

Commit 1e136a0

Browse files
committed
Retrieve commit ref correctly.
The command `frizbee actions <action>@<tag>` incorrectly retrieves the tag's ref rather than the commit's one. The tag's ref should instead be used to retrieve the details of the tag, which contain the ref of the commit. This change changes `getCheckSumForTag` to lookup the right field using two subsequent call to GitHub. Fixes #206
1 parent 8f2db5c commit 1e136a0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: pkg/replacer/actions/actions.go

+10
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,16 @@ func getCheckSumForTag(ctx context.Context, restIf interfaces.REST, owner, repo,
314314
return "", fmt.Errorf("failed to join path: %w", err)
315315
}
316316

317+
tagSHA, err := doGetReference(ctx, restIf, path)
318+
if err != nil {
319+
return "", err
320+
}
321+
322+
path, err = url.JoinPath("repos", owner, repo, "git", "tags", tagSHA)
323+
if err != nil {
324+
return "", fmt.Errorf("failed to join path: %w", err)
325+
}
326+
317327
return doGetReference(ctx, restIf, path)
318328
}
319329

0 commit comments

Comments
 (0)