-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[dev-tools] Script to find recent top committers for a module #19053
Conversation
Pinging @elastic/integrations (Team:Integrations) |
dev-tools/module_committers
Outdated
|
||
beats_base_dir=$(cd $(dirname $BASH_SOURCE)/..; pwd) | ||
|
||
beat_dirs=$(find $beats_base_dir -type d -iname \*beat -maxdepth 2 | grep -v libbeat) |
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 think you can wrap some lines into functions (find_beats_dirs, find_module_dirs, filter_module_name, etc.)
dev-tools/module_committers
Outdated
fi | ||
done | ||
|
||
for found_dir in $found_dirs; do |
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 wonder if the script content above can be covered with a one–liner, e.g. find + xargs
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.
Yeah, probably. I personally prefer to be more explicit like this when performance is not a huge consideration and readability is more important.
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.
Sounds good to me! Readability on the first place.
@@ -0,0 +1,40 @@ | |||
#!/bin/bash | |||
|
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.
set -euxo pipefail ?
@mtojek Thanks for the review. I've addressed your feedback. Please re-review when you get a chance! |
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
35fc110
to
d1a9b18
Compare
…c#19053) * Init checkin * Adding set * Removing unnecessary variable * Breaking up into functions
#19395) * Init checkin * Adding set * Removing unnecessary variable * Breaking up into functions
…c#19053) * Init checkin * Adding set * Removing unnecessary variable * Breaking up into functions
What does this PR do?
Adds a script,
dev-tools/module_committers
that finds a given module and lists out recent (within last year) top (3) committers for it.Sample usages
Exact module name
Partial module name
Matching from multiple beats
Why is it important?
It can be useful when trying to figure out who might know most about a module, particularly when triaging issues/PRs while on community duty or while handling tricky discuss posts or SDHs.