Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Visualizes your stacked changes when proposing pull requests on GitHub

License

NotificationsYou must be signed in to change notification settings

coldrun/git-town-action

 
 

Repository files navigation

Git Town logo

This action visualizes your stacked changes when proposing pull requests on GitHub:

This allows you to easily see all related PRs for a given pull request, whereyou are in the stack, as well as navigate between PRs in a stack.

It is designed to work out of the box withGit Town v12+,but also supports previous versions viamanual configuration.

What's New

Please refer to therelease page forthe latest release notes.

Getting Started

Create the GitHub Actions Workflow File

Create a workflow file calledgit-town.yml under.github/workflows with the followingcontents:

name:Git Townon:pull_request:branches:      -'**'jobs:git-town:name:Display the branch stackruns-on:ubuntu-latestpermissions:contents:readpull-requests:writesteps:      -uses:actions/checkout@v4      -uses:git-town/action@v1

Once this workflow is committed, the action will visualize your stacked changeswhenever a pull request is created or updated. It also will automatically readyour.git-branches.toml file to determine the main and perennial branches foryour repository.

Modify the Pull Request Template

By default, this action will append the visualization to the bottom of the PR description.If you are using apull request template,you can specify the location of the visualization in the template by adding aHTML commentthat containsbranch-stack inside of it:

##Stack<!-- branch-stack-->##Checklist[] Foo[] Bar[] Baz

This action will look for this comment and insert the visualization underneath the commentwhen it runs. It will also leave behind the comment, so that the next time it runs, it willbe able to use it again to update the visualization:

##Stack<!-- branch-stack--> 👈 Still there!-`main`-\#1:point_left:-\#2##Checklist[] Foo[] Bar[] Baz

Warning

Be careful not to add content between the comment and thevisualization, as this action will replace that content each time itupdates your PR. Adding content above the tag, or below the list issafe though!

Manual Configuration

If you are using Git Town v11 and below, or are setting up this action for a repositorythat doesn't have a.git-branches.toml, you will need to tell this action what themain branch and perennial branches are for your repository.

Main Branch

The main branch is the default parent branch for new feature branches, and can bespecified using themain-branch input:

-uses:git-town/action@v1with:main-branch:'main'

This action will default to your repository's default branch, which it fetches viathe GitHub REST API.

Perennial Branches

Perennial branches are long lived branches and are never shipped.

There are two ways to specify perennial branches: explicitly or via regex. This canbe done with theperennial-branches andperennial-regex inputs respectively:

-uses:git-town/action@v1with:perennial-branches:|      dev      staging      prodperennial-regex:'^release-.*$'

Both inputs can be used at the same time. This action will merge the perennialbranches given into a single, de-duplicated list.

Skip Single Stacks

If you don't want the stack description to appear on pull requests which are not part of a stack, you can addskip-single-stacks: true to the job.

This skips all pull requests which point to a main or perennial branch and have no children pull requests pointing to it.

-uses:git-town/action@v1with:perennial-branches:|      dev      staging      prodskip-single-stacks:true

License

The scripts and documentation in this project are released under theMIT License.

About

Visualizes your stacked changes when proposing pull requests on GitHub

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript93.2%
  • JavaScript6.8%

[8]ページ先頭

©2009-2025 Movatter.jp