Skip to content

Commit 2acb5c1

Browse files
authored
fix(librarian): temporarily use short SHA for release links (#2325)
We noticed that we were not able to open the release init PR today because the character limit exceeds what github allows. For now, by shortening the SHA links we can get under this limit. We should have a more robust solution in the future. Related-disscussion: https://github.com/orgs/community/discussions/27190 Related: #2234 Fixes: #2321
1 parent 9ef7056 commit 2acb5c1

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

internal/librarian/release_notes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ Language Image: {{.ImageVersion}}
7676
### {{.Heading}}
7777
{{ range .Commits }}
7878
{{ if index .Footers "PiperOrigin-RevId" -}}
79-
* {{.Subject}} {{.Body}} (PiperOrigin-RevId: {{index .Footers "PiperOrigin-RevId"}}) ([{{shortSHA .CommitHash}}]({{"https://github.com/"}}{{$noteSection.RepoOwner}}/{{$noteSection.RepoName}}/commit/{{.CommitHash}}))
79+
* {{.Subject}} {{.Body}} (PiperOrigin-RevId: {{index .Footers "PiperOrigin-RevId"}}) ([{{shortSHA .CommitHash}}]({{"https://github.com/"}}{{$noteSection.RepoOwner}}/{{$noteSection.RepoName}}/commit/{{shortSHA .CommitHash}}))
8080
{{- else -}}
81-
* {{.Subject}} {{.Body}} ([{{shortSHA .CommitHash}}]({{"https://github.com/"}}{{$noteSection.RepoOwner}}/{{$noteSection.RepoName}}/commit/{{.CommitHash}}))
81+
* {{.Subject}} {{.Body}} ([{{shortSHA .CommitHash}}]({{"https://github.com/"}}{{$noteSection.RepoOwner}}/{{$noteSection.RepoName}}/commit/{{shortSHA .CommitHash}}))
8282
{{- end }}
8383
{{ end }}
8484

internal/librarian/release_notes_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,11 @@ Language Image: go:1.21
529529
530530
### Features
531531
532-
* new feature ([1234567](https://github.com/owner/repo/commit/1234567890abcdef000000000000000000000000))
532+
* new feature ([1234567](https://github.com/owner/repo/commit/1234567))
533533
534534
### Bug Fixes
535535
536-
* a bug fix ([fedcba0](https://github.com/owner/repo/commit/fedcba0987654321000000000000000000000000))
536+
* a bug fix ([fedcba0](https://github.com/owner/repo/commit/fedcba0))
537537
538538
</details>`,
539539
librarianVersion, today),
@@ -579,11 +579,11 @@ Language Image: go:1.21
579579
580580
### Features
581581
582-
* new feature (PiperOrigin-RevId: 123456) ([1234567](https://github.com/owner/repo/commit/1234567890abcdef000000000000000000000000))
582+
* new feature (PiperOrigin-RevId: 123456) ([1234567](https://github.com/owner/repo/commit/1234567))
583583
584584
### Bug Fixes
585585
586-
* a bug fix (PiperOrigin-RevId: 987654) ([fedcba0](https://github.com/owner/repo/commit/fedcba0987654321000000000000000000000000))
586+
* a bug fix (PiperOrigin-RevId: 987654) ([fedcba0](https://github.com/owner/repo/commit/fedcba0))
587587
588588
</details>`,
589589
librarianVersion, today),
@@ -623,9 +623,9 @@ Language Image: go:1.21
623623
624624
### Features
625625
626-
* new feature ([1234567](https://github.com/owner/repo/commit/1234567890abcdef000000000000000000000000))
626+
* new feature ([1234567](https://github.com/owner/repo/commit/1234567))
627627
628-
* another new feature ([fedcba0](https://github.com/owner/repo/commit/fedcba0987654321000000000000000000000000))
628+
* another new feature ([fedcba0](https://github.com/owner/repo/commit/fedcba0))
629629
630630
</details>`,
631631
librarianVersion, today),
@@ -674,7 +674,7 @@ Language Image: go:1.21
674674
675675
### Features
676676
677-
* feature for a ([1234567](https://github.com/owner/repo/commit/1234567890abcdef000000000000000000000000))
677+
* feature for a ([1234567](https://github.com/owner/repo/commit/1234567))
678678
679679
</details>
680680
@@ -685,7 +685,7 @@ Language Image: go:1.21
685685
686686
### Bug Fixes
687687
688-
* fix for b ([fedcba0](https://github.com/owner/repo/commit/fedcba0987654321000000000000000000000000))
688+
* fix for b ([fedcba0](https://github.com/owner/repo/commit/fedcba0))
689689
690690
</details>`,
691691
librarianVersion, today, today),
@@ -725,7 +725,7 @@ Language Image: go:1.21
725725
726726
### Features
727727
728-
* new feature ([1234567](https://github.com/owner/repo/commit/1234567890abcdef000000000000000000000000))
728+
* new feature ([1234567](https://github.com/owner/repo/commit/1234567))
729729
730730
</details>`,
731731
librarianVersion, today),
@@ -761,7 +761,7 @@ Language Image: go:1.21
761761
762762
### Features
763763
764-
* new feature this is the body ([1234567](https://github.com/owner/repo/commit/1234567890abcdef000000000000000000000000))
764+
* new feature this is the body ([1234567](https://github.com/owner/repo/commit/1234567))
765765
766766
</details>`,
767767
librarianVersion, today),

0 commit comments

Comments
 (0)