cocogitto / cocogitto-bot

A pedantic conventional commit github bot powered by cocogitto
3 stars 1 forks source link

[BUG] Status check not triggering #6

Closed andrejohansson closed 7 months ago

andrejohansson commented 2 years ago

Describe the bug I might be missing something, but what is required for the status to be reported?

image

To Reproduce

  1. Install bot in settings ui: https://github.com/apps/cocogitto-bot
  2. add cocogitto check to workflow: https://docs.cocogitto.io/ci_cd/#conventional-commits-check
  3. protect branch and set status required: image

Expected behavior Expected status to be reported to the PR. But it just waits indefinitely.

oknozor commented 2 years ago

Hello @andrejohansson,, I am not able to reproduce : image

Maybe you just did a PR during a deployment and your status check was not reported. Does this still happen if you push a new commit to your pull request ? If so I will need a more info : the repository address, is it public?

andrejohansson commented 2 years ago

I tried pushing a new commit today, and the bot comments the PR almost immediately:

image

but still the "checks" section says it´s waiting for info.

Could it be something with that the action is building on multiple targets (mac, win, linux) but only executes cocogitto on ubuntu?

My build file looks like this:

name: "test-on-pr"
on: [pull_request]

jobs:
  test-tauri:
    strategy:
      fail-fast: false
      matrix:
        platform: [macos-latest, ubuntu-latest, windows-latest]

    runs-on: ${{ matrix.platform }}
    steps:
    # cancel all runs on the same branch except the latest
    - uses: styfle/cancel-workflow-action@0.9.1
      with:
        all_but_latest: true
        access_token: ${{ github.token }}

    # checkout with depth 0 for cocogitto
    - uses: actions/checkout@main
      with:
        fetch-depth: 0

    # check that commits follow conventional commit standard
    - name: Conventional commits check (ubuntu-only)
      if: matrix.platform == 'ubuntu-latest'
      uses: oknozor/cocogitto-action@v2

    # install prerequisites
    - name: setup node
      uses: actions/setup-node@v1
      with:
        node-version: 16

... and so on

When ubuntu-latest runs I can confirm that cocogitto is executed:

image

But nowhere i see something about any status being reported.

oknozor commented 2 years ago

Status check is not related to the github action at all. They are made via the github-bot calling the github status check endpoint.

Maybe your repository is private ?

andrejohansson commented 2 years ago

Yes, its a private repository. But the bot have gotten permissions and since the bot is actually commenting the PR, I would think that it worked?

image

oknozor commented 7 months ago

this is now working