Skip to content

feat: repo-based consider all branches - #5797

Open
Ly-Joey wants to merge 1 commit into
google:masterfrom
Ly-Joey:feat-repo-based-cab
Open

feat: repo-based consider all branches#5797
Ly-Joey wants to merge 1 commit into
google:masterfrom
Ly-Joey:feat-repo-based-cab

Conversation

@Ly-Joey

@Ly-Joey Ly-Joey commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Add repo-based consider all branches logic in worker before we send the request to gitter to enumerate affected commits.
The allowlist is in datastore.

@Ly-Joey
Ly-Joey marked this pull request as ready for review August 6, 2026 01:46
}

urlCache := make(map[string]struct{})
regexCache := make([]*regexp.Regexp, 0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make this a global cache to avoid recompiling even when the cache expires.

Comment on lines +133 to +140
if entry.Value == "" {
continue
}
re, err := regexp.Compile(entry.Value)
if err != nil {
// Skip invalid regex entries.
continue
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably log a warning or something if it's invalid so we can see if we messed up our regexes

Comment on lines +213 to +215
if err != nil {
return false
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log the error please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants