Skip to content

Conversation

@hdub-tech
Copy link

Upfront apologies

I apologize for not opening an issue first. Excuse:

Details When I first stumbled on the issue that led me to submit this PR, I read this repo's README and PR template, and also looked for a CONTRIBUTING file to make sure it wasn't a requirement to open an issue first. Not finding any obvious prerequisites, I proceeded to do the work and testing. It wasn't until after I finished, when I already had all my notes ready to go, and clicked the PR button that I realized I forgot to look at the PR template raw comments... which is where the Contributing guidance was hiding. So I'm hoping you will let me get away with skipping opening issues this one time and accept my PR with the cute picture sacrifice and additional payment of "fixing" the Contributing guidance so that hopefully other first time contributors don't have the same issue.

- What I did

  1. Fixed an issue where install.sh will not exit with error when supplied invalid arguments.
  2. Added support to install.sh for --help argument.
  3. Removed the dead link in the PR template Contributing guidance.
  4. Added the PR template Contributing guidance to a Contributing section on the main README.

- How I did it

  1. usage function called when invalid argument is provided to install.sh and script exits WITH error.
  2. New (commented) usage function with new supported --help argument in install.sh which will exit WITHOUT error.
  3. Deleted the sentence with the dead link in the PULL_REQUEST_TEMPLATE.md.
  4. Copy/Paste/Edit the main contributing guidance from the PULL_REQUEST_TEMPLATE.md to the repo README.md.

- How to verify it

1. Exit install.sh with usage and error on invalid argument

sh install.sh --invalid

  • BEFORE:

    Details

    illegal-opt-still-installs

  • AFTER:

    Details

    illegal-opt-usage-exit-error


2. Exit install.sh with usage and NO error on --help argument

sh install.sh --help

  • BEFORE (same as above):

    Details

    illegal-opt-still-installs

  • AFTER:

    Details

    help-opt-gives-usage


Regression tests: install still works

  • sh install.sh --dry-run

    Details

    install-dry-run

  • sh install.sh

    Details

    install-run


Linted and tested locally

  • shellcheck:

    Details

    make-shellcheck

  • test:

    Details

    make-test


README Contributing section

Details

readme-contributing


- Description for the changelog

(I know this says one line for the whole PR but traditionally changelogs have one line per THING and my PR has 2 distinct things)

  • Fixes an issue where install.sh will not exit with error when supplied invalid arguments
  • Enhances install.sh with --help argument to output usage statement

- A picture of a cute animal (not mandatory but encouraged)

GoodBoi

Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
Main link is widely inclusive of information already.

Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.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.

1 participant