this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/ci: remove debug logging of commit message

The original logging could, at very low risk, have introduced a
potential security issue, as the logging did not disable shell
interpolation of the contents of the commit message. In any case the
logging is not required, so remove it.

We also remove the now-unused workflowDispatch step template.

Signed-off-by: Paul Jolly <paul@myitcv.io>
Change-Id: I4a3b8cfef28356350a2fb72e19ca7b6661244084
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1196926
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

+4 -57
+1 -10
.github/workflows/evict_caches.yml
··· 44 44 Dispatch-Trailer: {"type":"')) 45 45 name: Check we don't have Dispatch-Trailer on a protected branch 46 46 run: |- 47 - echo "github.event.head_commit.message contains Dispatch-Trailer" 48 - echo "github.event.head_commit.message value" 49 - cat <<EOD 50 - ${{ github.event.head_commit.message }} 51 - EOD 52 - echo "containsDispatchTrailer expression" 53 - cat <<EOD 54 - (contains(github.event.head_commit.message, ' 55 - Dispatch-Trailer: {"type":"')) 56 - EOD 47 + echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch" 57 48 false 58 49 - name: Delete caches 59 50 run: |-
+1 -10
.github/workflows/release.yml
··· 51 51 Dispatch-Trailer: {"type":"')) 52 52 name: Check we don't have Dispatch-Trailer on a protected branch 53 53 run: |- 54 - echo "github.event.head_commit.message contains Dispatch-Trailer" 55 - echo "github.event.head_commit.message value" 56 - cat <<EOD 57 - ${{ github.event.head_commit.message }} 58 - EOD 59 - echo "containsDispatchTrailer expression" 60 - cat <<EOD 61 - (contains(github.event.head_commit.message, ' 62 - Dispatch-Trailer: {"type":"')) 63 - EOD 54 + echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch" 64 55 false 65 56 - name: Install Go 66 57 uses: actions/setup-go@v5
+1 -10
.github/workflows/trybot.yml
··· 64 64 Dispatch-Trailer: {"type":"')) 65 65 name: Check we don't have Dispatch-Trailer on a protected branch 66 66 run: |- 67 - echo "github.event.head_commit.message contains Dispatch-Trailer" 68 - echo "github.event.head_commit.message value" 69 - cat <<EOD 70 - ${{ github.event.head_commit.message }} 71 - EOD 72 - echo "containsDispatchTrailer expression" 73 - cat <<EOD 74 - (contains(github.event.head_commit.message, ' 75 - Dispatch-Trailer: {"type":"')) 76 - EOD 67 + echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch" 77 68 false 78 69 - name: Install Go 79 70 uses: actions/setup-go@v5
+1 -27
internal/ci/base/github.cue
··· 91 91 name: "Check we don't have \(dispatchTrailer) on a protected branch" 92 92 if: "\(isProtectedBranch) && \(containsDispatchTrailer)" 93 93 run: """ 94 - echo "\(_dispatchTrailerVariable) contains \(dispatchTrailer)" 95 - echo "\(_dispatchTrailerVariable) value" 96 - cat <<EOD 97 - ${{ \(_dispatchTrailerVariable) }} 98 - EOD 99 - echo "containsDispatchTrailer expression" 100 - cat <<EOD 101 - \(containsDispatchTrailer) 102 - EOD 94 + echo "\(_dispatchTrailerVariable) contains \(dispatchTrailer) but we are on a protected branch" 103 95 false 104 96 """ 105 97 }, ··· 294 286 name: string 295 287 run: #""" 296 288 \#(_curlGitHubAPI) --fail --request POST --data-binary \#(strconv.Quote(encjson.Marshal(#arg))) https://api.github.com/repos/\#(#githubRepositoryPath)/dispatches 297 - """# 298 - } 299 - 300 - workflowDispatch: json.#step & { 301 - #githubRepositoryPath: *githubRepositoryPath | string 302 - #botGitHubUserTokenSecretsKey: *botGitHubUserTokenSecretsKey | string 303 - #workflowID: string 304 - 305 - // params are defined per https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event 306 - #params: *{ 307 - ref: defaultBranch 308 - } | _ 309 - 310 - _curlGitHubAPI: curlGitHubAPI & {#tokenSecretsKey: #botGitHubUserTokenSecretsKey, _} 311 - 312 - name: string 313 - run: #""" 314 - \#(_curlGitHubAPI) --fail --request POST --data-binary \#(strconv.Quote(encjson.Marshal(#params))) https://api.github.com/repos/\#(#githubRepositoryPath)/actions/workflows/\#(#workflowID)/dispatches 315 289 """# 316 290 } 317 291