Skip to content
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

Pronto errored: Pull request for sha SHA_HERE with id PULL_REQUEST_ID_HERE was not found. #418

Open
dmoroka opened this issue Jan 24, 2022 · 3 comments

Comments

@dmoroka
Copy link

dmoroka commented Jan 24, 2022

I tried to run sample configuration for adding comment for pull request. I have created personal access token with scope of "repo" to post comments for pull request on behalf of certain account and also added this token to secrets. I`m using pronto (0.10.0), pronto-rubocop (0.10.0)

This is my configuration

name: Pronto
on: [pull_request]

jobs:
  pronto:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - run: |
          git fetch --no-tags --prune --depth=10 origin +refs/heads/*:refs/remotes/origin/*

      - name: Setup Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.5.7
          bundler-cache: true

      - name: Run Pronto
        run: bundle exec pronto run -f github_pr -c origin/${{ github.base_ref }}
        env:
          PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
          PRONTO_GITHUB_ACCESS_TOKEN: "${{ secrets.MY_TOKEN_HERE }}"

when I ran this configuration on github actions , I got the following error

Run bundle exec pronto run -f github_pr -c origin/development
  bundle exec pronto run -f github_pr -c origin/development
  shell: /usr/bin/bash -e {0}
  env:
    PRONTO_PULL_REQUEST_ID: PULL_REQUEST_ID_HERE
    PRONTO_GITHUB_ACCESS_TOKEN: ***
An error occurred while Rails/UniqueValidationWithoutIndex cop was inspecting app/models/test_model.rb:11:2.
To see the complete backtrace run rubocop -d.
An error occurred while Rails/UniqueValidationWithoutIndex cop was inspecting app/models/test_model.rb:12:2.
To see the complete backtrace run rubocop -d.
WARNING: Unexpected middleware set after the adapter. This won't be supported from Faraday 1.0.
Pronto errored: Pull request for sha 1231231231231231231231231231231231231 with id 1234 was not found.

If I check this 1231231231231231231231231231231231231 SHA in repo it shows the following message "This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository."

Could you please help to solve this kind of issue?

@niltonvasques
Copy link

same issue here with pronto version 0.11

@niltonvasques
Copy link

@dmoroka I figured out the problem. Try to set the variable PRONTO_GITHUB_SLUG: {user}/{repo}

@niltonvasques
Copy link

The problem happened again, and this time was caused by octockit. I was forced to downgrade to 4.21.0.

Reference: octokit/octokit.rb#1389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants