mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
add GitHub action to add non-main branch to PR title
Add a GitHub action to add the name of the target branch as prefix to the title of a pull request. It is easy to miss the target of a given pull request which has already caused issues of commits going into non-main branches without intention. We have already used this action on the `v2.0.5-rhel` branch with limited success. Fortunately, the upstream implemented our feature request to support adding the _target_ branch name (rather than the source) to the PR title, which is what we need. Any non-main branch from this commit forward will now be clearly marked. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
16
.github/workflows/pr-title.yml
vendored
Normal file
16
.github/workflows/pr-title.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
# Upstream: github.com/tzkhan/pr-update-action
|
||||
|
||||
name: "PR title check"
|
||||
|
||||
on: pull_request_target
|
||||
|
||||
jobs:
|
||||
update_pr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: tzkhan/pr-update-action@v2
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
base-branch-regex: '^(?!master).*$'
|
||||
title-template: '[%basebranch%]'
|
||||
title-prefix-space: true
|
Reference in New Issue
Block a user