-
Notifications
You must be signed in to change notification settings - Fork 12
37 lines (33 loc) · 1.31 KB
/
merge_scalasteward_prs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: dependency-bot
on:
workflow_dispatch:
# Allows manually triggering of workflow on a selected branch via the GitHub Actions tab.
# GitHub blog demo: https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/.
# push:
# branches:
# - workflow
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Merge scala-steward PRs
id: msp
run: |
export GITHUB_TOKEN=${{ secrets.BROADBOT_GITHUB_TOKEN }}
git config --global user.email "[email protected]"
git config --global user.name "broadbot"
git fetch
git checkout develop
git checkout -B merged-scala-steward-prs
while IFS= read -r pr
do
echo "Merging $pr"
gh pr checkout $pr
curBranch=`git branch --show-current`
git checkout merged-scala-steward-prs 2>/dev/null || git checkout -b merged-scala-steward-prs
echo "Merging $curBranch"
git merge -m "merging" --allow-unrelated-histories $curBranch
done <<< `gh pr list | grep Broadbot | cut -d$'\t' -f 1`
git push origin merged-scala-steward-prs
gh pr create --title "[No Ticket] Bump dependencies" --body "Consolidate scala-steward PRs"