Urgent.News

What's breaking now, across thousands of outlets.

Tech

HD-101 — The first pull request

HD-101 — The first pull request Builds: nothing. Teaches: why the next six tickets exist. The ticket Add a feature to the helpdesk CLI. Don't push to main — open a pull request. What you do git switch -c hd-101-priority-filter # ... write the code ... git add -A git commit -m "feat: filter tickets by priority" git push -u origin hd-101-priority-filter gh pr create --base main --head…

HD-101 - The First Pull Request

This ticket outlines the process of creating a pull request (PR) in a software development workflow. The PR, named HD-101: filter tickets by priority, was opened to add a feature to the helpdesk CLI that prioritizes tickets based on their priority level.

To create the PR, the following steps were taken:

1. Git switch -c hd-101-priority-filter: This command creates a new branch named 'hd-101-priority-filter' based on the current branch.

2. Code was written in this new branch.

3. Changes were added (git add -A) and committed (git commit -m 'feat: filter tickets by priority').

4. The branch was pushed to the 'origin' remote (git push -u origin hd-101-priority-filter).

5. A PR was created using the GitHub command-line tool (gh pr create) with the following specifications:

- Base branch: 'main'

- Head branch: 'hd-101-priority-filter'

- Title: HD-101: filter tickets by priority

- Body: Adds --priority to the list command.

After the PR was created and merged, it was noted that there were no tests running, no required reviewers, and no status checks. This demonstrates that the PR was essentially an empty change, serving as an example of a PR without any necessary gatekeeping measures.

A key point to understand is the distinction between a PR's base and head. The base is the destination where the code will land (in this case, the 'main' branch), while the head is the source branch that the code originates from (in this case, 'hd-101-priority-filter'). Confusing these two terms can lead to mistakes, as seen in the referenced mistakes.md file.

Lastly, it is important to note that a PR's head has no relation to Git's HEAD pointer. Git's HEAD refers to the current commit being pointed at, while a PR's head refers to the branch that is being proposed for merging.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Facing State Management: "Truly" Understanding Provider in Flutter

The Beginning: Why This Project? You somehow learn to build UIs in Flutter, but when it comes to state management, it's a wall you inevitably hit.

  • Provider functions like a central radio station in Flutter app
  • NotifyListeners() updates UI when data changes in Provider
  • Learning strategy involved AI pair programming and error analysis

More from Tuesday 25 August →