Idea for GitHub OAuth Access

shall we merge this… this can solve my private repo with git integration.

1 Like

I didn’t try it…

interesting thing happened… I am following the approach of @wonderwhy.er on persistence, and adding action to write files once the gitclone is done

but here is the thing
when trying to clone the ottodev repo into ottodev
the message parser failed because one of the file has the prompt mentioning the tags <boltAction>, <boltArtifact> and when these content are placed on the action tags its braking the parser as these messages itself is injection these tags inside the actual tags :sweat_smile:

Ouh wow haha.
Yeah its interesting issue to solve, not a problem for 99.99999% cases :slight_smile:

1 Like

And will try to get to reviewing more this week.

1 Like

awesome!!
I have some PRs in pipeline… small ones, please review

basically broken down into pieces (which I wanted the git integration to have) into separate independent PRs

#444 Project Snapshot
can work seamlessly with chat fork and rewind

#504 Artifact Bundling
Combines multiple actions into one artifacts with custom Icon

#421 The Actual Git Integration
currently works with any public git repo and private repo that does not have 2FA this includes any git server not only github,
need github OAuth implementation for github 2FA accounts or access token can be used in place of password this will still work

1 Like

I had something working with this. I created a wrapper using that same node package (isomorphic-git) to use git commands via the terminal.

My though was could build “shared” functions between the terminal and UI elements, so that they had compatible functionality. It would also allow you to build system scripts and the AI to easily interact with the system. I feel like this would be “best practice” and reduce redundant code, etc.

It was just a random thing I wanted and was playing around with. And it works, just need to integrate the “wrapper” logic into the base.

1 Like

FYI - Update on this topic. I will have a PR ready hopefully today. Previously, I had GitHub OAuth as a feature toggle. Per @wonderwhy.er suggestion, a while back, I have removed the feature toggle this and integrated the auth flow into our current GitHub features (clone and push). I have also enabled private repo create/push and the ability to set the repo to public/private when pushing. It’s looking nice IMO. I have some testing and cleanup, so the PR is still a WIP, but should have it later today and will post here.

2 Likes

Ouh this sounds great, I will try to take a look tomorrow

1 Like

do checkout this PR submitted, it also adding different git providers like gitlab and more. just wanted to make sure its not a direct conflict

Thanks for the info on that PR @thecodacus. I will check it out.

So, my PR on this is ready. It could use more cleanup, but I am interested in seeing if we agree with this flow for GitHub. I think this will be a good solution for most folks. I am interested in GitLab, etc. also, but this is for GitHub. @thecodacus there may be some conflict w/ that other PR, and I appreciate you point it out, but honestly, I don’t have enough time to evaluate further in the near term, and this is ready to go, good enough for now IMO. That said, I am OK with anyone making changes or doing it different. @wonderwhy.er and @ColeMedin if you have any time let me know your thoughts also. https://youtu.be/Mq_eMsKszj4?si=uVnGzxqFUlmUlH2Z

feat: gitHub authentication to the application using GitHub’s Device Flow O… by emcconnell · Pull Request #408 · stackblitz-labs/bolt.diy

FYI I will be traveling tomorrow so if slow to respond that’s why, thanks all, have a great weekend and holiday week!

1 Like

Nice work @ed.mcconnell! Looks great and I can dive into it more after some time off I am taking for the holidays!

1 Like

Thanks @ColeMedin, no rush, enjoy your time off and the holidays!

1 Like

Link to the code? I would love to check this out more.

It does. I’ve been testing it the last week and built a user friendly wrapper.

I’m having some inconsistencies with the .git folder being persisted.

It seems their might be some posts in this community that could shed light on how persistene is configured. I’m gonna do a few searches but if anyone has anything useful to add about persistence of file/directories in Bolt, please do share.

Any ideas why the webcontainer on Bolt doesn’t preserve the .git directory on browser refresh?