feat(scheduling): resolve the issue discovery rule per organisation

This commit is contained in:
sam committed 2026-10-27 10:38:00 +11:00
1 parent b8e080301c
commit 8150df8d81
12 files changed
+168 -35

No files matched your search

+8 -1
View File
@@ -253,7 +253,11 @@ type IssueSource struct {
Forge forge.Forge
// BotUser is the connection's external account, the assignee polled for.
BotUser string
Repos []config.Repo
// Dispatch and Label are the discovery rule the connection's org polls
// with. Empty means the daemon's own.
Dispatch config.Dispatch
Label string
Repos []config.Repo
}
func (d *Daemon) issueSources(ctx context.Context) []IssueSource {
@@ -1203,6 +1207,9 @@ func (d *Daemon) poll(ctx context.Context) error {
}
cfg := d.Cfg.Get()
cfg.BotUser = source.BotUser
if source.Dispatch.Trigger != "" {
cfg.Dispatch, cfg.Label = source.Dispatch, source.Label
}
tag := d.sourceTag(source)
for _, repo := range source.Repos {
issues, complete := d.pollIssuesWithConfig(ctx, source.Forge, cfg, repo)