Skip to content

Commit 9fd6f49

Browse files
Copilotzkoppert
andcommitted
Initial plan
Co-authored-by: zkoppert <[email protected]>
1 parent a6015e0 commit 9fd6f49

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

evergreen.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,19 @@ def enable_dependabot_security_updates(ghe, owner, repo, access_token):
340340

341341

342342
def get_repos_iterator(organization, team_name, repository_list, github_connection):
343-
"""Get the repositories from the organization, team_name, or list of repositories"""
343+
"""Get the repositories from the organization, team_name, repository_list, or via search query"""
344+
# Use GitHub search API if REPOSITORY_SEARCH_QUERY is set
345+
try:
346+
import os
347+
search_query = os.getenv("REPOSITORY_SEARCH_QUERY", "")
348+
except ImportError:
349+
search_query = ""
350+
if search_query:
351+
# Return repositories matching the search query
352+
return github_connection.search_repositories(search_query)
353+
344354
repos = []
355+
# Default behavior: list all organization/team repositories or specific repository list
345356
if organization and not repository_list and not team_name:
346357
repos = github_connection.organization(organization).repositories()
347358
elif team_name and organization:

0 commit comments

Comments
 (0)