Skip to content

Commit

Permalink
Warn first time contributors to add themselves to the CONTRIBUTORS file
Browse files Browse the repository at this point in the history
  • Loading branch information
giarve committed Mar 26, 2021
1 parent cfa0a68 commit 9cb72b3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: Want to Discuss something?
- name: Discussions
url: https://github.com/metacall/core/discussions
about: For any Discussion, Queestions or Query
about: This is where long discussions could take place outside of the chat platforms.


2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Our project, as you've probably heard, is getting really popular and truth is we
Do the checklist before filing an issue:

- [ ] Is this something you can **debug and fix**? Create an apt issue and send us a pull request! Bug fixes and documentation fixes are welcome.
- [ ] Have a usage question? Ask your question on [Discussions](https://github.com/metacall/core/discussions/new). We use Github Discussions for usage question and GitHub for bugs.
- [ ] Have an usage question? Ask it on [Discussions](https://github.com/metacall/core/discussions/new) or community chats. We use Github Discussions for usage questions and GitHub Issues for bugs.
- [ ] Have an idea for a feature? Use the feature issue and propose your ideas.

None of the above, create a custom issue
Expand Down
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ Fixes #(issue_no)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Documentation Update
- [ ] Documentation update

# Checklist:

- [ ] My code follows the style guidelines (Clean Code) of this project.
- [ ] My code follows the style guidelines (clang-format) of this project.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] My changes generate no new warnings.
- [ ] I have added tests/screenshots (if any) that prove my fix is effective or that my feature works.
- [ ] I have tested my code with `OPTION_BUILD_SANITIZER` and `OPTION_TEST_MEMORYCHECK`.
- [ ] I have tested with `Helgrind` in case my code works with threading.
- [ ] I have tested with `Helgrind` in case my code works with threading.

If you are unclear about any of the above checks, have a look at our documentation [here](https://github.com/metacall/core/blob/develop/docs/README.md#63-debugging)

Expand Down
2 changes: 1 addition & 1 deletion githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# as this script. Hooks should return 0 if successful and nonzero to cancel the
# commit. They are executed in the order in which they are listed.
#HOOKS="pre-commit-compile pre-commit-uncrustify"
HOOKS="pre-commit-clang-format"
HOOKS="pre-commit-add-contributor pre-commit-clang-format"
###########################################################
# There should be no need to change anything below this line.

Expand Down
13 changes: 13 additions & 0 deletions githooks/pre-commit-add-contributor
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

if git log --pretty="%ae%n%ce" | sort | uniq | grep -q "$(git config user.email)"; then
exit 0
else
if git log --pretty="%an%n%cn" | sort | uniq | grep -q "$(git config user.name)"; then
exit 0
else
printf "Please add yourself (copy the next line) to the CONTRIBUTORS.md file.\n";
printf '%s <%s>\n\n' "$(git config user.name)" "$(git config user.email)";
exit 1
fi
fi

0 comments on commit 9cb72b3

Please sign in to comment.