Skip to content

Commit e2a9595

Browse files
author
openshift-pipelines-bot
committed
[bot:next] update konflux configuration
1 parent 666879b commit e2a9595

File tree

2 files changed

+12
-34
lines changed

2 files changed

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

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

79
jobs:
8-
auto-approve-and-merge:
10+
auto-approve:
911
runs-on: ubuntu-latest
1012
permissions:
1113
pull-requests: write
1214
steps:
13-
- id: Checkout the current repo
14-
uses: actions/checkout@v5
15-
- id: list-prs
15+
- name: Checkout the current repo
16+
uses: actions/checkout@v4
17+
- name: auto-merge-upstream-operator
1618
run: |
17-
echo "Listing PRs"
1819
gh auth status
1920
git config user.name openshift-pipelines-bot
2021
git config user.email [email protected]
2122
# Approve and merge pull-request with no reviews
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"
23+
for p in $(gh pr list --search "head:actions/update/sources-operator" --json "number" | jq ".[].number"); do
4824
gh pr merge --rebase --delete-branch --auto $p
4925
done
5026
env:
51-
pr_list: ${{ steps.list-prs.outputs.pr_list }}
5227
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}
28+

.github/workflows/update-sources.yaml

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

68
jobs:
79

0 commit comments

Comments
 (0)