HPR is switching to a static site and in today's show Rho`n explains to Ken how to submit changes to the code.

Our hosting is kindly provided by An Honest host and for security reasons, our admin Josh requires you to create an account over there.

You will need to set up your account, with multi-factor authentication, add your ssh public keys, and get access to the rho_n/hpr_generator repository

First create an issue describing the problem.
If you can't or don't want to supply a fix, then this is enough and we will look into it.
If you want to supply a fix then you can follow the steps below to get the code.


[user@pc fix]$ git clone gitea@repo.anhonesthost.net:rho_n/hpr_generator.git
Cloning into 'hpr_generator'...
X11 forwarding request failed on channel 0
remote: Enumerating objects: 1044, done.
remote: Counting objects: 100% (1044/1044), done.
remote: Compressing objects: 100% (996/996), done.
remote: Total 1044 (delta 575), reused 217 (delta 39)
Receiving objects: 100% (1044/1044), 5.09 MiB | 2.93 MiB/s, done.
Resolving deltas: 100% (575/575), done.

You can verify the status using the git status command.


[user@pc fix]$ cd hpr_generator/
[user@pc hpr_generator]$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

We can now create a new local branch using git checkout.
The HPR convention is to name the branch I<issue number>-<brief_description> The brief description is usually based on the title of the issue


[user@pc hpr_generator]$ git checkout -b I70_Fix_links_to_audio
Switched to a new branch 'I70_Fix_links_to_audio'

[user@pc hpr_generator]$ git status 
On branch I70_Fix_links_to_audio
nothing to commit, working tree clean

So we can fix the issues locally. While this is the hard part we're skipping over it to show the process. In our case we added a comment to one file templates/shared-episode-summary.tpl.html


[user@pc hpr_generator]$ git status
On branch I70_Fix_links_to_audio
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   templates/shared-episode-summary.tpl.html

no changes added to commit (use "git add" and/or "git commit -a")


We add the file using git add


[user@pc hpr_generator]$ git add templates/shared-episode-summary.tpl.html

[user@pc hpr_generator]$ git status
On branch I70_Fix_links_to_audio
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   templates/shared-episode-summary.tpl.html


We can now record the changes locally using git commit


[user@pc hpr_generator]$ git commit
[I70_Fix_links_to_audio 302d466] Added comment to file as example for hpr3797
 1 file changed, 1 insertion(+)
 
[user@pc hpr_generator]$ git status
On branch I70_Fix_links_to_audio
nothing to commit, working tree clean

Once you are ready, you can push the changes to the HPR server using the git push command.


[user@pc hpr_generator]$ git push origin I70_Fix_links_to_audio
X11 forwarding request failed on channel 0
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 19 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 409 bytes | 409.00 KiB/s, done.
Total 4 (delta 3), reused 0 (delta 0), pack-reused 0
remote: 
remote: Create a new pull request for 'I70_Fix_links_to_audio':
remote:   https://repo.anhonesthost.net/rho_n/hpr_generator/compare/main...I70_Fix_links_to_audio
remote: 
remote: . Processing 1 references
remote: Processed 1 references in total
To repo.anhonesthost.net:rho_n/hpr_generator.git
 * [new branch]      I70_Fix_links_to_audio -> I70_Fix_links_to_audio



You can now login to the rho_n/hpr_generator git repo and you should be able to see several branches.

the repo showing 3 branches


Next to your branch you can press New Pull Request


The new pull request button


Review your changes and if you're happy press the green New Pull Request


showing the changes you wish to have


Fill in the description and a detailed comment
Use the HPR convention [<issue number>] <brief_description> The brief description is usually based on the title of the issue


showing the changes you wish to have


When Create Pull Request


showing the changes you wish to have

Your code will be reviewed and then pushed to the main website.