Git Hooks Made Easy: How Whisky Helps Developers with Len Woodward

In this episode of the Laravel Creator Spotlight, we are joined by Len Woodward, the creator of Whisky, to talk about the project. Whisky Introduction Whisky is the simplest, framework agnostic, CLI tool for managing and enforcing a php project's git hooks across an entire team. Git hooks are a fantastic tool to ensure that code hitting version control satisfies your org's code quality standards. However, .git/hooks is not included in your git tree. This makes it impractical to have all contributors to a repository use the same checks with the same settings. Whisky Installation Whisky's only dependency is php^8.1. You can install the package via composer: composer require --dev projektgopher/whisky ./vendor/bin/whisky install This is the recommended method, as every developer on your project will have access to the tool. Global Installation Whisky can be installed globally, however this means that any developer on your project will also need it installed globally

Git Hooks Made Easy: How Whisky Helps Developers with Len Woodward


Click the link to join the registration on WhatsApp: https://chat.whatsapp.com/KThkuZlWaTcCu3iJHGBmLM


Click the link to join the registration on WhatsApp: https://chat.whatsapp.com/KThkuZlWaTcCu3iJHGBmLM


Click the link to join the registration on WhatsApp: https://chat.whatsapp.com/KThkuZlWaTcCu3iJHGBmLM

In this episode of the Laravel Creator Spotlight, we are joined by Len Woodward, the creator of Whisky, to talk about the project.

Whisky Introduction

Whisky is the simplest, framework agnostic, CLI tool for managing and enforcing a php project's git hooks across an entire team.

Git hooks are a fantastic tool to ensure that code hitting version control satisfies your org's code quality standards. However, .git/hooks is not included in your git tree. This makes it impractical to have all contributors to a repository use the same checks with the same settings.

Whisky Installation

Whisky's only dependency is php^8.1.

You can install the package via composer:

composer require --dev projektgopher/whisky
./vendor/bin/whisky install

This is the recommended method, as every developer on your project will have access to the tool.

Global Installation

Whisky can be installed globally, however this means that any developer on your project will also need it installed globally if they want to use it.

composer global require projektgopher/whisky
whisky install

If Whisky is installed both globally, and locally, on a project the version that's run will depend on how the command is invoked.

Whisky Usage

The install command will create a whisky.json file in your project root:

// whisky.json
{
  "disabled": [],
  "hooks": {
    "pre-commit": [
      "./vendor/bin/pint --dirty"
    ],
    "pre-push": [
      "php artisan test"
    ]
  }
}

Warning all hooks are evaluated as-is in the terminal. Keep this in mind when committing anything involving changes to your whisky.json.

Adding or removing any hooks (not individual commands) to your whisky.json file should be followed by ./vendor/bin/whisky update to ensure that these changes are reflected in your .git/hooks directory.

Show Links:

You can watch the interview on the Laravel News Youtube channel here or listen in your podcast app of choice.


The post Git Hooks Made Easy: How Whisky Helps Developers with Len Woodward appeared first on Laravel News.

Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow

Keep advertising to get more people

You could reach thousands of more people for every ₦1,000 you spend. https://doacweb.com/advertising

Adverts on doacWeb can be informative, educative or persuasive in nature.

doacWeb Ads is always directed at a broad audience (reaching thousands of people day by day), not few individuals — it deliver your advert to the target audience at the same time. Putting your offer in front of the right people — who have the money and interest in what you sell.

doacWeb Advertising gives you advantage as adverts passes through https://doacweb.com to the internet, reaching millions of people over the internet, and to grow your audience.

Grow your business, Be known, Boost your visibility, Drive engagements, Get new customers and Increase sales.

doacWeb acts as a global advertising media, to let people — individuals — and businesses, to promote and reach more interested people.

Get Started.

WhatsApp: 09031633831

Email: info@doacweb.com
Keep advertising to get more people

You could reach thousands of more people for every ₦1,000 you spend. https://doacweb.com/advertising

Adverts on doacWeb can be informative, educative or persuasive in nature.

doacWeb Ads is always directed at a broad audience (reaching thousands of people day by day), not few individuals — it deliver your advert to the target audience at the same time. Putting your offer in front of the right people — who have the money and interest in what you sell.

doacWeb Advertising gives you advantage as adverts passes through https://doacweb.com to the internet, reaching millions of people over the internet, and to grow your audience.

Grow your business, Be known, Boost your visibility, Drive engagements, Get new customers and Increase sales.

doacWeb acts as a global advertising media, to let people — individuals — and businesses, to promote and reach more interested people.

Get Started.

WhatsApp: 09031633831

Email: info@doacweb.com
Keep advertising to get more people

You could reach thousands of more people for every ₦1,000 you spend. https://doacweb.com/advertising

Adverts on doacWeb can be informative, educative or persuasive in nature.

doacWeb Ads is always directed at a broad audience (reaching thousands of people day by day), not few individuals — it deliver your advert to the target audience at the same time. Putting your offer in front of the right people — who have the money and interest in what you sell.

doacWeb Advertising gives you advantage as adverts passes through https://doacweb.com to the internet, reaching millions of people over the internet, and to grow your audience.

Grow your business, Be known, Boost your visibility, Drive engagements, Get new customers and Increase sales.

doacWeb acts as a global advertising media, to let people — individuals — and businesses, to promote and reach more interested people.

Get Started.

WhatsApp: 09031633831

Email: info@doacweb.com