Skip to content

Commit 16ca898

Browse files
ruspl-afedlaeubi
authored andcommitted
Allow to configure branch for "Automatic Code Cleanups"
Currently `master` branch is hardcoded and it is not possible to apply this very useful workflow to a repositories where branches are named differently. This change adds `branch` configuration parameter
1 parent 5aef6ff commit 16ca898

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/cleanCode.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
###############################################################################
2+
# Copyright (c) 2025 Contributors to Eclipse Foundation
3+
#
4+
# This program and the accompanying materials are made available under the
5+
# terms of the Eclipse Public License 2.0 which is available at
6+
# https://www.eclipse.org/legal/epl-2.0/.
7+
#
8+
# SPDX-License-Identifier: EPL-2.0
9+
#
10+
# Contributors:
11+
# see git history
12+
###############################################################################
113
name: Automatic Code Cleanups
214
on:
315
workflow_call:
@@ -26,6 +38,11 @@ on:
2638
required: false
2739
default: false
2840
type: boolean
41+
branch:
42+
description: 'The branch to clean'
43+
type: string
44+
required: false
45+
default: 'master'
2946
submodules:
3047
description: |
3148
Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules.
@@ -53,7 +70,7 @@ jobs:
5370
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5471
with:
5572
fetch-depth: 0
56-
ref: master
73+
ref: ${{ inputs.branch }}
5774
submodules: ${{ inputs.submodules }}
5875
- name: List all bundles
5976
id: list-bundles

0 commit comments

Comments
 (0)