Github Action

[Note] Merge error in …

前言 使用 Github Action 來執行 git merge 指令時,出現如下錯誤: fatal: refusing to merge unrelated histories Solution 原因出在 actions/checkout@v2 的 fetch-depth v2 的 fetch-depth 預設為 1 需要設為 0 或將 --unshallow 新增至 fetch 指令 git fetch --unshallow My Github Action name: Merge branch on: issues: types: - closed jobs: …