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

fix fetching enough commits to diff the merge head with the base

Ivan Kuchin4328cc22a437
diff --git a/.github/workflows/rubocop-core.yml b/.github/workflows/rubocop-core.yml
index 4be18e12ccd..59b1ecb0a4c 100644
--- a/.github/workflows/rubocop-core.yml
+++ b/.github/workflows/rubocop-core.yml
@@ -9,14 +9,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - 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 }}"
+ with:
+ fetch-depth: 2 # we are comparing PR merge head with base
- uses: ruby/setup-ruby@v1
- uses: opf/action-rubocop@master
with: