feat: add extends capability to engine #515
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces the
extends
capabilities in the Reviewpad configuration.The extends feature works as follows.
The user can specify in the Reviewpad configuration a list of other Reviewpad configuration files as GitHub blob urls (e.g.
https://github.com/reviewpad/reviewpad/blob/main/reviewpad.yml
).As example:
The final configuration will be the concatenation of all configurations included in the extends and the contents of the current configuration.
The extended configuration will be included in the order they are specified in the "extends" section.
If properties have the same name, the one that was defined last overrides the previous ones.
For example:
Where
common_team
:and
specific_team_a
:The final configuration will be:
Follow-up:
(r *ReviewpadFile) extends(o *ReviewpadFile)
function)Related issue
Closes #306
Type of change
New feature (non-breaking change which adds functionality)
How was this tested?
Added unit tests to the loader that also check the DownloadContents of the GitHub API.
Checklist
task check -f
and have no issuesCode review and merge strategy (ship/show/ask)