Cb-tumblebug: Update Swagger doc workflow is not working appropriately

Created on 1 Nov 2021  Β·  11Comments  Β·  Source: cloud-barista/cb-tumblebug

What happened
Update Swagger doc workflow is not working appropriately

Anything else we need to know?

https://github.com/cloud-barista/cb-tumblebug/runs/4064628789?check_suite_focus=true

Run stefanzweifel/git-auto-commit-action@v4
Started: bash /home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/entrypoint.sh
INPUT_REPOSITORY value: .
INPUT_STATUS_OPTIONS: 
INPUT_BRANCH value: 
From https://github.com/cloud-barista/cb-tumblebug
 * [new branch]      release-0.3.0 -> origin/release-0.3.0
 * [new branch]      release-0.4.0 -> origin/release-0.4.0
 * [new tag]         v0.4.0        -> v0.4.0
M   src/api/rest/docs/docs.go
Your branch is up to date with 'origin/main'.
INPUT_ADD_OPTIONS: 
INPUT_FILE_PATTERN: src/api/rest/docs/**
INPUT_COMMIT_OPTIONS: 
INPUT_COMMIT_USER_NAME: GitHub Actions
INPUT_COMMIT_USER_EMAIL: [email protected]
INPUT_COMMIT_MESSAGE: Update Swagger docs
INPUT_COMMIT_AUTHOR: seokho-son <[email protected]>
[main ea709ea] Update Swagger docs
 Author: seokho-son <[email protected]>
 1 file changed, 11 insertions(+), 5 deletions(-)
INPUT_TAGGING_MESSAGE: 
No tagging message supplied. No tag will be added.
INPUT_PUSH_OPTIONS: 
remote: error: GH006: Protected branch update failed for refs/heads/main.        
remote: error: At least 1 approving review is required by reviewers with write access.        
To https://github.com/cloud-barista/cb-tumblebug
 ! [remote rejected] main -> main (protected branch hook declined)
error: failed to push some refs to 'https://github.com/cloud-barista/cb-tumblebug'
Error: Invalid status code: 1
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  code: 1
}
Error: Invalid status code: 1
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

It seems the workflow cannot push commit since remote: error: At least 1 approving review is required by reviewers with write access.

bug help wanted

Most helpful comment

μ•„λž˜μ™€ 같이 force-push도 κ°€λŠ₯ν•œκ²ƒ κ°™κΈ΄ν•œλ°μš”. 저도 3번이 μ•ˆμ „ν•œκ²ƒ κ°™μŠ΅λ‹ˆλ‹€ ^^

Ref: https://github.com/stefanzweifel/git-auto-commit-action

      - name: Commit generated Swagger docs
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          file_pattern: src/api/rest/docs/**
          commit_message: Update Swagger docs
+         push_optinos: '--force'          

All 11 comments

Ref the initial contribution : PR #804

/help

[μ•ˆ]

  1. approve μ•‘μ…˜μ„ ν˜„μž¬ workflow YAML 에 μΆ”κ°€ν•˜κ±°λ‚˜
  2. main λΈŒλžœμΉ˜κ°€ ν˜„μž¬ Protected branch 인데, 이λ₯Ό ν•΄μ œν•˜κ±°λ‚˜ (쑰건 μ™„ν™”)
  3. workflowκ°€ ν˜„μž¬ 'push a commit' ν•˜λ„λ‘ λ˜μ–΄ μžˆλŠ”λ°, 이λ₯Ό 'open a PR' ν•˜λ„λ‘ λ³€κ²½ (πŸ€”)

@jihoon-seo
1번이 일단 κ°€μž₯ μ‰¬μš΄ μˆ˜μ • ν˜•νƒœμΌκΉŒμš”?

μ €λŠ”.. γ…Žγ…Ž 3번이 μ’‹κΈ΄ ν•˜λ„€μš”.. 쑰금 더 μ•ˆμ‹¬ν•  수 μžˆμ–΄μš”.. γ…Žγ…Ž

μ•„λž˜μ™€ 같이 force-push도 κ°€λŠ₯ν•œκ²ƒ κ°™κΈ΄ν•œλ°μš”. 저도 3번이 μ•ˆμ „ν•œκ²ƒ κ°™μŠ΅λ‹ˆλ‹€ ^^

Ref: https://github.com/stefanzweifel/git-auto-commit-action

      - name: Commit generated Swagger docs
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          file_pattern: src/api/rest/docs/**
          commit_message: Update Swagger docs
+         push_optinos: '--force'          

@hermitkim1 μ•„λ§ˆ --force λŠ” 리뷰어 승인 없이도 κ°•μ œ ν‘Έμ‹œν•œλ‹€λŠ” μ˜λ―ΈλŠ” μ•„λ‹κ±°μ˜ˆμš”.
저건 μ•„λ§ˆλ„.. 음... baseκ°€ λ‹€λ₯Έ ν˜•νƒœμΈ 경우 force push ν•΄μ£ΌλŠ” 그것..

그럼.. 3번.. 으둜 μˆ˜μ •ν•΄λ³΄μ‹œμ£ ~!
@hermitkim1 @jihoon-seo ν˜Ήμ‹œ ~ μ‰½κ²Œ μˆ˜μ • κ°€λŠ₯ν•˜μ‹ κ°€μš”? μ•„λ‹˜ contribution inviteκ°€ ν•„μš”ν• κΉŒμš©?

일단~ 였λ₯˜ λ°©μ§€λ₯Ό μœ„ν•΄μ„œ workflowλŠ” disable ν•΄λ‘μ—ˆμŠ΅λ‹ˆλ‹€.
그리고 forked λ¦¬ν¬μ—μ„œλ„ μ—¬μ „νžˆ λ™μž‘μ„ μ‹œλ„ν•˜λŠ” λ“― ν•˜λ„€μš”?

@seokho-son, ν˜Ήμ‹œ forked repository > Settings > Actions > General > Actions permissions 의 μ„€μ • κ°’(Allow local actions only)을 μ•Œ 수 μžˆμ„μ§€μš”? ^^

일단~ 였λ₯˜ λ°©μ§€λ₯Ό μœ„ν•΄μ„œ workflowλŠ” disable ν•΄λ‘μ—ˆμŠ΅λ‹ˆλ‹€. 그리고 forked λ¦¬ν¬μ—μ„œλ„ μ—¬μ „νžˆ λ™μž‘μ„ μ‹œλ„ν•˜λŠ” λ“― ν•˜λ„€μš”?

@hermitkim1 μ œκ°€ Allow select actions 으둜 μ˜€ν”Όμ…œ μ•‘μ…˜λ“€λ§Œ μ‚¬μš©ν•˜κ²Œ ν•˜κ³  μžˆμ—ˆμ–΄μš” γ…Žγ…Ž (μ™œκ·Έλž¬μ„κΉŒμš”)

stefanzweifel/git-auto-commit-action@v4 μš”κ±° μΆ”κ°€ν•˜μ—¬ μ²˜λ¦¬ν•˜μ˜€μŠ΅λ‹ˆλ‹Ή.

/assign @jihoon-seo

@seokho-son

그럼.. 3번.. 으둜 μˆ˜μ •ν•΄λ³΄μ‹œμ£ ~!
@hermitkim1 @jihoon-seo ν˜Ήμ‹œ ~ μ‰½κ²Œ μˆ˜μ • κ°€λŠ₯ν•˜μ‹ κ°€μš”? μ•„λ‹˜ contribution inviteκ°€ ν•„μš”ν• κΉŒμš©?

μ œκ°€ ν•΄ λ³Όκ²Œμš” 😊

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seokho-son picture seokho-son  Β·  5Comments

jihoon-seo picture jihoon-seo  Β·  6Comments

jihoon-seo picture jihoon-seo  Β·  4Comments

seokho-son picture seokho-son  Β·  3Comments

seokho-son picture seokho-son  Β·  3Comments