pcdshub / pcdshub/engineering_tools

Helper Scripts for Maintaining Github Forks

Open
#51 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5
Forks
36
Avg merge
2d 17h
Merged PRs (30d)
3

Description

Expected Behavior

We should have helper scripts for the Github workflow:

  • Cloning a fork and setting upstream appropriately
  • Synchronizing a fork with the upstream

Current Behavior

No such scripts currently exist

Possible Solution

Port over @ZLLentz's tools and clean them up

git_setup_fork ()
{
    usage="git_setup_fork <repo>";
    if [ -z "${1}" ]; then
        echo "${usage}";
        return;
    fi;
    REPO=`basename "${1}"`;
    UPSTREAM=`dirname "${1}"`;
    GITHUB_USERNAME="ZLLentz";
    git clone "git@github.com:${GITHUB_USERNAME}/${REPO}.git";
    pushd "${REPO}";
    git remote add upstream "git@github.com:${UPSTREAM}/${REPO}.git";
    popd
}
git_sync_upstream ()
{
    git checkout master;
    git fetch upstream;
    git pull upstream master;
    git push origin master
}

Context

In the engineering general, there is some consensus that maintaining a fork is a pain point.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the repository for existing script conventions and entry points, then review the proposed git_setup_fork and git_sync_upstream helpers in this issue. Done means providing cleaned-up helpers for cloning a fork with its upstream configured and synchronizing the fork with upstream; check the comment thread for any decisions before starting.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.