Compare commits
1 Commits
e0f8bcef02
...
3eaaf8f59b
Author | SHA1 | Date | |
---|---|---|---|
|
3eaaf8f59b |
12
CHANGELOG.md
12
CHANGELOG.md
@ -6,18 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [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
|
## [0.2.1] - 2024-09-23
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
7
Cargo.lock
generated
7
Cargo.lock
generated
@ -719,10 +719,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64"
|
checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gitea-client"
|
name = "gitea-rs"
|
||||||
version = "1.22.1"
|
version = "1.22.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "git+https://git.front.kjuulh.io/kjuulh/gitea-rs#6eb4cea5c16d85d32555cea10dc55c045231ca10"
|
||||||
checksum = "b2c0b6c1b9c7d3b54eff20e6741c82c88f5b25b6469807a306f2e0756e17b2e4"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"serde",
|
"serde",
|
||||||
@ -744,7 +743,7 @@ dependencies = [
|
|||||||
"dirs 5.0.1",
|
"dirs 5.0.1",
|
||||||
"dotenv",
|
"dotenv",
|
||||||
"futures",
|
"futures",
|
||||||
"gitea-client",
|
"gitea-rs",
|
||||||
"nucleo-matcher",
|
"nucleo-matcher",
|
||||||
"octocrab",
|
"octocrab",
|
||||||
"pretty_assertions",
|
"pretty_assertions",
|
||||||
|
@ -3,7 +3,7 @@ members = ["crates/*"]
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.2.2"
|
version = "0.2.1"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
|
|
||||||
|
16
README.md
16
README.md
@ -4,22 +4,6 @@ Git Now is a utility for easily navigating git projects from common upstream pro
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 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?
|
How many steps do you normally do to download a project?
|
||||||
|
|
||||||
1. Navigate to github.com
|
1. Navigate to github.com
|
||||||
|
@ -1,15 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "gitnow"
|
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"
|
edition = "2021"
|
||||||
readme = "../../README.md"
|
|
||||||
repository = "https://github.com/kjuulh/gitnow"
|
|
||||||
homepage = "https://gitnow-client.prod.kjuulh.app"
|
|
||||||
license = "MIT"
|
|
||||||
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
publish = true
|
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
@ -24,7 +17,7 @@ uuid = { version = "1.7.0", features = ["v4"] }
|
|||||||
async-trait = "0.1.82"
|
async-trait = "0.1.82"
|
||||||
toml = "0.8.19"
|
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"
|
url = "2.5.2"
|
||||||
octocrab = "0.39.0"
|
octocrab = "0.39.0"
|
||||||
dirs = "5.0.1"
|
dirs = "5.0.1"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use gitea_client::apis::configuration::Configuration;
|
use gitea_rs::apis::configuration::Configuration;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use crate::{app::App, config::GiteaAccessToken};
|
use crate::{app::App, config::GiteaAccessToken};
|
||||||
@ -68,9 +68,9 @@ impl GiteaProvider {
|
|||||||
&self,
|
&self,
|
||||||
config: &Configuration,
|
config: &Configuration,
|
||||||
page: usize,
|
page: usize,
|
||||||
) -> anyhow::Result<Vec<gitea_client::models::Repository>> {
|
) -> anyhow::Result<Vec<gitea_rs::models::Repository>> {
|
||||||
let repos =
|
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
|
.await
|
||||||
.context("failed to fetch repos for users")?;
|
.context("failed to fetch repos for users")?;
|
||||||
|
|
||||||
@ -125,9 +125,9 @@ impl GiteaProvider {
|
|||||||
user: &str,
|
user: &str,
|
||||||
config: &Configuration,
|
config: &Configuration,
|
||||||
page: usize,
|
page: usize,
|
||||||
) -> anyhow::Result<Vec<gitea_client::models::Repository>> {
|
) -> anyhow::Result<Vec<gitea_rs::models::Repository>> {
|
||||||
let repos =
|
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
|
.await
|
||||||
.context("failed to fetch repos for users")?;
|
.context("failed to fetch repos for users")?;
|
||||||
|
|
||||||
@ -184,8 +184,8 @@ impl GiteaProvider {
|
|||||||
organisation: &str,
|
organisation: &str,
|
||||||
config: &Configuration,
|
config: &Configuration,
|
||||||
page: usize,
|
page: usize,
|
||||||
) -> anyhow::Result<Vec<gitea_client::models::Repository>> {
|
) -> anyhow::Result<Vec<gitea_rs::models::Repository>> {
|
||||||
let repos = gitea_client::apis::organization_api::org_list_repos(
|
let repos = gitea_rs::apis::organization_api::org_list_repos(
|
||||||
config,
|
config,
|
||||||
organisation,
|
organisation,
|
||||||
Some(page as i32),
|
Some(page as i32),
|
||||||
@ -202,7 +202,7 @@ impl GiteaProvider {
|
|||||||
api: &str,
|
api: &str,
|
||||||
access_token: Option<&GiteaAccessToken>,
|
access_token: Option<&GiteaAccessToken>,
|
||||||
) -> anyhow::Result<Configuration> {
|
) -> 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();
|
config.base_path = api.into();
|
||||||
match access_token {
|
match access_token {
|
||||||
Some(GiteaAccessToken::Env { env }) => {
|
Some(GiteaAccessToken::Env { env }) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user