Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

no need to fetch complete git history

Ivan Kuchina46f498413f3
diff --git a/.github/workflows/rubocop-core.yml b/.github/workflows/rubocop-core.yml
index 6135adfbeff..703be5a67e3 100644
--- a/.github/workflows/rubocop-core.yml
+++ b/.github/workflows/rubocop-core.yml
@@ -9,8 +9,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- with:
- fetch-depth: 0
+ - name: Fetch all commits for PR branch plus head commit of base branch
+ run: |
+ # fetch all commits of the PR branch
+ git fetch --shallow-exclude "${{ github.base_ref }}" origin "${{ github.ref }}"
+ # fix for "fatal: error in object: unshallow"
+ git repack -d
+ # fetch head commit of base branch
+ git fetch --deepen 1 origin "${{ github.ref }}"
- uses: ruby/setup-ruby@v1
- uses: opf/action-rubocop@v2
with: