danger / danger-js

⚠️ Stop saying "you forgot to …" in code review
http://danger.systems/js/
MIT License
5.22k stars 363 forks source link

[BUG] #1454

Open sayali10 opened 1 month ago

sayali10 commented 1 month ago

Describe the bug

When we run danger from Git Actions workflow, danger shows below message for every run

Note: Running Danger on with generalised GitHub Actions support, this does not include `danger.github.pr`.
      If you expected a PR run, change your workflow's 'on' to be pull_request.

danger.github.pr is available for pull_request_target. Despite of that we keep seeing this message for every run.

This behavior was introduced with this change..

To Reproduce Steps to reproduce the behavior:

  1. Open PR with following Git Actions workflow config
    name: PR Checks
    on:
    pull_request_target:
    types: [opened, reopened, synchronize, ready_for_review]
  2. Run Danger check
  3. It will log this message every time
    Note: Running Danger on with generalised GitHub Actions support, this does not include `danger.github.pr`.
      If you expected a PR run, change your workflow's 'on' to be pull_request.

Expected behavior danger.github.pr is available for pull_request_target so Danger should not show this message.

Screenshots

Screenshot 2024-06-04 at 2 49 19 PM

Your Environment

software version
danger.js 12.3.0
node 18.17.0

Additional context

Fix: https://github.com/danger/danger-js/pull/1453