decision
decision copied to clipboard
Add a Gitlab provider
I love the idea of this project, but as we use gitlab at work, I figured I'd add support for that.
Also fixed a bug where it wouldn't fetch the previous directories/categories if the branch wasn't named master.
Architectural changes
- introduced a
Providerinterface to allow implementing any provider- also added a
-providercommand-line arg, defaulting togithub
- also added a
- All Github functions are now on a struct, implementing a
Providerinterface - Github PRs are no longer created by first creating a
treeand committing that. Instead, it is done in one action in the same way as for the immediate commit - Added a Gitlab provider
- placed common functionality in
providerandgitas appropriate (and to avoid import loops)
Breaking changes
usage
- renamed command-line flag
github-tokentoprovider-token
code
- pretty much all github code as it is now on a provider
- moved all git-related variables to a
gitpackage
Tests
What tests? There were no tests to begin with, and I'm no overachiever!
I've manually tested this on both Gitlab and Github, for both PR mode and immediate commit:
https://gitlab.com/phroggyy/decision-log/-/merge_requests/1
https://github.com/phroggyy/decision-log-test/pull/1