Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Latest commit

 

History

History
75 lines (51 loc) · 3.02 KB

CONTRIBUTING.md

File metadata and controls

75 lines (51 loc) · 3.02 KB

Git Good Practices

Set Your Committer Name & Email

To set your personal infos run the following command, paying attention to use your name and surname and email

git config user.name "John Doe"
git config user.email "john@doe.org"

Some hints here

Commit all your changes in your own branch. Before making any code change, start a new Git branch where all your changes will be made.

Suggestions for commit messages

Read here for some guidelines on writing better commit messages.

WritePoetry Branching Flow

WritePoetry Plugin follows the GitHub flow.

The steps to follow in order to contribute to this project are:

  1. Go to WritePoetry Plugin issues page.
  2. Start a new branch from trunk branch using GitHub's Create a branch from an issue feature. Alternatively, if you don't find an issue to work on, create a branch with a short descriptive name of what you will work on.
  3. Once the feature is ready, ask for a pull request with trunk as the target branch.
  4. After a code review your branch will be megred to trunk branch.

Trunk: is the name of the branch for all development and should always be the target of pull requests.

More info about GitHub flow here.

Coding Standard

Run the following command from the root directory to check the code for "sniffs".

npm run composer run-script check-cs

Run PHP Code Beautifier and Fixer script to automatically correct coding standard violations.

npm run composer run-script fix-cs

If you were unable to install the Docker program, as an alternative, you can install composer the traditional way and run this command to check for "sniffs".

vendor/bin/phpcs -ps

and this command to fix them.

php vendor/bin/phpcbf

Creating a stable release

Contributors who want to make a new release, follow these steps:

  1. Change the plugin version header field in the main plugin file and the Stable tag field in the Header informations of readme.txt file following the WordPress versioning scheme

N.B.: Don't forget to update the changelog with the details of the changes made in the new version.

  1. Add a git tag to the last commit with the same number of the plugin version, like this:
git tag -a 0.2.1 HEAD -m "Release 0.2.1"
  1. To trigger the release GitHub Action run:
git push --tags