minder icon indicating copy to clipboard operation
minder copied to clipboard

WIP: Creating providers with config

Open jhrozek opened this issue 1 year ago • 0 comments

Summary

There's a lot of changes that do work, but I'm not sure about the changes mainly to the provider interfaces. Some patches could be sent already and merged, but I wanted to get feedback on the direction.

I haven't tested other providers than github, but I don't see why they wouldn't work, we just need to have a switch/case or new enroll subcommands for them. With github you can enroll either with oauth:

minder provider enroll -c github -n my-little-oauth-github -o jakubtestorg --config /tmp/github-config.json --yes

or:

minder provider enroll -c github -n my-little-github -o jakubtestorg -t ghp_token --config /tmp/github-config.json --yes

I will point out the things I am not sure in inline comments.

this would create a provider with custom configuration.

Change Type

  • [ ] Bug fix (resolves an issue without affecting existing features)
  • [x] Feature (adds new functionality without breaking changes)
  • [ ] Breaking change (may impact existing functionalities or require documentation updates)
  • [ ] Documentation (updates or additions to documentation)
  • [ ] Refactoring or test improvements (no bug fixes or new functionality)

Testing

see above

Review Checklist:

  • [not at all] Reviewed my own code for quality and clarity.
  • [nope] Added comments to complex or tricky code sections.
  • [ ] Updated any affected documentation.
  • [lol no] Included tests that validate the fix or feature.
  • [ ] Checked that related changes are merged.

jhrozek avatar May 15 '24 13:05 jhrozek