feat: Support archived repo exclusion from GH org scans - #4875
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6ecbeb6. Configure here.
|
Hi @hibare, Can you please address the bugbot comments. |
|
@MuneebUllahKhan222 All comments are addressed. Please review the changes. |
|
@MuneebUllahKhan222 Could you please review the PR. Thank you! |
c2d3f64 to
e8ae356
Compare
|
@MuneebUllahKhan222 Wondering if you could give a quick review on this one before it diverges a lot |
@hibare Unfortunately, I can't provide a Scanning approval on your PR since I'm not part of that team. However, I've already pinged Team Scanning to take a look. Hopefully, someone from the team will review it soon. |
|
Thank you @MuneebUllahKhan222 |
|
I think the PR needs to go through some checks. Could you please approve workflow runs @mustansir14 @camgunz @kashifkhan0771 ? |
I have approve the workflows once they pass I will merge the PR. Thanks for your contribution🚀 Edit: Can you run |
Signed-off-by: Shubham Hibare <Shubham.Hibare@thomsonreuters.com>
Signed-off-by: Shubham Hibare <Shubham.Hibare@thomsonreuters.com>
Signed-off-by: Shubham Hibare <shubham@hibare.in>
Updated man page. Thank you! |

Description:
Adds optional exclusion of archived GitHub repositories from organization scans. Introduces the
--exclude-archivedflag on thegithubsubcommand, a matchingexclude_archivedfield on the GitHub source protobuf (sourcespb.GitHub), and wiring throughGithubConfig, the engine, and org repo enumeration so archived repos are skipped when the option is enabled. Default behavior is unchanged when the flag is not set. Includes unit tests, an integration test case, and README usage.Checklist:
make test-community)?make lintthis requires golangci-lint)?Note
Low Risk
Opt-in flag defaults off; change is limited to skipping repos during enumeration with existing fork/include logic unchanged when disabled.
Overview
Adds optional archived repository exclusion for GitHub org (and other list-based) scans via
--exclude-archived, wired through CLI,GithubConfig, protobufexclude_archived, and the GitHub source connection.During repo enumeration in
processRepos, archived repos are skipped when the flag is set (after the existing fork filter). Enumeration logs now include archived and skipped counts. Behavior is unchanged when the flag is omitted.README and man page document the flag; unit tests cover archived filtering and interaction with
--include-forks, plus an integration test comparing repo counts with the flag on vs off.Reviewed by Cursor Bugbot for commit d651a67. Bugbot is set up for automated code reviews on this repo. Configure here.