Closed Matticusau closed 4 years ago
@wbsmolen have a read of this and let me know if you think this solution would work for the problem we were discussing.
I like the Jekyll Authors implementation.
If a PR comes in with an owner:
value that isn't found in in authors.yml
, it should also create a failing check.
Thanks, great idea on the failing check too.
Is this bot mutually exclusive with the built-in codeowners functionality? Leveraging codeowners to assign review to a github team could be useful.
E.g.: Take Arc for servers' content in the DHT repo. The page owner would likely be Islam Gomaa, but ideally the entire vteam is assigned to a PR opened against its content.
The branch protection is still requiring only a single reviewer, but this would include more folks in the content review process. Plus, if Islam (sticking to my eg) is out of office, PRs against his content are not blocked.
You could implement this front matter parsing feature to allow for multiple authors, but a) that sounds complicated and b) having the github teams/groups capability would be beneficial.
The reviewer functionality can be leveraged by either/both:
Regardless of which method assigns the reviewers, the Bot/Action can be configured with either:
prmerge-requirereviewcount = -1
will disable the minimum review count and instead require that there are no pending reviewers on the PR. Once all reviewers have approved it would proceed with the merge.prmerge-requirereviewcount = X
will require that a minimum of X reviews are approved before auto merge will run. There may still be other reviewers requested. This is similar to the minimum reviewer functionality in GitHub Branch Protection. Unfortunately I am still looking for a way to pull that setting via the API. The value of X should match your Branch Protection Rules.So I believe the scenario you describe is catered for with this configuration regardless of which method you use to assign reviewers. Actually using a combination of both could be beneficial as it would increase awareness of content changes to a larger group and allow backup coverage.
Let's settle on this syntax for Authors file:
# Author details.
Author Name:
name: Author Name
email: name@email.com
web: http://twitter.com/account
github: githubusername
Initial dev work done on reading Author file and retrieving GitHub user. Implementation into work flow still required. TODO: Look at leveraging artifacts to avoid API call to file contents https://developer.github.com/v3/actions/artifacts/
Preview feature testing will be completed in the Dev breach tomorrow. This initial release will perform an API call against the repo to get file contents. Am looking into using Action/Checkout on default branch and the Artifacts to reduce the chance of rate limiting on some membership levels.
Initial support for this is released. Please open new bugs/features and reference this issue where relevant
Feature Request
Is your feature request related to a problem? Please describe. Currently in Jekyll like blog sites it is not mandatory to specify a GitHub username as the article Author or similar front matter value. It is common to use a friendly name which is then mapped to further details in an author file.
Describe the solution you'd like The solution should be to provide a path to a key:value YAML or JSON type file which is used to look up the GitHub username of the author. I prefer a YAML solution to match the configuration standard in GitHub Actions. I see two options:
Or
_data/authors.yml
. So adding an additional field to the author file for the GitHub UserName such as:Describe alternatives you've considered Haven't found any alternative GitHub Actions to provide this functionality.
Alternatively we do not provide this functionality and simply continue with the current functionality which requires the GitHub account in the pages front matter. Which is not ideal as it duplicates the data needing to be maintained on each page if that is not already part of your Jekyll site.
Teachability, Documentation, Adoption, Migration Strategy TBD