Remove include repos (#4469)

* Removed redundant IncludeRepos mentions.

* removed proto for IncludeRepos and remade protos

* removed another instance of includeRepos

* reverted proto removal and

* actually deprecated the field

* ran make protos
This commit is contained in:
Jordan Tunstill
2025-10-21 15:28:12 -07:00
committed by GitHub
parent 0f60f6ecfe
commit 24c73b0cb6
5 changed files with 538 additions and 529 deletions
-1
View File
@@ -20,7 +20,6 @@ func (e *Engine) ScanGitHub(ctx context.Context, c sources.GithubConfig) (source
Repositories: c.Repos,
ScanUsers: c.IncludeMembers,
IgnoreRepos: c.ExcludeRepos,
IncludeRepos: c.IncludeRepos,
IncludeForks: c.IncludeForks,
IncludeIssueComments: c.IncludeIssueComments,
IncludePullRequestComments: c.IncludePullRequestComments,
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -253,7 +253,7 @@ func (s *Source) Init(aCtx context.Context, name string, jobID sources.JobID, so
s.filteredRepoCache = s.newFilteredRepoCache(aCtx,
simple.NewCache[string](),
append(s.conn.GetRepositories(), s.conn.GetIncludeRepos()...),
s.conn.GetRepositories(),
s.conn.GetIgnoreRepos(),
)
s.repos = s.conn.Repositories
+3 -3
View File
@@ -112,7 +112,7 @@ func TestAddReposByOrg(t *testing.T) {
assert.True(t, gock.IsDone())
}
func TestAddReposByOrg_IncludeRepos(t *testing.T) {
func TestAddReposByOrg_Repositories(t *testing.T) {
defer gock.Off()
gock.New("https://api.github.com").
@@ -128,7 +128,7 @@ func TestAddReposByOrg_IncludeRepos(t *testing.T) {
Credential: &sourcespb.GitHub_Token{
Token: "super secret token",
},
IncludeRepos: []string{"super-secret-org/super*"},
Repositories: []string{"super-secret-org/super-secret-repo", "super-secret-org/super-secret-repo2"},
Organizations: []string{"super-secret-org"},
})
err := s.getReposByOrg(context.Background(), "super-secret-org", noopReporter())
@@ -749,7 +749,7 @@ func BenchmarkEnumerate(b *testing.B) {
}
}
func TestEnumerateWithToken_IncludeRepos(t *testing.T) {
func TestEnumerateWithToken_Repositories(t *testing.T) {
defer gock.Off()
gock.New("https://api.github.com").
+4 -1
View File
@@ -264,7 +264,10 @@ message GitHub {
string head = 9;
string base = 10;
repeated string ignore_repos = 11;
repeated string include_repos = 12;
// DEPRECATED: include_repos is deprecated in favor of repositories.
// It was used for filtering when the repositories field wasn't populating the UI-input results correctly
// It can be removed when we no longer depend on it
repeated string include_repos = 12 [deprecated = true];
bool include_pull_request_comments = 14;
bool include_issue_comments = 15;
bool include_gist_comments = 16;