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

Clarify overriding previous secrets #205

Open
plocket opened this issue Feb 9, 2023 · 1 comment
Open

Clarify overriding previous secrets #205

plocket opened this issue Feb 9, 2023 · 1 comment

Comments

@plocket
Copy link
Collaborator

plocket commented Feb 9, 2023

From the relevant code block, it looks like we only make or override org secrets if they are an admin. So it doesn't make sense to ask specifically about org secrets if they aren't an admin, because the next question is asking if they want to override those secrets. The implicit question is "has someone already setup org secrets?
-> if they haven't, go ask them to, if they have, you can't override them, so just keep going", but that adds a decent bit of complexity.

Regarding #200 (comment) and

https://github.com/plocket/docassemble-ALAutomatedTestingTests/blob/f2aa2ab12af5583e0b63b3cc87122452a50638ed/docassemble/ALAutomatedTestingTests/data/questions/al_set_up_testing.yml#L206-L225

Suggested update:

  - label: |
      % if is_org_admin:
      Has someone already set up the repository or organization secrets?
      % else:
      Has someone already set up the repository's secrets?
      % endif
    field: already_has_secrets
    datatype: yesnoradio
@plocket
Copy link
Collaborator Author

plocket commented Feb 9, 2023

I think this doesn't quite work. If the user is not an org admin, that doesn't mean there aren't organization secrets. Maybe we need to ask a totally different set of questions. We'll have to brainstorm about that.

Brainstorm 1

If isn't org admin:

  • (if part of an org) Are there already org secrets? If you don't know, ask.
    • if yes: no other questions
    • if no (or if not part of an org): Are there already repo secrets?
      • if yes: Do you want to change the repo secrets?
      • if no: Do you want to create the repo secrets?

Also, the first question needs to be different - if they're not part of an org, don't mention org secrets.

Brainstorm 2

  • Do you need to set up repo secrets? (if NOT part of an org: If secrets don't exist or if you need to change them to give a new API key or something.) (if they're part of an org, help text says that if they have org secrets, answer 'no'. if they don't know, they should ask. Maybe also include the other thing?)

I think that's the only brainstorming I have for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant