generated from actions-cool/action-js-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
7,060 additions
and
62 deletions.
There are no files selected for viewing
Empty file.
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 |
---|---|---|
@@ -1,40 +1,61 @@ | ||
<p align="center"> | ||
<a href=""> | ||
<img width="140" src="https://avatars.githubusercontent.com/u/73879334?s=200&v=4" /> | ||
</a> | ||
</p> | ||
|
||
<h1 align="center">Action JavaScript Template</h1> | ||
<div align="center"> | ||
A simple javascript template for rapid development of GitHub actions. | ||
</div> | ||
|
||
![CI](https://github.com/actions-cool/action-js-template/workflows/CI/badge.svg) | ||
|
||
## 🚀 How to use? | ||
# 📌 Maintain One Comment | ||
|
||
Maintain just one comment in Issue and PR. | ||
|
||
- This Action is only applicable to triggers related to issue and pull_request | ||
- When the **filtered comments** do not exist, will add a comment | ||
- When the **filtered comments** is only one, this comment will be updated | ||
- When the number of **filtered comments** exceeds 1, no operation will be performed | ||
|
||
## How to use? | ||
```yml | ||
name: Maintain One Comment | ||
|
||
on: [issues, pull_request] | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: maintain-comment | ||
uses: actions-cool/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
body: | | ||
Hi 😀 | ||
<!-- Created by actions-cool/maintain-one-comment --> | ||
emojis: '+1, laugh' | ||
body-include: '<!-- Created by actions-cool/maintain-one-comment -->' | ||
``` | ||
![](https://github.com/actions-cool/resources/blob/main/image/template-js.png?raw=true) | ||
| Name | Desc | Type | Required | | ||
| -- | -- | -- | -- | | ||
| token | GitHub token | string | ✖ | | ||
| body | Create comment body | string | ✔ | | ||
| emojis | Add [emoji](#emoji-list) | string | ✖ | | ||
| update-mode | Comment update mode. Options: `replace` `append`. Default: `replace` | string | ✖ | | ||
| comment-auth | Filter comment auth | string | ✖ | | ||
| body-include | Filter comment body | string | ✖ | | ||
|
||
## 📒 Catalog Introduction | ||
## Emoji List | ||
|
||
``` | ||
├── .github/workflows/ The CI for make sure it is packaged correctly | ||
├── dist Package the generated Aciton execution code | ||
├── src Component home directory | ||
│ └── main.js Your code | ||
└── action.yml Action config | ||
``` | ||
| input | emoji | | ||
| -- | -- | | ||
| `+1` | 👍 | | ||
| `-1` | 👎 | | ||
| `laugh` | 😄 | | ||
| `confused` | 😕 | | ||
| `heart` | ❤️ | | ||
| `hooray` | 🎉 | | ||
| `rocket` | 🚀 | | ||
| `eyes` | 👀 | | ||
|
||
The rest of the documents can be consulted by yourself. | ||
## Changelog | ||
|
||
## 🤖 Command introduction | ||
[CHANGELOG](./CHANGELOG.md) | ||
|
||
| Name | Desc | | ||
| -- | -- | | ||
| package | action build for release | | ||
| format | prettier write | | ||
| format-check | prettier check | | ||
## 💖 Who is using? | ||
|
||
## LICENSE | ||
|
||
[MIT](https://github.com/actions-cool/action-js-template/blob/main/LICENSE) | ||
[MIT](./LICENSE) |
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
Oops, something went wrong.