Skip to content
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

Setup command, workflow, Issue retrieval for review step #915

Merged
merged 10 commits into from
Mar 19, 2024

Conversation

jodyheavener
Copy link
Member

/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?

  • 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.

@jodyheavener jodyheavener added the 2024-program-updates Updates to the open source program in 2024 label Mar 14, 2024
Copy link
Member

@MNThomson MNThomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after the version changes (and some nits)
Shaun The Sheep

script/go.mod Outdated Show resolved Hide resolved
script/main.go Outdated Show resolved Hide resolved
.github/workflows/review-application.yml Outdated Show resolved Hide resolved

- name: Automated application review
run: |
chmod +x ./processor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GH retains permissions in artifact uploading, so if it was uploaded with execute, it still should be here. dsaltares/fetch-gh-release-asset might not respect the permissions though.

@jodyheavener jodyheavener merged commit 73a4fe2 into program-updates Mar 19, 2024
@jodyheavener jodyheavener deleted the jh/review-setup branch March 19, 2024 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024-program-updates Updates to the open source program in 2024
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants