Skip to content

Commit ffe2cd4

Browse files
openshift-pipelines-botpramodbindal
authored andcommitted
[bot:release-v1.22.x] update konflux configuration
1 parent 47bcff3 commit ffe2cd4

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed

.github/workflows/auto-merge-upstream.yaml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,52 @@
11
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2-
name: auto-merge-upstream-tektoncd-git-clone
2+
name: auto-merge-upstream
33

44
on:
55
workflow_dispatch: {}
6-
schedule:
7-
- cron: "*/30 * * * *" # At every 30 minutes
86

97
jobs:
10-
auto-approve:
8+
auto-approve-and-merge:
119
runs-on: ubuntu-latest
1210
permissions:
1311
pull-requests: write
1412
steps:
1513
- name: Checkout the current repo
16-
uses: actions/checkout@v4
17-
- name: auto-merge-upstream-tektoncd-git-clone
14+
uses: actions/checkout@v5
15+
- id: list-prs
1816
run: |
17+
echo "Listing PRs"
1918
gh auth status
2019
git config user.name openshift-pipelines-bot
2120
git config user.email [email protected]
2221
# Approve and merge pull-request with no reviews
23-
for p in $(gh pr list --search "head:actions/update/sources-tektoncd-git-clone" --json "number" | jq ".[].number"); do
22+
23+
pr_list=$(gh pr list \
24+
--state open \
25+
--label upstream \
26+
--json number,title,statusCheckRollup \
27+
--jq ' .[]| select((.statusCheckRollup // [])| all(.conclusion == "SUCCESS" or .conclusion == "SKIPPED"))| "\(.number)"')
28+
29+
echo "pr_list=$pr_list" >> "$GITHUB_OUTPUT"
30+
env:
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- id: add LGTM Label
34+
run: |
35+
# Approve and merge pull-request with no reviews
36+
for p in $pr_list; do
37+
echo "Adding lgtm label to PR $p"
38+
gh pr edit $p --add-label "lgtm" || true
39+
done
40+
env:
41+
pr_list: ${{ steps.list-prs.outputs.pr_list }}
42+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
- id: Merging PRs
44+
run: |
45+
# Approve and merge pull-request with no reviews
46+
for p in $pr_list; do
47+
echo "Merging PR $p"
2448
gh pr merge --rebase --delete-branch --auto $p
2549
done
2650
env:
51+
pr_list: ${{ steps.list-prs.outputs.pr_list }}
2752
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}
28-

.github/workflows/update-sources.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2-
name: update-sources-tektoncd-git-clone
2+
name: update-sources
33
on:
44
workflow_dispatch: {}
5-
schedule:
6-
- cron: "0 23 * * *" # At 23:00 everyday
75

86
jobs:
97

0 commit comments

Comments
 (0)