python icon indicating copy to clipboard operation
python copied to clipboard

I get an error with no error message

Open TurnrDev opened this issue 4 years ago • 3 comments

Using danger-python-0.1.0 and [email protected] in CLI I get the following error:

(env) [jay@jay-arch DiscordBot]$ danger-python pr https://github.com/TrainerDex/DiscordBot/pull/25 Starting Danger PR on TrainerDex/DiscordBot#25 You don't have a DANGER_GITHUB_API_TOKEN set up, this is optional, but TBH, you want to do this Check out: http://danger.systems/js/guides/the_dangerfile.html#working-on-your-dangerfile Usage: danger-python run [OPTIONS] Try 'danger-python run --help' for help.

Error: no such option: -p

Danger: ⅹ Failing the build, there is 1 fail.

Failures

danger-python failed.

Markdowns

Log


I get the same issue in the GitHub action

TurnrDev avatar Aug 22 '20 16:08 TurnrDev

Still the same. It IS the error message: Error: no such option: -p. Coming from https://github.com/danger/python/blob/master/danger_python/shell.py#L30

But TBH when I first saw this repo, I was super excited... but when I looked in the code what do I see? That this just calls danger JS... SO what's the point?...

okainov avatar Apr 12 '21 14:04 okainov

You can write your rules, and libraries in python - https://danger.systems/js/usage/danger-process.html

orta avatar Apr 12 '21 17:04 orta

Hey! Any example how to get danger-python working? I got same error as above and can't figure it out. My GH actions example:

jobs:
  run-danger:
    name: "Run danger"
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v3
      - name: Run command
        env:
          GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
        run: |
            npm install -g danger
            pip install danger-python
            danger-python ci

I got either Error: no such option: -p or Could not add a commit status, the GitHub token for Danger does not have access rights. even though it really creates a (blank) comment. Token is correct as with js danger everything works well. Thanks!

marekargalas avatar Sep 06 '22 07:09 marekargalas