Closed dkotter closed 1 year ago
Since WordPressCS 3.0 is about to be released, which may break the workflow, it may be worth making the checkout to use 2.3.0
, and then intentionally test the 3.0.0
WordPressCS release, and release that as a new version of this action.
Since WordPressCS 3.0 is about to be released, which may break the workflow, it may be worth making the checkout to use
2.3.0
, and then intentionally test the3.0.0
WordPressCS release, and release that as a new version of this action.
That's a good point and I've made that change now. I think the only downside to this is now anyone using this action won't automatically get the latest changes to the WPCS library as it's fixed to a specific version. But does mean we don't have to worry about failures like this happening in the future.
My thought is once 3.0.0 is released, at the very least we update to pull in that version (and fix any issues that may occur) but maybe also consider going back to cloning the main
branch, which would mean any project using this will get the latest updates when this tool is run.
For WordPressCS 3.0, installation via Composer is the only supported method. Is there any reason why git clones are used here?
For WordPressCS 3.0, installation via Composer is the only supported method. Is there any reason why git clones are used here?
I don't know the historical reason why this is done the way it's done but we can definitely look to update this once we fully support 3.0
Description of the Change
The WordPress Coding Standards repo has removed the use of the
master
branch and have gone withmain
branch instead. This repo has a call to clone themaster
branch, which is currently failing. This PR fixes that by switching to use the latest tagged release, 2.3.0.Once version 3.0.0 of WPCS is released, we should test that version with this tool to ensure everything works. If so, we should either switch to that tag or switch to using the
main
branch (which allows us to ensure the latest version is always pulled in).Closes #33
How to test the Change
Locally, run the following line to see the error:
git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git ~/wpcs
Then run the new line to ensure it works:
git clone --depth 1 -b 2.3.0 https://github.com/WordPress/WordPress-Coding-Standards.git ~/wpcs
Changelog Entry
Credits
Props @dkotter
Checklist: