Skip to content

Commit

Permalink
Merge pull request #292 from una-auxme/280-Feature-add-vscode-branch-…
Browse files Browse the repository at this point in the history
…naming-rule-corresponding-to-github-branch-naming-rule

feat: Add vscode settings for GitHub issues queries and branch naming
  • Loading branch information
ll7 authored Sep 23, 2024
2 parents 1b18ed7 + 87059ca commit 844def3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"githubIssues.issueBranchTitle": "${issueNumber}-${sanitizedIssueTitle}",
"githubIssues.queries": [

{
"label": "My Issues",
"query": "default"
},
{
"label": "Created Issues",
"query": "author:${user} state:open repo:${owner}/${repository} sort:created-desc"
},
{
"label": "Assigned Issues",
"query": "assignee:${user} state:open repo:${owner}/${repository} sort:created-desc"
},
{
"label": "All Issues",
"query": "state:open repo:${owner}/${repository} sort:created-desc"
}
],
}
Binary file added doc/00_assets/github_create_a_branch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 24 additions & 2 deletions doc/02_development/05_git_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,30 @@ Issue #28 called "Setup dev environment"

=> `28-setup-dev-environment`

**Note: You won't need to manually create these branch names in most cases -
GitHub does it for you, when you create a new branch from the issue you are working on.**
### Branch naming workflow

The following two options are available for creating a new branch:

1. **Web Interface**: You can create a new branch by clicking the "Create branch" button in the GitHub web interface.
2. **VSCode Extension**: Alternatively, use the "GitHub.vscode-pull-request-github" extension in Visual Studio Code.

#### Branch Creation Settings

The `.vscode/settings.json` file in this repository contains settings that automatically name the branch based on the issue number and the title of the issue.

#### Creating a Branch in the Web Interface

To create a branch in the web interface, follow these steps:

![Create Branch](../00_assets/github_create_a_branch.png)

#### Creating a Branch in VSCode

In Visual Studio Code, use the "GitHub.vscode-pull-request-github" extension.

1. Navigate to the "Issues" tab, where you will find queries defined in the `.vscode/settings.json` file.
2. These queries allow you to access different issues.
3. Click the button "->" to create a new branch from the selected issue, check out the branch, and assign the issue to yourself.

### Commit messages

Expand Down

0 comments on commit 844def3

Please sign in to comment.