10
310
Fork
You've already forked codeberg-cli
33

feat: added a open repo in browser command #241

Merged
Aviac merged 3 commits from lunatrium/codeberg-cli:main into main 2025年10月07日 16:40:22 +02:00
Contributor
Copy link

Implements #169,
uses the already used crate webbrowser for actually opening the website.
also is able to open the wiki subrepository (eg. codeberg.org/knut/foobar.wiki.git)

berg repo open

Implements #169, uses the already used crate webbrowser for actually opening the website. also is able to open the wiki subrepository (eg. codeberg.org/knut/foobar.wiki.git) `berg repo open`
Author
Contributor
Copy link

This is my first pull request. Could you please give me some kind of feedback?

This is my first pull request. Could you please give me some kind of feedback?
Aviac approved these changes 2025年10月06日 08:54:00 +02:00
Dismissed
Aviac left a comment
Owner
Copy link

Thank you for your contribution! This looks really clean Will merge once you give me the go that you don't want to do any further changes!

Thank you for your contribution! This looks really clean ✨ Will merge once you give me the go that you don't want to do any further changes!
@ -0,0 +28,4 @@
.unwrap_or(
ctx.owner_repo()
.map(|OwnerRepo{repo,owner}|(owner,repo))?,
);
Owner
Copy link

I would suggest using

let(owner,repo)=ctx.args.owner_and_repo.as_ref().and_then(|s|parse_owner_and_repo(s).ok()).or_else(||{ctx.owner_repo().map(|OwnerRepo{repo,owner}|(owner,repo)).ok()}).context("Couldn't determine owner and repo")?;

here instead.

I would suggest using ```rs let (owner, repo) = ctx .args .owner_and_repo .as_ref() .and_then(|s| parse_owner_and_repo(s).ok()) .or_else(|| { ctx.owner_repo() .map(|OwnerRepo { repo, owner }| (owner, repo)) .ok() }) .context("Couldn't determine owner and repo")?; ``` here instead.
Author
Contributor
Copy link
let(owner,repo)=ctx.args.owner_and_repo.as_ref().and_then(|s|parse_owner_and_repo(s).ok()).or_else(||{ctx.owner_repo().ok().map(|OwnerRepo{repo,owner}|(owner,repo))}).context("Couldn't determine owner and repo")?;

Thanks.
Should I rebase/squash the change to a single commit or should I make a new commit?

```rust let (owner, repo) = ctx .args .owner_and_repo .as_ref() .and_then(|s| parse_owner_and_repo(s).ok()) .or_else(|| { ctx.owner_repo() .ok() .map(|OwnerRepo {repo, owner}| (owner, repo)) }) .context("Couldn't determine owner and repo")?; ``` Thanks. Should I rebase/squash the change to a single commit or should I make a new commit?
Owner
Copy link

You're welcome!

You don't have to squash, I'll do that when merging. So a new commit is fine. Rebasing this on main would be useful though, so I can merge asap before new conflicts appear!

You're welcome! You don't have to squash, I'll do that when merging. So a new commit is fine. Rebasing this on main would be useful though, so I can merge asap before new conflicts appear!
Author
Contributor
Copy link

refactored code so it matches with the lastest upstream changes eg. b2d662581e, 833d5e73cf.
Thank you for your help, from my side you can merge this now.

refactored code so it matches with the lastest upstream changes eg. b2d662581e, 833d5e73cf. Thank you for your help, from my side you can merge this now.
Aviac left a comment
Owner
Copy link

LGTM! Thank you a lot for the contribution! 💚

LGTM! Thank you a lot for the contribution! 💚
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
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!241
Reference in a new issue
Aviac/codeberg-cli
No description provided.
Delete branch "lunatrium/codeberg-cli:main"

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?