Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Documentation on how to quickly checkout a PR #440

Open
3 tasks
vanessaavviles opened this issue Nov 14, 2024 · 0 comments
Open
3 tasks

Missing Documentation on how to quickly checkout a PR #440

vanessaavviles opened this issue Nov 14, 2024 · 0 comments
Labels
complexity: small All steps are laid out in detail so that someone new to the project can work on it feature: docs: PD team documentation documentation on PD team processes and architecture, etc. good first issue Good for newcomers ready for dev lead s: PD team stakeholder: People Depot Team size: 0.25pt Can be done in 0.5-1.5 hours
Milestone

Comments

@vanessaavviles
Copy link
Member

Overview

We need to add documentation so that developers can checkout PRs quickly and effectively.

Action Items

Resources/Instructions/Tags

Documentation Addition Notes

What's missing?

  • 1.01 Here's how to checkout a PR to local branch pr/xxx:
  1. Add this git alias to your global git config:
[alias]
    pr = !sh -c \"git fetch upstream pull/${1}/head:pr/${1} && git switch pr/${1}\"
  1. Then, to checkout a PR to local branch pr/xxx (e.g., checking out PR Create SocMajor table #383 to a local branch called pr/383), run this replacing '383' with the relevant number:
git pr 383
  1. Note that:
  • This might only work in GitHub
  • The alias assumes the PRs are in the upstream remote
  • 1.02 Here's a way to checkout a PR to local branch prt/xxx which tracks the remote branch in which the PR was originally created:
  1. Add this git alias to your global git config:
[alias]
    prt = "!f() { \
      git fetch upstream pull/${1}/head; \
      commit_hash=$(git rev-parse FETCH_HEAD); \
      remote_branch=$(git branch -r --contains $commit_hash | head -n 1); \
      git switch -C prt/${1} $commit_hash; \
      git branch -u $remote_branch prt/${1}; \
    }; f"
  1. Then, to checkout a PR to local branch prt/xxx (e.g., checking out PR Create SocMajor table #383 to a local branch called prt/383), run this replacing '383' with the relevant number:
git prt 383
  1. To see tracking info, run:

git status -sb

  1. Note that:
  • The alias assumes the PRs are in the upstream remote, and that the remote containing the original working branch is set
  • This will reset the prt/xxx branch if it already exists

Where should it go?

When would this information have been useful?

Which roles will benefit most from this information?

Backend/ Dev

@vanessaavviles vanessaavviles self-assigned this Nov 14, 2024
@vanessaavviles vanessaavviles moved this to 🏗In progress-actively working in P: PD: Project Board Nov 14, 2024
@vanessaavviles vanessaavviles added feature: docs: PD team documentation documentation on PD team processes and architecture, etc. size: 0.25pt Can be done in 0.5-1.5 hours s: PD team stakeholder: People Depot Team ready for dev lead complexity: small All steps are laid out in detail so that someone new to the project can work on it and removed role: missing size: missing feature: missing stakeholder: missing complexity: missing labels Nov 14, 2024
@shmonks shmonks added the good first issue Good for newcomers label Nov 14, 2024
@shmonks shmonks moved this from 🏗In progress-actively working to 📋Prioritized Backlog in P: PD: Project Board Nov 14, 2024
@vanessaavviles vanessaavviles added this to the w. Ongoing milestone Nov 14, 2024
@shmonks shmonks moved this from 📋Prioritized Backlog to 🏗In progress-actively working in P: PD: Project Board Nov 15, 2024
@vanessaavviles vanessaavviles removed their assignment Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: small All steps are laid out in detail so that someone new to the project can work on it feature: docs: PD team documentation documentation on PD team processes and architecture, etc. good first issue Good for newcomers ready for dev lead s: PD team stakeholder: People Depot Team size: 0.25pt Can be done in 0.5-1.5 hours
Projects
Status: 🏗In progress-actively working
Development

No branches or pull requests

2 participants