Home > Article > Web Front-end > Building jargons.dev [# The Branch Script
This should be really short haha ?, considering the branch script is the smallest of them (The Scripts) all.
The Branch Script's primary assignment is to hold all helper functions that can be used to perform operation related to References (aka Branch) on the GitHub APIs.
Noting the primary responsibility of the branch script which is
to create a reference/branch of repo (in this case would be the jargons.dev repo fork) on an authenticated user's account. I got to work quickly by doing the following...
Implemented the main createBranch function in the branch script which accepts necessary param to perform the following operation in the stated order...
I also took the initiative of moving the getBranch helper function from the fork script to a the branch script — feels more like home ?.
This Pull request implements the branch creation script whose primary function is to create a new branch from the forked repository for an authenticated user.
Implemented the main createBranch function in the branch script at src/lib/branch.js; this function takes in 3 params;
The createBranch function performs the following operation in the stated order...
Moved the getBranch function from the fork script to the branch script
screencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.04.01-13_54_14.webm
The above is the detailed content of Building jargons.dev [# The Branch Script. For more information, please follow other related articles on the PHP Chinese website!