-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rugged 1.7.1 breaks gem #447
Comments
If you're here because you're seeing a Github Action failing with this error, you can pin your version of rugged to 1.6.3 by updating the Github Actions Integration example code as follows:
|
Is there a repository which can reproduce this? I have a fix in mind, but won't know if it works without reproducing it... |
I have reproduced it in a pet project of mine: gcp-sargeras/gcp-sargeras.com#32 |
@cooljacob204 it's not failing for me:
Do you know what I'm missing here? |
@ashkulz I have been only able to reproduce it in a GitHub action, I also haven't been able to hit the error locally. |
This is happening because Simple fix is to do this: patches = @repo.diff(merge_base, head, options || {}) https://github.com/prontolabs/pronto/blob/v0.11.2/lib/pronto/cli.rb#L70 |
And I think this is happening on that PR because the only file is a new file. |
@cooljacob204 can you try removing that - uses: actions/checkout@v4
with:
fetch-depth: 0 |
@pbstriker38 I had the same fix in mind (it's obvious) but wasn't sure this would be all. Let me try and see if the information you gave can help reproduce it. |
Other option is to fail early if there is no file |
No error with this version of the checkout step. |
@cooljacob204 https://github.com/prontolabs/pronto#github-actions-integration I'm not sure why that fetch would even be necessary given that @ashkulz name: Pronto
on: [pull_request]
jobs:
pronto:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ruby
uses: ruby/setup-ruby@v1
- name: Setup pronto
run: gem install pronto pronto-rubocop
- name: Run Pronto
env:
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
PRONTO_GITHUB_ACCESS_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: pronto run -f github_status github_pr_review -c origin/${{ github.base_ref }} |
Yup. |
Is there any reason not to make this one line change? As someone who's impacted by this, it would be nice to be able to use Pronto alongside a less deep checkout. |
This addresses Issue prontolabs#447
In fact here's a PR with that fix, if it is indeed useful #459 |
That does not fix the whole problem, actually. Seems there's a breaking change in how shallow grafts are handled- in |
@X-sam thanks for the investigation, but I'm not comfortable with making changes without being able to at least reproduce what's going on. How were you able to determine the issue in the grafts? Do you have a standalone reproduction? |
@ashkulz If you look at the issue I've opened on rugged, there's a very brief set of steps to reproduce. Clone a shallow repo at |
Is it possible to merge the PR associated? #459 |
@jeantristan see this comment from the PR author @X-sam -- it seems to be a bug in rugged itself. |
Rugged update 1.7.1 which came out yesterday breaks the gem.
I'm using it in a github action.
Github action workflow:
Fixed by pinning rugged to 1.6.3. Action runs with ruby 3.1.4 which is specified in our .ruby-version.
The text was updated successfully, but these errors were encountered: