GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — new tool: git hooks (pre-push, pre-commit) · Issue #160 · nodejs/node-core-utils

new tool: git hooks (pre-push, pre-commit) #160

New issue
Copy link
New issue
Copy link
Closed
Closed
new tool: git hooks (pre-push, pre-commit)#160
Copy link
Assignees
priyank-p
Labels
feature requestNew features for node-core-utilsnew toolNew tool that could be added to node-core-utilsstale

Description

@joyeecheung
joyeecheung
opened on Jan 27, 2018
Issue body actions
  1. Should be a symlink in .git/hooks/pre-push
  2. Use the remote and branch config that we have, stop users from pushing invalid commits, especially merge commits.

Activity

  1. joyeecheung
    added
    new toolNew tool that could be added to node-core-utils
    feature requestNew features for node-core-utils
    on Jan 27, 2018
  2. priyank-p commented on Jan 27, 2018

    @priyank-p
    priyank-p
    on Jan 27, 2018
    Contributor
    More actions

    I worked on creating pre-push hook before, we can surely implement it. Alternatively we can also have pre-commit that runs linter only if the user wants.

  3. alopezsanchez commented on Feb 10, 2018

    @alopezsanchez
    alopezsanchez
    on Feb 10, 2018
    Contributor
    More actions

    Questions:

    • This hook will be only for node-core-utils project, it will be a tool for collaborators of all Node.js projects, or a tool for any contributor?
    • Language of the script? Bash, Node...?

    I can work of it if you don't have any inconveniences.

  4. joyeecheung commented on Feb 11, 2018

    @joyeecheung
    joyeecheung
    on Feb 11, 2018
    MemberAuthor
    More actions

    This hook will be only for node-core-utils project, it will be a tool for collaborators of all Node.js projects, or a tool for any contributor?

    For node core, I think. It's just a script that people can symlink to, we can ask the users if they want to symlink that during the npm post-install hook. People can also symlink to other repos if they want.

    Language of the script? Bash, Node...?

    Well I guess it'll need to read the .ncu/config at some point, which is JSON (also might need to read the global ~/.ncurc), so it'll be easier to write that in Node

  5. priyank-p commented on Feb 11, 2018

    @priyank-p
    priyank-p
    on Feb 11, 2018
    Contributor
    More actions

    Language of the script? Bash, Node...?

    Yep, agreed that it should be in node. But the symlinked script must be in bash, since windows also supports bash in git hooks.

    And furthermore in the .git/hooks folder you need to make sure that you remove the .sample file for the hook since sometimes this causes the hook to not run.

    Lastly, the hook should output info about using --no-verify flag to skip this hook.

  6. priyank-p
    changed the title [-]new tool: pre-push git hook[/-] [+]new tool: git hooks (pre-push, pre-commit)[/+] on Mar 11, 2018
  7. priyank-p
    self-assigned this
    on Mar 11, 2018
  8. priyank-p commented on Mar 11, 2018

    @priyank-p
    priyank-p
    on Mar 11, 2018
    Contributor
    More actions

    Should this be its own ncu-git-hooks or be part of git node git node hooks? (This will be used to install/uninstall hooks)

    What should it run make -j4 test and make lint for pre-commit and core-validate-commit for pre-push?

    (I plan to work on this, After some issues, labeled bugs are fixed).

  9. joyeecheung
    added a commit that references this issue on Aug 21, 2018

    util: Fix number format for `pad`

    6e9e150
  10. github-actions commented on Aug 17, 2020

    @github-actions
    github-actionsBot
    on Aug 17, 2020
    Contributor
    More actions

    This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

  11. github-actions
    added
    stale
    on Aug 17, 2020
  12. github-actions
    closed this as completedon Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @priyank-p
    priyank-p

Labels

feature requestNew features for node-core-utilsnew toolNew tool that could be added to node-core-utilsstale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.