Compare commits

..

1 Commits

Author SHA1 Message Date
cuddle-please
3eaaf8f59b chore(release): 0.2.1
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-09-23 20:17:50 +00:00
6 changed files with 13 additions and 49 deletions

View File

@ -6,18 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.2.2] - 2024-09-23
### Other
- add docs
main@origin
- add license
- update to gitea-client
- add publish
- *(release)* 0.2.1
## [0.2.1] - 2024-09-23
### Added

7
Cargo.lock generated
View File

@ -719,10 +719,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64"
[[package]]
name = "gitea-client"
name = "gitea-rs"
version = "1.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2c0b6c1b9c7d3b54eff20e6741c82c88f5b25b6469807a306f2e0756e17b2e4"
source = "git+https://git.front.kjuulh.io/kjuulh/gitea-rs#6eb4cea5c16d85d32555cea10dc55c045231ca10"
dependencies = [
"reqwest",
"serde",
@ -744,7 +743,7 @@ dependencies = [
"dirs 5.0.1",
"dotenv",
"futures",
"gitea-client",
"gitea-rs",
"nucleo-matcher",
"octocrab",
"pretty_assertions",

View File

@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"
[workspace.package]
version = "0.2.2"
version = "0.2.1"
[workspace.dependencies]

View File

@ -4,22 +4,6 @@ Git Now is a utility for easily navigating git projects from common upstream pro
![example gif](./assets/gifs/example.gif)
## Installation
```bash
cargo (b)install gitnow
# You can either use gitnow directly (and use spawned shell sessions)
gitnow
# Or install gitnow scripts (in your .bashrc, .zshrc) this will use native shell commands to move you around
eval $(gitnow init zsh)
git-now # Long
gn # Short alias
```
## Reasoning
How many steps do you normally do to download a project?
1. Navigate to github.com

View File

@ -1,15 +1,8 @@
[package]
name = "gitnow"
description = "Git Now is a utility for easily navigating git projects from common upstream providers. Search, Download, and Enter projects as quickly as you can type."
edition = "2021"
readme = "../../README.md"
repository = "https://github.com/kjuulh/gitnow"
homepage = "https://gitnow-client.prod.kjuulh.app"
license = "MIT"
version.workspace = true
publish = true
[dependencies]
anyhow.workspace = true
@ -24,7 +17,7 @@ uuid = { version = "1.7.0", features = ["v4"] }
async-trait = "0.1.82"
toml = "0.8.19"
gitea-client = { version = "1.22.1" }
gitea-rs = { git = "https://git.front.kjuulh.io/kjuulh/gitea-rs", version = "1.22.1" }
url = "2.5.2"
octocrab = "0.39.0"
dirs = "5.0.1"

View File

@ -1,5 +1,5 @@
use anyhow::Context;
use gitea_client::apis::configuration::Configuration;
use gitea_rs::apis::configuration::Configuration;
use url::Url;
use crate::{app::App, config::GiteaAccessToken};
@ -68,9 +68,9 @@ impl GiteaProvider {
&self,
config: &Configuration,
page: usize,
) -> anyhow::Result<Vec<gitea_client::models::Repository>> {
) -> anyhow::Result<Vec<gitea_rs::models::Repository>> {
let repos =
gitea_client::apis::user_api::user_current_list_repos(config, Some(page as i32), None)
gitea_rs::apis::user_api::user_current_list_repos(config, Some(page as i32), None)
.await
.context("failed to fetch repos for users")?;
@ -125,9 +125,9 @@ impl GiteaProvider {
user: &str,
config: &Configuration,
page: usize,
) -> anyhow::Result<Vec<gitea_client::models::Repository>> {
) -> anyhow::Result<Vec<gitea_rs::models::Repository>> {
let repos =
gitea_client::apis::user_api::user_list_repos(config, user, Some(page as i32), None)
gitea_rs::apis::user_api::user_list_repos(config, user, Some(page as i32), None)
.await
.context("failed to fetch repos for users")?;
@ -184,8 +184,8 @@ impl GiteaProvider {
organisation: &str,
config: &Configuration,
page: usize,
) -> anyhow::Result<Vec<gitea_client::models::Repository>> {
let repos = gitea_client::apis::organization_api::org_list_repos(
) -> anyhow::Result<Vec<gitea_rs::models::Repository>> {
let repos = gitea_rs::apis::organization_api::org_list_repos(
config,
organisation,
Some(page as i32),
@ -202,7 +202,7 @@ impl GiteaProvider {
api: &str,
access_token: Option<&GiteaAccessToken>,
) -> anyhow::Result<Configuration> {
let mut config = gitea_client::apis::configuration::Configuration::new();
let mut config = gitea_rs::apis::configuration::Configuration::new();
config.base_path = api.into();
match access_token {
Some(GiteaAccessToken::Env { env }) => {