oliverdavies.uk/content/node.d3e4d075-4050-46af-bfd3-94944eaae35b.yml

80 lines
3.2 KiB
YAML

uuid:
- value: d3e4d075-4050-46af-bfd3-94944eaae35b
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T09:00:18+00:00'
revision_uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
revision_log: { }
status:
- value: true
uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
title:
- value: 'Git hooks - yay or nay?'
created:
- value: '2024-03-21T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:18+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2024/03/21/git-hooks---yay-or-nay
langcode: en
body:
- value: |
<p>Many people are very for or against Git hooks - scripts that run automatically on events such as pre-commit and pre-push.</p>
<p>Commonly, they are used for running tasks such as altering a commit message or running before committing automated tests and static analysis before pushing a commit.</p>
<p>I'm on the fence.</p>
<p>I've used them and added support for them to Build Configs, but I don't feel strongly about them.</p>
<p>They are awkward to set up (you need to edit the configuration for them to work) and can be easily disabled or bypassed.</p>
<p>Some people think it's the Developer's responsibility to run the tasks before pushing changes or that they'll be run in a CI pipeline, so why would they need to be run locally?</p>
<p>As I write many small commits and push changes regularly, I can find hooks irritating and prefer to use watchers instead with tools like <code>watchexec</code> and <code>entr</code>.</p>
<p>There are also tools like Captain Hook that are built to manage Git hooks. Maybe, I should investigate it more.</p>
<p>What do you think? Are you yay or nay for Git hooks?</p>
format: full_html
processed: |
<p>Many people are very for or against Git hooks - scripts that run automatically on events such as pre-commit and pre-push.</p>
<p>Commonly, they are used for running tasks such as altering a commit message or running before committing automated tests and static analysis before pushing a commit.</p>
<p>I'm on the fence.</p>
<p>I've used them and added support for them to Build Configs, but I don't feel strongly about them.</p>
<p>They are awkward to set up (you need to edit the configuration for them to work) and can be easily disabled or bypassed.</p>
<p>Some people think it's the Developer's responsibility to run the tasks before pushing changes or that they'll be run in a CI pipeline, so why would they need to be run locally?</p>
<p>As I write many small commits and push changes regularly, I can find hooks irritating and prefer to use watchers instead with tools like <code>watchexec</code> and <code>entr</code>.</p>
<p>There are also tools like Captain Hook that are built to manage Git hooks. Maybe, I should investigate it more.</p>
<p>What do you think? Are you yay or nay for Git hooks?</p>
summary: null
field_daily_email_cta: { }