Closed NickGreen closed 4 years ago
Update: I've made some progress, and got it running locally by adding a phpcs.xml
file to the root folder, which includes a ruleset with no rules in it. Is that a required file?
Hey @NickGreen :wave:
The usage error you are getting would come up only if the passed input is empty, in this case --token
input provided by GH_BOT_TOKEN
env variable.
Now, the action already has error reporting and checks for when the input secret is not set or empty. There was only one unhandled scenario: the secret input having a leading space. (I checked that at times copying token from GitHub UI can give leading space.) So, the generated command would then look like: --token= ***
which would be interpreted as no value passed to the token
flag.
Thanks for reporting the issue. I have applied a patch for the same and merged it into master
. So, to run your action with this patch, please use the @master
tag instead of the release tag @v2.0.2
:
uses: rtCamp/action-phpcs-code-review@master
Let me know if this fixes your issue. Will do a patch release with this fix then.
adding a phpcs.xml file to the root folder, which includes a ruleset with no rules in it. Is that a required file?
No, phpcs.xml
is not required. The args
you pass in action are sufficient. The action will run phpcs with the passed args.
For more information please refer this.
the secret input having a leading space.
@mrrobot47 That was the problem! I don't know how I missed that leading space when I copy/pasted my token.
To test your fix, I used master
and it ran as I expected it to, so that's great. Thanks so much for looking into this, I'll close it out 🙇
The patch for this issue has been released in the latest version: v2.0.3
.
https://github.com/rtCamp/action-phpcs-code-review/releases/tag/v2.0.3
Hello @mrrobot47 👋 I'm trying to get your action set up on one of our repos, and wondering if you could take a quick look to see if you can spot what I'm doing wrong.
When it runs, I get this failure:
Screenshot: https://d.pr/i/CrPOOn
My workflow is set up like this:
Is there anything that stands out to you as something that isn't set up correctly? I appreciate your time.