Archived
11
377
Fork
You've already forked codeberg-cli
35

feat/add-config-to-support-different-base-url #111

Merged
RobWalt merged 20 commits from feat/add-config-to-support-different-base-url into main 2023年10月27日 23:59:24 +02:00
Owner
Copy link

This PR handles 3 main topics:

  1. It adds configurations files (yay 😬) to codeberg-cli which can be used on the app level. Currently 4 levels of configuration sources are accepted:
  • local config in a berg.toml file
  • global config in the systems data directory under the subfolder .berg-cli/berg.toml
  • environment variables with the name of the fields in the config prefixed by BERG, e.g. BERG_BASE_URL
  • some sensibly picked default values
  1. It adds the possibility to adjust the base_url effectively removing the constrain of the tool that it only works for the codeberg.org domain
  2. Includes some local testing infra setup as well as some of the first snapshot tests

Todo

  • replace the .config extension with .toml since it's a TOML file tools will probably use the extension for detection
  • add output tests for berg config --help
This PR handles 3 main topics: 1. It adds configurations files (yay 😬) to `codeberg-cli` which can be used on the app level. Currently 4 levels of configuration sources are accepted: - local config in a `berg.toml` file - global config in the systems data directory under the subfolder `.berg-cli/berg.toml` - environment variables with the name of the fields in the config prefixed by `BERG`, e.g. `BERG_BASE_URL` - some sensibly picked default values 2. It adds the possibility to adjust the `base_url` effectively removing the constrain of the tool that it only works for the `codeberg.org` domain 3. Includes some local testing infra setup as well as some of the first snapshot tests ### Todo - [x] replace the `.config` extension with `.toml` since it's a TOML file tools will probably use the extension for detection - [x] add output tests for `berg config --help` ### Related to - #108 - #90 - #84
fix: ensure test directories are created before tests run
All checks were successful
ci/woodpecker/pr/check_fmt Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/check_commits Pipeline was successful
8ae62a5e87
chore: add direcotry for integration tests ( #112 )
All checks were successful
ci/woodpecker/pr/check_fmt Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/check_commits Pipeline was successful
d81f623cc5
862ecc7b8b chore: add direcotry for integration tests
some progress made for #108
Reviewed-on: RobWalt/codeberg-cli#112
Co-authored-by: aviac <aviac@mailbox.org>
Co-committed-by: aviac <aviac@mailbox.org>
- added a script that spins up a fresh local forgejo instance
- the script also does some other setup so that we can start using
 `berg` immediately (no token setup required)
- also implement further command line options for logout
- adds tools for debuggin to nix flake
feat: add more tests and add template test file
Some checks failed
ci/woodpecker/pr/check_fmt Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/check_commits Pipeline was successful
44cf2d4c0e
feat: implement CLI option for config
Some checks failed
ci/woodpecker/pr/check_fmt Pipeline failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/check_commits Pipeline was successful
8352cc597f
feat: add ways to generate and show config
Some checks failed
ci/woodpecker/pr/check_fmt Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/check_commits Pipeline was successful
3af030b899
chore: ignore tests that depend on forgejo instance in CI
All checks were successful
ci/woodpecker/pr/check_fmt Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/check_commits Pipeline was successful
9889ab7a8e
chore: add new output snapshot test for new cli menu
All checks were successful
ci/woodpecker/pr/check_fmt Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/check_commits Pipeline was successful
62b2b09792
RobWalt deleted branch feat/add-config-to-support-different-base-url 2023年10月27日 23:59:24 +02:00
Commenting is not possible because the repository is archived.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Aviac/codeberg-cli!111
Reference in a new issue
Aviac/codeberg-cli
No description provided.
Delete branch "feat/add-config-to-support-different-base-url"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?