We are working on improvements to the 1Password for Open Source program. This PR sets up some of the foundation for automated reviews.
What's changed?
Added a new review-application workflow that is triggered whenever an issue with the label "application" is opened or edited. This workflow will download the latest processor script, calling its review command and passing along relevant environment variables.
Sets up some testing utilities for us to be able to execute the script against local test issues instead of requiring a GitHub API call. This will probably be expanded in the future GitHub Workflows for CI testing.
Sets a GitHub struct that can be used to instantiate the GitHub API client with the provided env vars.
Sets up the main Reviewer struct that is called whenever ./processor review is called. Right now all this does is retrieve an issue and print it. The next step will be to validate issue details.
Of note... I'm realizing that it might be nice to move to a proper CLI package like Cobra, but for now let's keep it simple.
Testing
You can test out the processor command like so:
git checkout jh/review-setup
make install_deps && make build_processor
./processor review --test-issue example
There is currently only one test issue available, and it will just print its contents for now.
/dev/web/developer.1password.com/-/issues/1065
Summary
We are working on improvements to the 1Password for Open Source program. This PR sets up some of the foundation for automated reviews.
What's changed?
review-application
workflow that is triggered whenever an issue with the label "application" is opened or edited. This workflow will download the latestprocessor
script, calling itsreview
command and passing along relevant environment variables.GitHub
struct that can be used to instantiate the GitHub API client with the provided env vars.Reviewer
struct that is called whenever./processor review
is called. Right now all this does is retrieve an issue and print it. The next step will be to validate issue details.Of note... I'm realizing that it might be nice to move to a proper CLI package like Cobra, but for now let's keep it simple.
Testing
You can test out the processor command like so:
There is currently only one test issue available, and it will just print its contents for now.