Skip to content

Commit 0f1efba

Browse files
fix: exclude from sha
1 parent 73590c3 commit 0f1efba

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/provider/github.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ func (repo *GitHubRepository) GetCommits(fromSha, toSha string) ([]*semrel.RawCo
8989
}
9090
for _, commit := range commits {
9191
sha := commit.GetSHA()
92-
allCommits = append(allCommits, &semrel.RawCommit{
93-
SHA: sha,
94-
RawMessage: commit.Commit.GetMessage(),
95-
})
9692
if sha == fromSha {
9793
done = true
9894
break
9995
}
96+
allCommits = append(allCommits, &semrel.RawCommit{
97+
SHA: sha,
98+
RawMessage: commit.Commit.GetMessage(),
99+
})
100100
}
101101
if done || resp.NextPage == 0 {
102102
break

pkg/provider/github_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func TestGithubGetCommits(t *testing.T) {
163163
defer ts.Close()
164164
commits, err := repo.GetCommits("2222", "1111")
165165
require.NoError(t, err)
166-
require.Len(t, commits, 6)
166+
require.Len(t, commits, 5)
167167

168168
for i, c := range commits {
169169
idxOff := i + 1

0 commit comments

Comments
 (0)