-
Notifications
You must be signed in to change notification settings - Fork 741
Filter inherited stats by ownership #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,9 +22,12 @@ const Repository = struct { | |||||||||||||||||||||||||||||
| lines_changed: u32, | ||||||||||||||||||||||||||||||
| views: u32, | ||||||||||||||||||||||||||||||
| private: bool, | ||||||||||||||||||||||||||||||
| fork: bool, | ||||||||||||||||||||||||||||||
| owner_login: []const u8, | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| pub fn deinit(self: @This(), allocator: std.mem.Allocator) void { | ||||||||||||||||||||||||||||||
| allocator.free(self.name); | ||||||||||||||||||||||||||||||
| allocator.free(self.owner_login); | ||||||||||||||||||||||||||||||
|
Comment on lines
+25
to
+30
|
||||||||||||||||||||||||||||||
| fork: bool, | |
| owner_login: []const u8, | |
| pub fn deinit(self: @This(), allocator: std.mem.Allocator) void { | |
| allocator.free(self.name); | |
| allocator.free(self.owner_login); | |
| fork: bool = false, | |
| owner_login: ?[]const u8 = null, | |
| pub fn deinit(self: @This(), allocator: std.mem.Allocator) void { | |
| allocator.free(self.name); | |
| if (self.owner_login) |owner_login| { | |
| allocator.free(owner_login); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description frames
EXCLUDE_INHERITEDas an opt-in flag, but the repo workflow setsEXCLUDE_INHERITED: "true"unconditionally, which changes the default generated stats behavior for this repo (and for anyone copying the workflow). Consider omitting this env var by default, or sourcing it from a secret/input and defaulting to "false".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually wonder if the variable should be set by default to "true' in the code itself. The inflated statistics can be drastic with only a small contribution to a popular repository.