Giter VIP home page Giter VIP logo

branchmover's Introduction

Metrics

branchmover's People

Contributors

gadenbuie avatar jennybc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

branchmover's Issues

Persist the issue body and closing comment between runs

We don't currently store the issue body anywhere, so coming back to the app resets the issue. If we instead persisted the text somewhere longish term, we could find it again when the user comes back to the app later.

Especially important in the case of #1

Error in reactable: `columns` names must exist in `data`

I'm seeing Error in reactable: `columns` names must exist in `data` when I run the app.

It looks like the problem is that the columns issue, state, created_at, and issue_url don't (necessarily?) exist in repos_df:

issue = colDef(
name = "Issue", html = TRUE, filterable = FALSE,
cell = reactable::JS('function(cellInfo) {
return cellInfo.value
? `<a href="${cellInfo.row.issue_url}">#${cellInfo.value}</a>`
: ""
}')
),
state = colDef(show = FALSE),
created_at = colDef(show = FALSE),
issue_url = colDef(show = FALSE)

Can branchMover move private repos?

branchMover fixed all my public repos like a champ, but I'm a bit confused about my private repos.

[main] > branchMover::app()

Listening on http://127.0.0.1:5644
ℹ @sellorm has 149 total repositories (including forks)
• 71 public repos
• 78 private reps
ℹ Found 30 branch mover issues:
✓ 30 are closed
ℹ 71 non-fork repositories have the following default branches:
✓ main: 71 repos
ℹ You have admin rights on 71 repos

This feels like it's telling me I don't have admin rights on my private repos. Or maybe I did something wrong or branchMover doesn't support private repos?? Could you clarify?

If working in temporary clone, no need for `usethis::git_default_branch_rename()`

If you're not working out of the user's primary local copy, as this app does not, there is no need to clone the repo and call usethis::git_default_branch_rename(). You could just call the GitHub API directly and change the default branch. Here:

path <- gert::git_clone(r$ssh_url)
setwd(path)
old_proj <- usethis::proj_set(path)
issue_close <- issue_close %||% pkg_read_lines("templates", "issue-close.md")
success <- FALSE
tryCatch({
usethis::git_default_branch_rename(to = new_default)
cli_alert_success("Moved to branch {.field {new_default}}")
success <- TRUE
}, error = function(err) {

I don't think you're gaining anything by cloning and, in fact, it's rather costly. There's the actual clone, which gets thrown away, plus you get into matters of SSH vs HTTPS for the URL (currently I doubt this will work for someone w/o SSH keys).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.