Pushing patches to sr.ht git repos

I recently wrote a blog post using the taavi/laravel-socialite-mediawiki PHP library which is hosted on sr.ht.

sr.ht, or sourcehut is “is a collection of tools useful for software development”, including git repository hosting.

I had to make a change to the library, and this was my first time contributing to a sr.ht repository. The workflow was quite different from what I am used to and required quite some Googling before I came up with something that I was happy with. So here goes my workflow.

Workflow

Firstly, if you haven’t used sr.ht before you’ll need to create an account and set up some way of pushing code (SSH keys etc). There are some fairly good docs for this already for Setting up your account and first git repository, but you can stop at Creating a git repository.

Once you have an account set up you need to find the sr.ht repository that you want to work with. In my case that is at the URL https://git.sr.ht/~taavi/laravel-socialite-mediawiki

You can find a clone URL over on the right-hand side of the repo page, and you want to go ahead and clone the repo.

git clone https://git.sr.ht/~taavi/laravel-socialite-mediawikiCode language: PHP (php)

You then also want to fork the repo into your own sr.ht account. The button is also on the right.

(You can also use your local clone to send a git email, but I didn’t want to install this tooling)

Screenshot of a sr.ht repository with the clone information highlighted

Read more

Open Sourcing WBStack

This entry is part 6 of 12 in the series WBStack
wbstack organization on Github

Open Sourcing the code and config for WBStack has always been part of the plan, although functionality came first throughout the first year or so. Finally there is a github organization for wbstack containing 16 public repositories that make up the entire deployment for wbstack.com.

This effort took a few weeks trying to split sensible components out of the original mono repo that was started back in 2017 that now has over 1600 commits, making sure that no secrets were swept up along the way, and also trying to preserve git history where possible.

Although everything is now on Github that doesn’t mean that it is clearly understandable just yet, or in the most sensible layout, that will come with time.

Read more