@@ -23,6 +23,7 @@ import (
2323 "net/url"
2424 "strings"
2525 "testing"
26+ "time"
2627
2728 "github.com/go-git/go-git/v5"
2829 gogitConfig "github.com/go-git/go-git/v5/config"
@@ -1026,10 +1027,10 @@ func TestFindMergedPullRequestsWithPendingReleaseLabel(t *testing.T) {
10261027 if r .URL .Query ().Get ("state" ) != "closed" {
10271028 t .Errorf ("unexpected state: got %q" , r .URL .Query ().Get ("state" ))
10281029 }
1029- pr0 := github.PullRequest {Number : github .Ptr (0 ), HTMLURL : github .Ptr ("https://github.com/owner/repo/pull/0" ), MergeCommitSHA : github .Ptr ( "sha456" ) , Labels : []* github.Label {{Name : github .Ptr ("release:pending" )}}}
1030+ pr0 := github.PullRequest {Number : github .Ptr (0 ), HTMLURL : github .Ptr ("https://github.com/owner/repo/pull/0" ), MergedAt : & github.Timestamp { Time : time . Date ( 2025 , time . September , 5 , 20 , 44 , 59 , 0 , time . UTC )} , Labels : []* github.Label {{Name : github .Ptr ("release:pending" )}}}
10301031 pr1 := github.PullRequest {Number : github .Ptr (1 ), Labels : []* github.Label {{Name : github .Ptr ("release:pending" )}}}
10311032 pr2 := github.PullRequest {Number : github .Ptr (2 ), Labels : []* github.Label {{Name : github .Ptr ("other-label" )}}}
1032- pr3 := github.PullRequest {Number : github .Ptr (3 ), HTMLURL : github .Ptr ("https://github.com/owner/repo/pull/3" ), MergeCommitSHA : github .Ptr ( "sha123" ), Merged : github . Ptr ( true ) , Labels : []* github.Label {{Name : github .Ptr ("release:pending" )}}}
1033+ pr3 := github.PullRequest {Number : github .Ptr (3 ), HTMLURL : github .Ptr ("https://github.com/owner/repo/pull/3" ), ClosedAt : & github.Timestamp { Time : time . Date ( 2025 , time . September , 5 , 20 , 44 , 59 , 0 , time . UTC )} , Labels : []* github.Label {{Name : github .Ptr ("release:pending" )}}}
10331034 prs := []* github.PullRequest {& pr0 , & pr1 , & pr2 , & pr3 }
10341035 b , err := json .Marshal (prs )
10351036 if err != nil {
@@ -1038,8 +1039,7 @@ func TestFindMergedPullRequestsWithPendingReleaseLabel(t *testing.T) {
10381039 fmt .Fprint (w , string (b ))
10391040 },
10401041 wantPRs : []* PullRequest {
1041- {Number : github .Ptr (0 ), HTMLURL : github .Ptr ("https://github.com/owner/repo/pull/0" ), MergeCommitSHA : github .Ptr ("sha456" ), Labels : []* github.Label {{Name : github .Ptr ("release:pending" )}}},
1042- {Number : github .Ptr (3 ), HTMLURL : github .Ptr ("https://github.com/owner/repo/pull/3" ), MergeCommitSHA : github .Ptr ("sha123" ), Merged : github .Ptr (true ), Labels : []* github.Label {{Name : github .Ptr ("release:pending" )}}},
1042+ {Number : github .Ptr (0 ), HTMLURL : github .Ptr ("https://github.com/owner/repo/pull/0" ), MergedAt : & github.Timestamp {Time : time .Date (2025 , time .September , 5 , 20 , 44 , 59 , 0 , time .UTC )}, Labels : []* github.Label {{Name : github .Ptr ("release:pending" )}}},
10431043 },
10441044 },
10451045 {
0 commit comments