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

[Question]: How to use this action with POST /repos/{owner}/{repo}/check-runs #291

Closed
1 task done
mostlycloudysky opened this issue Jan 20, 2024 · 4 comments
Closed
1 task done
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs

Comments

@mostlycloudysky
Copy link

What happened?

I have gone through the readme example and it looks like, check API does not work directly with the special GitHub Action Secret and it needs to be done through Github APP integration. Could you please clarify ?

jobs:
  create-file:
    runs-on: ubuntu-latest
    steps:
      # Create check run
      - uses: octokit/request-action@v2.x
        id: create_check_run
        with:
          route: POST /repos/{owner}/{repo}/check-runs
          owner: octokit
          repo: request-action
          name: "Test check run"
          head_sha: ${{ github.sha }}
          output: | # The | is significant!
            title: Test check run title
            summary: A summary of the test check run
            images:
              - alt: Test image
                image_url: https://octodex.github.com/images/jetpacktocat.png
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Versions

request-action@v2.x

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mostlycloudysky mostlycloudysky added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jan 20, 2024
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@mostlycloudysky mostlycloudysky changed the title [BUG]: Does this action support checks API [BUG]: Does this action support check API Jan 20, 2024
@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Jan 22, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jan 22, 2024
@chipairon
Copy link

If it helps someone, I managed to use the "checks" API providing a Github APP token as hinted by the OP using https://github.com/tibdex/github-app-token

@gr2m
Copy link
Contributor

gr2m commented Jun 12, 2024

We recommend using https://github.com/actions/create-github-app-token, but either action will work 👍

So octokit/request-action itself works, but it might fail due to limited permissions. Try to add checks: write, see https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#defining-access-for-the-github_token-scopes

@gr2m gr2m added Type: Support Any questions, information, or general needs around the SDK or GitHub APIs and removed Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented labels Jun 12, 2024
@gr2m gr2m changed the title [BUG]: Does this action support check API [Question]: How to use this action with POST /repos/{owner}/{repo}/check-runs Jun 12, 2024
@gr2m
Copy link
Contributor

gr2m commented Jun 12, 2024

I'm going to close the issue since there is nothing actionable for the @octokit team to do, but feel free to ask follow up questions

@gr2m gr2m closed this as completed Jun 12, 2024
@github-project-automation github-project-automation bot moved this from 🔥 Backlog to ✅ Done in 🧰 Octokit Active Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs
Projects
Archived in project
Development

No branches or pull requests

4 participants