-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add options.last_files_match_only to simulate CODEOWNERS #80
Conversation
@k0kubun Thanks for the pull request 👍 I'm already on my Christmas holiday, but hopefully I can find time today to review and merge your pull request. |
CI is failing because the |
src/reviewer.js
Outdated
@@ -34,6 +34,15 @@ function fetch_other_group_members({ author, config }) { | |||
} | |||
|
|||
function identify_reviewers_by_changed_files({ config, changed_files, excludes = [] }) { | |||
const DEFAULT_OPTIONS = { | |||
last_match_only: 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'm now wondering if this option is clear enough since this only works for files
🤔 Let me check the whole configuration.
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, it can be confusing. This action can be used without files
, for instance.
Just brainstorming now...
last_files_match_only
last_matching_files_pattern_only
last_matching_files_only
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.
Cool, I'll go with last_files_match_only
.
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 agree it's better. Thank you!
Released in v0.10.0 🎉 (I don't know when I'll make it v1.0.0, by the way🤦♂️) |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [necojackarc/auto-request-review](https://togithub.com/necojackarc/auto-request-review) | action | minor | `v0.8.0` -> `v0.13.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>necojackarc/auto-request-review (necojackarc/auto-request-review)</summary> ### [`v0.13.0`](https://togithub.com/necojackarc/auto-request-review/releases/tag/v0.13.0) [Compare Source](https://togithub.com/necojackarc/auto-request-review/compare/v0.12.0...v0.13.0) #### What's Changed - Bump word-wrap from 1.2.3 to 1.2.4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/necojackarc/auto-request-review/pull/108](https://togithub.com/necojackarc/auto-request-review/pull/108) - Bump [@​babel/traverse](https://togithub.com/babel/traverse) from 7.11.0 to 7.23.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/necojackarc/auto-request-review/pull/112](https://togithub.com/necojackarc/auto-request-review/pull/112) - Bump to node.js v20.x by [@​mcgows](https://togithub.com/mcgows) in [https://github.com/necojackarc/auto-request-review/pull/117](https://togithub.com/necojackarc/auto-request-review/pull/117) - Bump version to v0.13.0 by [@​necojackarc](https://togithub.com/necojackarc) in [https://github.com/necojackarc/auto-request-review/pull/118](https://togithub.com/necojackarc/auto-request-review/pull/118) #### New Contributors - [@​mcgows](https://togithub.com/mcgows) made their first contribution in [https://github.com/necojackarc/auto-request-review/pull/117](https://togithub.com/necojackarc/auto-request-review/pull/117) **Full Changelog**: necojackarc/auto-request-review@v0.12.0...v0.13.0 ### [`v0.12.0`](https://togithub.com/necojackarc/auto-request-review/releases/tag/v0.12.0) [Compare Source](https://togithub.com/necojackarc/auto-request-review/compare/v0.11.0...v0.12.0) - Revert "Use team keys for authors" ([#​96](https://togithub.com/necojackarc/auto-request-review/issues/96)) ### [`v0.11.0`](https://togithub.com/necojackarc/auto-request-review/releases/tag/v0.11.0) [Compare Source](https://togithub.com/necojackarc/auto-request-review/compare/v0.10.0...v0.11.0) - Support GitHub teams in `per_author` ([#​88](https://togithub.com/necojackarc/auto-request-review/issues/88)) ### [`v0.10.0`](https://togithub.com/necojackarc/auto-request-review/releases/tag/v0.10.0) [Compare Source](https://togithub.com/necojackarc/auto-request-review/compare/v0.9.0...v0.10.0) - Support a `last_files_match_only` option for CODEOWNERS-compatibility ([https://github.com/necojackarc/auto-request-review/pull/80](https://togithub.com/necojackarc/auto-request-review/pull/80)) ### [`v0.9.0`](https://togithub.com/necojackarc/auto-request-review/releases/tag/v0.9.0) [Compare Source](https://togithub.com/necojackarc/auto-request-review/compare/v0.8.0...v0.9.0) - Support local config ([#​77](https://togithub.com/necojackarc/auto-request-review/issues/77)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/simpledotorg/simple-android). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
When you want to migrate the following CODEOWNERS file:
options.last_files_match_only
added in this PR allows to easily simulate the same behavior with auto-request-review:When there are multiple matching patterns in CODEOWNERS, the last matching pattern takes the most precedence and thus it asks reviews only from
@bar
. The above YAML file behaves in the same way with this PR.