Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/skullface/issue-comment-template-action

GitHub Action to add a templated comment to a specific issue.
https://github.com/skullface/issue-comment-template-action

action project-management

Last synced: about 2 months ago
JSON representation

GitHub Action to add a templated comment to a specific issue.

Awesome Lists containing this project

README

        

# Issue comment template action 🚀

The GitHub Actions bot will post a new comment, following the templated content you provide, on an issue you specify, at the time you schedule.

## How does it work?
* Runs on a [schedule via cron](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events).
* Uses the official [`github-script`](https://github.com/actions/github-script) action to leverage the GitHub API. JavaScript in your action!

## What do I customize?

* Schedule 🗓
* Issue number #️⃣
* Comment body 💬

There are comments in the action itself to help walk you through it 💖

### [Schedule](https://github.com/skullface/issue-comment-template-action/blob/main/action.yaml#L10) 🗓

Per the [GitHub Actions docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events):
> You can schedule a workflow to run at specific UTC times using POSIX cron syntax. The shortest interval you can run scheduled workflows is once every 5 minutes.

Determine when you want the action to run in [24-hour format in the UTC timezone](https://time.is/compare/UTC), then use [crontab guru](https://crontab.guru/) to generate cron syntax for you (or [check out their examples](https://crontab.guru/examples.html)).

The default schedule in the action is `17:30 UTC` (5:30pm UTC, 9:30am PT) every Friday, which reads in cron syntax as [`30_17_*_*_FRI`](https://crontab.guru/#30_17_*_*_FRI).

```yaml
schedule:
# Define your own schedule after "cron: "
# Add a comment to the end of the line to read it in plain language 🕓
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events
- cron: 30 17 * * FRI # Every Friday at 17:30 UTC (5:30pm UTC / 9:30am PT)
```

### [Issue number](https://github.com/skullface/issue-comment-template-action/blob/main/action.yaml#L21) #️⃣

What issue will the action run on? Define it here by its number (the autogenerated, autoincremented numerical identifier of an issue). To avoid a syntax error, make sure there is a comma `,` after the number.

The default issue number in the action is `420`.

```yaml
issue_number: 420, # replace with the number of the specific issue the action will comment on
```

### [Comment body](https://github.com/skullface/issue-comment-template-action/blob/main/action.yaml#L24-L33) 💬

Add whatever [GitHub-flavored Markdown](https://docs.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax) you desire in the comment body — as long or as short as you need.

The default comment body starts with `# Replace me with your own content!` and ends with `Just keep the comment body between the backticks.`.

```yaml
body: `# Replace me with your own content!

Use multiple lines of **Markdown** here to create your own templated issue comment.

| Even | Tables |
| --- | --- |
| If you | want to |

Just keep the comment body between the backticks.
`
```

## Why would I use this?
Any time you need to keep a specific issue regularly updated!

* Running issue for regular meeting agendas
* Reminder issue to ping you or your team to post a bi-weekly sprint summary