aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-10-25 11:30:21 +0100
committerValentin Rothberg <rothberg@redhat.com>2020-10-25 11:34:37 +0100
commitb26a1085cd291de25950cfe6f5221d7499d7669a (patch)
tree3a49ce6f6cdc2c0e54422fd5d3800f12b6d97929
parent6fa6470d24231dccafbf4396e7cb798a906af522 (diff)
downloadpodman-b26a1085cd291de25950cfe6f5221d7499d7669a.tar.gz
podman-b26a1085cd291de25950cfe6f5221d7499d7669a.tar.bz2
podman-b26a1085cd291de25950cfe6f5221d7499d7669a.zip
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>
-rw-r--r--.github/workflows/pr-title.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml
new file mode 100644
index 000000000..0709fb5f0
--- /dev/null
+++ b/.github/workflows/pr-title.yml
@@ -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