Skip to content

Conversation

@msluther
Copy link
Contributor

From this discussion: #129 (comment)

Copy link
Contributor

@samshull samshull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to better understand why removal of this without a replacement is the best choice. Could you clarify for me, please?

"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-mocha": "^5.3.0",
"eslint-plugin-react": "^7.14.2",
"prepush": "^3.1.11",
Copy link
Contributor Author

@msluther msluther Dec 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samshull Random comment location here to allow threaded messages in github.

  1. prepush has security vulnerability and was being replaced in another PR (linked in this PR description) with a precommit hook.
  2. Why dictate a users's workflow or force them to use --no-verify. The proper time to verify what someone has done is passing tests is at PR/merge time and not on every commit or push. If a developer wants to commit frequently small chunks of code, that should actually be encouraged. If a developer wants to use TDD and commit an initial set of breaking tests, that should be encouraged/allowed. If a developer wants to push frequently to avoid losing their work, they should be allowed to do so.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think doing the way proposed here (no prepush) is more of a "trust but verify" model, which is generally a good thing. You encourage the developer to run the test suite, and trust that they do when necessary. And then when a PR is created, you verify that it passes by running it again.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There does not appear to be master branch protections on this repo. If we are to rely on PR testing, we should start by changing those rules first. And while I would prefer not to be a devil's advocate here, neither push, nor PR testing will prevent this package from being published to npm with bad code, so I would argue that we should be more concerned with prepublish actions than either of these.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prepublish sounds like a great idea! Would you be willing to spin up a PR to propose that? :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for branch protection rules, I just got those started with 2 required reviews; once the GH Actions PR gets merged, we can also set those up as required. 👍🏻

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(remember to use prepublishOnly to avoid the silly npm behavior of running prepublish after installs)

Copy link
Contributor

@samshull samshull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care whether we enforce testing with push hooks or github actions, as long as it accomplishes the goal of ensuring that code in the master branch is passing the tests we have written.

@samshull samshull dismissed their stale review December 17, 2020 19:50

No need to block

@msluther msluther merged commit bb5ffad into master Dec 17, 2020
@msluther msluther deleted the stay-out-of-my-workflow branch December 17, 2020 20:03
wcole1-godaddy pushed a commit that referenced this pull request Oct 13, 2025
Co-authored-by: Michael Luther <mluther1@godaddy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants