action-validator icon indicating copy to clipboard operation
action-validator copied to clipboard

Doesn't detect missing needs

Open bytesnz opened this issue 4 months ago • 2 comments

A slightly more complicated one, but it would be good if it could detect missing needs from needs context use. You could also do the same for the steps context

name: cyclic-test
on:
  pull: {}
jobs:
  test:
    runs-on: ubuntu-latest
    outputs:
      test: ${{ steps.step1.test }}
    steps:
      - id: step1
        run: echo test=hello >> "$GITHUB_OUTPUT"
  test1:
    runs-on: ubuntu-latest
    outputs:
      # step missing
      test: ${{ steps.step1.test }}
    steps:
      # need missing
      - run: echo ${{ needs.test.outputs.test }}

bytesnz avatar Aug 11 '25 23:08 bytesnz

Yeah, that one sounds significantly more complicated, as (if I'm understanding the use-case correctly) doing this requires parsing and understanding the content of expressions? If I've got the right end of the stick there, it'd almost certainly be blocked on at least a minimal implementation of #22.

mpalmer avatar Aug 13 '25 00:08 mpalmer

Yes, you thinking is correct, so yeah, it would be a lot more complicated and yes, would need #22

bytesnz avatar Aug 13 '25 07:08 bytesnz