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

Warning: Unexpected input(s) 'exit_type' #29

Closed
yannickm95 opened this issue Jun 22, 2022 · 8 comments
Closed

Warning: Unexpected input(s) 'exit_type' #29

yannickm95 opened this issue Jun 22, 2022 · 8 comments

Comments

@yannickm95
Copy link
Contributor

yannickm95 commented Jun 22, 2022

Hi! When I try to use v2 of the action which should support exit_type, I get a warning that exit_type is not a supported input of the action.

Warning: Unexpected input(s) 'exit_type', valid inputs are ['labels', 'mode', 'count']

The sha that the workflow shows for the action points to the latest release too 48a61a5cb9f36755e6bfe778fd517022f048ef8f.

name: Pull Request Labels

on:
  pull_request:
    types: [opened, labeled, unlabeled, synchronize]

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: mheap/github-action-required-labels@v2
        with:
          mode: minimum
          count: 1
          labels: "bug, dependencies, docs, feature, refactor, security, testing"
          exit_type: neutral

This is the current workflow setup if that is of any help.

@yannickm95
Copy link
Contributor Author

yannickm95 commented Jun 22, 2022

I don't know much of setting up a github action but could it be that action.yml should also get a new input. I attempted a fix in #30

@tannerbaum
Copy link

@yannickm95 good idea, let's hope that's it. Looks plausible.

@mheap
Copy link
Owner

mheap commented Jun 22, 2022

I definitely missed updating action.yml. Thanks for the PR, and I've just released v2.0.1 which your @v2 line will automatically update to. The error should disappear for any future runs

@yannickm95
Copy link
Contributor Author

Thanks! exit_type is accepted now.

@moritzjacobs
Copy link

The error went away but it still isn't doing what I thought it should...?

Result:

Bildschirmfoto 2022-06-23 um 07 43 46

Run:

Bildschirmfoto 2022-06-23 um 07 43 04

name: Pull Request

on:
  pull_request:
    types: [labeled, ready_for_review, opened, synchronize, reopened]

jobs:
  label:
    runs-on: ubuntu-latest
    needs: [no-draft]
    steps:
      - uses: mheap/github-action-required-labels@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          mode: exactly
          count: 1
          labels: "run-chromatic"
          exit_type: neutral

Thanks for your help @mheap !

@mheap
Copy link
Owner

mheap commented Jun 23, 2022

@moritzjacobs So, neutral is something that used to be a thing but isn't any more. It sets the exit code to be 78 but it was removed (see https://twitter.com/ethomson/status/1163899559279497217)

I guess a way around this is for the action to set an output that can be used in an if condition in later steps. So the exit_type would be success, then steps.your-step.outputs.status would be failure.

@moritzjacobs
Copy link

Ah I see, @mheap thank you for your clarifications!

@mheap
Copy link
Owner

mheap commented Aug 13, 2022

Closing the loop, this was released in #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants