Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
D
Developer Documentation
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 74
    • Issues 74
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Documentation
  • Docs
  • Developer Documentation
  • Issues
  • #660

Closed
Open
Opened Aug 15, 2019 by MikeyMJCO@MikeyMJCOOwner

Document criteria for adding a hook

Created by: eileenmcnaughton

We discussed this on PR review & had some rules of thumb

  • we only add hooks when input & output is clear
  • we don't add hooks in the middle of toxic code
  • we don't add hooks to fix in an extension what should be fixed in core (ie - we should do the right fix not the quick fix in all cases)
  • we don't add hook into code with known bugs or issues
  • in most cases they should have a unit test & the docs PR should be opened at the same time as the main PR (& if not we should probably close the PR until it is 'reviewable'

Some side notes

  • historically we have added a lot of hooks but have wound up supporting some poorly conceived hooks and /or been unable to cleanup toxic code (like in dedupe) due to them being 'jammed in there'

  • as with any feature adding a hook is a transfer of maintenance burden from the submitter to product maintenance.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: documentation/docs/dev#660