gadenbuie / branchmover Goto Github PK
View Code? Open in Web Editor NEWAn RStudio Addin to Help Move the Default Branch of Your GitHub Repos
License: Other
An RStudio Addin to Help Move the Default Branch of Your GitHub Repos
License: Other
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
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
:
branchMover/R/repos_reactable.R
Lines 65 to 75 in c7f1a16
Basically, create the issue but do nothing else. Coming back to the app a week or so later the issue would be rediscovered and the action can be completed.
user <- gh::gh("/users/rstudio")
user$type
#> [1] "Organization"
Knowing the user type
we can then query /orgs/{org}/repos
instead of /users/{user}/repo
with type = "all"
. https://docs.github.com/en/rest/reference/repos#list-organization-repositories
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 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:
Lines 65 to 77 in c8162a4
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).
It would be pretty interesting to use the app to explore an organisation's repos vs. those I own personally.
I think it's akin to the optional organisation
argument in usethis::use_github()
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.