mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-01-06 04:59:49 -06:00
Fix workflow path filter for GitHub (#5721)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
@@ -643,7 +643,7 @@ func (c *client) Hook(ctx context.Context, r *http.Request) (*model.Repo, *model
|
||||
}
|
||||
} else if pipeline != nil && pipeline.Event == model.EventPush {
|
||||
// GitHub has removed commit summaries from Events API payloads from 7th October 2025 onwards.
|
||||
pipeline, err = c.loadChangedFilesFromCommits(ctx, repo, pipeline, prevCommit, currCommit)
|
||||
pipeline, err = c.loadChangedFilesFromCommits(ctx, repo, pipeline, currCommit, prevCommit)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@@ -768,7 +768,7 @@ func (c *client) loadChangedFilesFromCommits(ctx context.Context, tmpRepo *model
|
||||
if prev == "" {
|
||||
opts := &github.ListOptions{Page: 1}
|
||||
for opts.Page > 0 {
|
||||
commit, resp, err := gh.Repositories.GetCommit(ctx, repo.Owner, repo.Name, curr, &github.ListOptions{})
|
||||
commit, resp, err := gh.Repositories.GetCommit(ctx, repo.Owner, repo.Name, curr, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user