-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(init): initial commit of Leave a comment
- Loading branch information
0 parents
commit bd1014c
Showing
13 changed files
with
27,916 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Test Action' | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'releases/*' | ||
|
||
jobs: | ||
# test action works running from the graph | ||
test-action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./ | ||
with: | ||
issue_number: 3 | ||
issue_type: issue | ||
comment: 'This is a test comment' | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at @design\_\_pattern on Twitter. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
# Contributing | ||
|
||
The following guidelines must be followed by all contributors to this repository. Please review them carefully and do not hesitate to ask for help. | ||
|
||
### Code of Conduct | ||
|
||
- Review and test your code before submitting a pull request. | ||
- Be kind and professional. Avoid assumptions; oversights happen. | ||
- Be clear and concise when documenting code; focus on value. | ||
- Don't commit commented code to the main repo (stash locally, if needed). | ||
|
||
### Git Commit Guidelines | ||
|
||
We follow precise rules for git commit message formatting. These rules make it easier to review commit logs and improve contextual understanding of code changes. This also allows us to auto-generate the CHANGELOG from commit messages. | ||
|
||
Each commit message consists of a **header**, **body** and **footer**. | ||
|
||
#### Header | ||
|
||
The header is required and must not exceed 70 characters to ensure it is well-formatted in common git tools. It has a special format that includes a _type_, _scope_ and _subject_: | ||
|
||
Syntax: | ||
|
||
```bash | ||
<type>(<scope>): <subject> | ||
``` | ||
|
||
#### Type | ||
|
||
The _type_ should always be lowercase as shown below. | ||
|
||
##### Allowed `<type>` values: | ||
|
||
- **feat** (new feature for the user) | ||
- **fix** (bug fix for the user, not a fix to build scripts) | ||
- **docs** (changes to documentation) | ||
- **style** (formatting, missing semi colons, etc; no functional code change) | ||
- **refactor** (refactoring production code, eg. renaming a variable) | ||
- **test** (adding missing tests, refactoring tests; no production code change) | ||
- **chore** (updating build/env/packages, etc; no production code change) | ||
|
||
#### Scope | ||
|
||
The _scope_ describes the affected code. The descriptor may be a route, component, feature, utility, etc. It should be one word or camelCased, if needed: | ||
|
||
```bash | ||
feat(transactions): added column for quantity | ||
feat(BalanceModule): initial setup | ||
``` | ||
|
||
The commit headers above work well if the commit affects many parts of a larger feature. If changes are more specific, it may be too broad. To better clarify specific scopes, you should use a `feature/scope` syntax: | ||
|
||
```bash | ||
fix(transaction/details): missing quantity field | ||
``` | ||
|
||
The above syntax helps reduce verbosity in the _subject_. In comparison, consider the following example: | ||
|
||
```bash | ||
fix(transaction): missing quantity field in txn details | ||
``` | ||
|
||
Another scenario for scope is using a `route/scope` (or `context/scope`) syntax. This would be useful when a commit only affects a particular instance of code that is used in multiple places. | ||
|
||
_Example_: Transactions may be shown in multiple routes/contexts, but a bug affecting transaction actions may only exist under the "home" route, possibly related to other code. In such cases, you could use the following format: | ||
|
||
```bash | ||
fix(home/transactions): txn actions not working | ||
``` | ||
|
||
This header makes it clear that the fix is limited in scope to transactions within the home route/context. | ||
|
||
#### Subject | ||
|
||
Short summary of the commit. Avoid redundancy and simplify wording in ways that do not compromise understanding. | ||
|
||
Good: | ||
|
||
```bash | ||
$ git commit -m "fix(nav/link): incorrect URL for Travel" | ||
``` | ||
|
||
Bad: | ||
|
||
```bash | ||
$ git commit -m "fix(nav): incorrect URL for Travel nav item :P" | ||
``` | ||
|
||
> Note that the _Bad_ example results in a longer commit header. This is partly attributed to the scope not being more specific and personal expression tacked on the end. | ||
**Note regarding subjects for bug fixes:** | ||
|
||
Summarize _what is fixed_, rather than stating that it _is_ fixed. The _type_ ("fix") already specifies the state of the issue. | ||
|
||
For example, don't do: | ||
|
||
```bash | ||
$ git commit -m "fix(nav): corrected Travel URL" | ||
``` | ||
|
||
Instead, do: | ||
|
||
```bash | ||
$ git commit -m "fix(nav): broken URL for Travel" | ||
``` | ||
|
||
#### Body and Footer (optional) | ||
|
||
The body and footer should wrap at 80 characters. | ||
|
||
The **body** describes the commit in more detail and should not be more than 1 paragraph (3-5 sentences). Details are important, but too much verbosity can inhibit understanding and productivity -- keep it clear and concise. | ||
|
||
The **footer** should only reference Pull Requests or Issues associated with the commit. | ||
|
||
For bug fixes that address open issues, the footer should be formatted like so: | ||
|
||
```bash | ||
Closes #17, #26 | ||
``` | ||
|
||
and for Pull Requests, use the format: | ||
|
||
```bash | ||
Related #37 | ||
``` | ||
|
||
If a commit is associated with issues and pull requests, use the following format: | ||
|
||
```bash | ||
Closes #17, #26 | ||
Related #37 | ||
``` | ||
|
||
> Issues should always be referenced before pull requests, as shown above. | ||
#### Piecing It All Together | ||
|
||
Below is an example of a full commit message that includes a header, body and footer: | ||
|
||
```bash | ||
refactor(nav/item): added prop (isActive) | ||
|
||
NavItem now supports an "isActive" property. This property is used to control the styling of active navigation links. | ||
|
||
Closes #21 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 James Singleton | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<h1 align="center">Welcome to leave a comment 💬</h1> | ||
<p> | ||
<img alt="Version" src="https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000" /> | ||
<a href="https://github.com/JamesSingleton/leave-comment#readme" target="_blank"> | ||
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" /> | ||
</a> | ||
<a href="https://github.com/JamesSingleton/leave-comment/graphs/commit-activity" target="_blank"> | ||
<img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" /> | ||
</a> | ||
<a href="https://github.com/JamesSingleton/leave-comment/blob/master/LICENSE" target="_blank"> | ||
<img alt="License: MIT" src="https://img.shields.io/github/license/JamesSingleton/leave-comment" /> | ||
</a> | ||
</p> | ||
|
||
> A GitHub Action to leave a comment on a PR or an Issue | ||
## Usage | ||
|
||
```yml | ||
name: Leave A Comment Example | ||
|
||
on: | ||
issues: | ||
types: opened | ||
|
||
jobs: | ||
example: | ||
name: Example | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Example Comment | ||
uses: jamessingleton/leave-a-comment@v1 | ||
with: | ||
issue_number: ${{ github.event.issue.number }} | ||
comment: 'Your Comment Here' | ||
token: ${{ secrets.BOT_TOKEN }} | ||
``` | ||
## 🤝 Contributing | ||
Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/JamesSingleton/leave-a-comment/issues). You can also take a look at the [contributing guide](https://github.com/JamesSingleton/leave-a-comment/blob/master/CONTRIBUTING.md). | ||
## Show your support | ||
Give a ⭐️ if this project helped you! | ||
## 📝 License | ||
Copyright © 2020 [James Singleton](https://github.com/JamesSingleton).<br /> | ||
This project is [MIT](https://github.com/JamesSingleton/leave-a-comment/blob/master/LICENSE) licensed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'Leave a comment' | ||
description: 'Leaves a new comment' | ||
|
||
inputs: | ||
issue_number: | ||
description: 'The issue number you want to leave a comment on.' | ||
required: true | ||
comment: | ||
description: 'What you want to comment.' | ||
required: true | ||
token: | ||
description: 'GitHub access token.' | ||
required: true | ||
|
||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' | ||
|
||
branding: | ||
icon: 'message-circle' | ||
color: 'gray-dark' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; |
Oops, something went wrong.