-
Notifications
You must be signed in to change notification settings - Fork 69
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
##[error]Found no pull request. #10
Comments
On what triggers are the job run? Make sure that you use:
If that's not possible you can limit the action with a conditional:
|
Is what I have for triggers |
Yes, that won't work. See my comment above. This action can only act on pull requests. |
Why its only for PR? i'm having the same problem |
@lucasteles help me understand what your expected result is. The point of this action is to parse a cobertura report file and then write a comment on a PR with the content. If I’m missing a usecase I would love to know it but it’s hard to guess :) |
@hannseman Hi, Now I saw how it works, the action puts a comment on PR, I didn't get it when i commented Would be possible to add a note on workflow annotation? |
running this action on triggers different than pull request will be possible once this is merged #20 |
And if you want to have the PR number in a - name: Find a pull request containing this commit
uses: octokit/[email protected]
id: get_pr
with:
route: GET /search/issues?q=${{ github.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set PR number
run: |
pr_number=${{ fromJson(steps.get_pr.outputs.data).items[0].number }}
echo "PR_NUMBER=${pr_number}" >> $GITHUB_ENV
...
- name: Post coverage report as comment
uses: 5monkeys/cobertura-action@master
with:
...
pull_request_number: ${{ env.PR_NUMBER }} It's not perfect but it gets the job done. |
You can use:
which makes finding Pull request and setting PR number obsolete. Based on this answer. |
This only applies if you are using |
|
We got this working by using workflow triggered on push and PR but only running action on PR.
it seem extraneous to specify |
This should now be fixed by #50 |
Gives me the error:
(It's a pull request and not a fork)
The text was updated successfully, but these errors were encountered: