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

Change from using master branch to the 2.3.0 tag #34

Merged
merged 2 commits into from
Aug 23, 2023
Merged

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Aug 18, 2023

Description of the Change

The WordPress Coding Standards repo has removed the use of the master branch and have gone with main branch instead. This repo has a call to clone the master 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

Fixed - Clone the 2.3.0 tagged branch of the WordPress Coding Standards

Credits

Props @dkotter

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@dkotter dkotter requested a review from a team as a code owner August 18, 2023 15:16
@dkotter dkotter self-assigned this Aug 18, 2023
@dkotter dkotter requested review from iamdharmesh and removed request for a team August 18, 2023 15:16
@GaryJones
Copy link

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.

@dkotter dkotter changed the title Change from using master branch to main branch Change from using master branch to the 2.3.0 tag Aug 18, 2023
@dkotter
Copy link
Collaborator Author

dkotter commented Aug 18, 2023

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.

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.

Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @dkotter.

@iamdharmesh iamdharmesh merged commit d6f6bdc into develop Aug 23, 2023
@iamdharmesh iamdharmesh deleted the fix/33 branch August 23, 2023 09:35
@GaryJones
Copy link

For WordPressCS 3.0, installation via Composer is the only supported method. Is there any reason why git clones are used here?

@dkotter
Copy link
Collaborator Author

dkotter commented Aug 23, 2023

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

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

Successfully merging this pull request may close these issues.

WordPress Coding Standards have changed from master to main branch naming
4 participants