-
Notifications
You must be signed in to change notification settings - Fork 791
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
Set up application approval workflow and logic #925
Conversation
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.
LGTM! Nice work, @jodyheavener
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.
Idiomatic and content tone suggestions, nothing more. I like the structure of this. Feel free to use or ignore my comments as you wish. Ping me for an additional review when you’re done.
script/approver.go
Outdated
|
||
Congratulations, @%s has approved your application! A promotion will be applied to your 1Password account shortly. | ||
|
||
If you haven't done so already, we highly recommend implementing a [recovery plan for your team](https://support.1password.com/team-recovery-plan/) in case access for a particular contributor is ever lost. You may add additional core contributors as you see fit. |
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.
[style] Using curly apostrophes over straight apostrophes
If you haven't done so already, we highly recommend implementing a [recovery plan for your team](https://support.1password.com/team-recovery-plan/) in case access for a particular contributor is ever lost. You may add additional core contributors as you see fit. | |
If you haven’t done so already, we highly recommend implementing a [recovery plan for your team](https://support.1password.com/team-recovery-plan/) in case access for a particular contributor is ever lost. You may add additional core contributors as you see fit. |
There's something about the tone that doesn’t fit well with me. The "highly" or even the "we" and "recommend" all feel out of place. When b5web links out to this team-recovery-plan
, it uses sentences like:
To lower the risk of lockout, assign at least one other person to help with account recovery.
1Password can't recover your account for you. Talk to your {{ if .Account.IsFamily }}Family Organizer{{ else }}administrator{{ end }} about implementing a Recovery Plan to make sure you never lose access to your items.
As the only person with permission to recover accounts, your team will rely on you for account recovery. If you forget your account details or misplace your Emergency Kit, you may lose access to your account. To lower risk of lockout, add another person to help with account recovery.
Is there something with a more neutral tone (that's still warm and informal), that doesn't use “we” that we could use here? (Effective writing is hard!) Maybe something like:
If you haven't done so already, we highly recommend implementing a [recovery plan for your team](https://support.1password.com/team-recovery-plan/) in case access for a particular contributor is ever lost. You may add additional core contributors as you see fit. | |
To lower the risk of lockout, [assign at least one other core contributor to help with account recovery](https://support.1password.com/team-recovery-plan/) in case access for a particular contributor is ever lost. |
I also realized in writing that sentence that I don't know if you meant "You may add additional core contributors [as members in your 1Password account]" or if you meant "You may add additional core contributors [as recovery group members]". Either way, I like that and I would keep that in there (maybe with the extra information).
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.
This is a good point you raise. This language has been around since the start of the program, but I think I'd like to move away from the "contributor" phrasing since an open source team can be made up of individuals outside that particular title.
To lower the risk of lockout, assign at least one other person to help with account recovery in case access for a particular team member is ever lost. You may add additional team members to your 1Password account, including for account recovery, as you see fit.
@@ -38,6 +38,9 @@ func main() { | |||
case "review": | |||
reviewer := Reviewer{} | |||
reviewer.Review() | |||
case "approve": |
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.
[Future suggestion] You might consider using spf13/cobra and spf13/pflag, as a way to structure your “main” function, depending on how many more commands and flags. Having a dependency to maintain could be more overhead than this tool deserves, but it could give it the structure it needs.
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 was considering this and also flag. For the time being, since these are the only two commands with the singular flag, I'm going to punt and reevaluate down the road.
// a file path. This will always be unique because it is relying on | ||
// github's issue numbers | ||
// e.g. 782-foo.json | ||
func (a *Application) FileName() string { |
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.
[ignoreable] You might want some tests for this, if anything, to help demonstrate to future maintainers what kinds of inputs and outputs you expect.
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 think I'd like to punt on this in favor of more broadly refactoring and testing in a fast-follow.
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.
From a code review perspective, this looks great!
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.
/dev/web/developer.1password.com/-/issues/1066
Summary
We are working on improvements to the 1Password for Open Source program. This PR continues sets up the workflow and logic to handle when an application is approved.
What's changed?
The focus of the changes here are related to when a reviewer has taken a look at the application, determined it is approved, and applies the
status: approved
label to the issue.approve
mode, taking in the details about who approved the applicationdata
directory made up of the issue ID and project name, e.g.data/295-foo.json
main
Testing
There are no new unit/integration tests in this PR (more testing setup underway). The manual testing flow to help debug and observe the behaviour when approving in the application processor has been updated. Here's how to test this out:
You can use this against any of the test issues in the repo, but unless it has the
status: approved
label it will result in one of the following errors:Issue closed
You'll receive the error
Issue not approved
You'll receive the error
Application invalid
You'll receive the error
It's worth noting that these are all considered edge cases but in theory are all still possible. All of these scenarios will not result in any comment from the bot or label changes.
Happy path
With this command you'll see a few things happen:
Output
Bot approval message
🎉 Your application has been approved
Congratulations, @approver-username has approved your application! A promotion will be applied to your 1Password account shortly.
If you haven't done so already, we highly recommend implementing a recovery plan for your team in case access for a particular contributor is ever lost. You may add additional core contributors as you see fit.
Finally, we'd love to hear more about your experience using 1Password in your development workflows! Feel free to join us over on the 1Password Developers Slack workspace.
Welcome to the program and happy coding! 🧑💻