Skip to content

Commit

Permalink
atlasaction: replace special character with base64url spec (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm authored Oct 7, 2024
1 parent 76f2b24 commit 3285208
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion atlasaction/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,9 @@ func (a *Actions) SchemaPlan(ctx context.Context) error {
return fmt.Errorf("failed to save schema plan: %w", err)
case dryRun:
// Save the plan with the generated name.
name = fmt.Sprintf("pr-%d-%.8s", tc.PullRequest.Number, plan.File.FromHash)
name = fmt.Sprintf("pr-%d-%.8s", tc.PullRequest.Number,
// RFC4648 base64url encoding without padding.
strings.NewReplacer("+", "-", "/", "_", "=", "").Replace(plan.File.FromHash))
goto runPlan
}
default:
Expand Down

0 comments on commit 3285208

Please sign in to comment.