Skip to content

Commit 8fa7d95

Browse files
committed
Make repo-specific checkout methods private
Groovy doesn't actually enforce this restriction, but this helps make clear that checkout_repo() is the intended entrypoint. Signed-off-by: Bence Szépkúti <[email protected]>
1 parent 46efa0c commit 8fa7d95

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

vars/checkout_repo.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ String get_submodule_commit(String working_dir = '.', String submodule) {
8686
).trim()
8787
}
8888

89-
void checkout_framework_repo(BranchInfo info) {
89+
private void checkout_framework_repo(BranchInfo info) {
9090
if (env.TARGET_REPO == 'framework' && env.CHECKOUT_METHOD == 'scm') {
9191
checkout_report_errors(scm)
9292
} else {
@@ -104,7 +104,7 @@ void checkout_framework_repo(BranchInfo info) {
104104
}
105105
}
106106

107-
void checkout_tf_psa_crypto_repo(BranchInfo info) {
107+
private void checkout_tf_psa_crypto_repo(BranchInfo info) {
108108
if (env.TARGET_REPO == 'tf-psa-crypto' && env.CHECKOUT_METHOD == 'scm') {
109109
checkout_report_errors(scm)
110110
if (!info.framework_override) {
@@ -140,7 +140,7 @@ void checkout_tf_psa_crypto_repo(BranchInfo info) {
140140
}
141141
}
142142

143-
Map<String, String> checkout_tls_repo(BranchInfo info) {
143+
private Map<String, String> checkout_tls_repo(BranchInfo info) {
144144
if (info.repo != 'tls') {
145145
throw new IllegalArgumentException("checkout_tls_repo() called with BranchInfo for repo '$info.repo'")
146146
}

vars/gen_jobs.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def gen_coverity_push_jobs(BranchInfo info) {
658658
try {
659659
dir("src") {
660660
deleteDir()
661-
checkout_repo.checkout_tls_repo(info)
661+
checkout_repo.checkout_repo(info)
662662
sshagent([env.GIT_CREDENTIALS_ID]) {
663663
analysis.record_inner_timestamps('container-host', job_name) {
664664
// Git complains about non-fast-forward operations when trying to push a shallow commit

0 commit comments

Comments
 (0)