Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.
/ respost Public archive
generated from actions/typescript-action

Respost 📝 Simple comment response for GitHub Actions with "response post"

License

Notifications You must be signed in to change notification settings

rytswd/respost

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

⚠️ UPDATE: Jan 2021 - THIS IS NO LONGER MAINTAINED

This repository tried to support adding a comment. There is a much better support from GitHub in https://github.com/actions/github-script.

You can use the github-script with Comvent (https://github.com/rytswd/comvent) to provide ChatBot like support.

Comvent is still being supported.


Respost - Response Post

WHAT: Send Response from GitHub Actions

Simple HTTP POST to write to the Issue and PR.

HOW: Example - Issue Creation + Bot-like Response

Issue Creation, with Comvent

WARNING: I have edited the above recording, it was originally around 90 sec.
NOTE: comvent is used to provide bot-like comment parsing.

HOW: Example - Above, with YAML

name: Respost - Write comment to new Issue event
on: issues

jobs:
  comment:
    runs-on: ubuntu-latest
    steps:
      - uses: rytswd/respost@v0.1.0
        with:
          title: Respost Custom Title from step 1, for Issue
          body: "Hello, World! Respost is here, making your GitHub Actions workflow even easier!"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This is all you need to automatically drop a comment when a new issue is created.

You can find more examples in this repo's .github/workflows/.

WHY: Simple and Cheap

GitHub Actions can be defined either in JavaScript or Docker container.

Docker container allows full segregation and secure setup, but it takes about ~10sec to build and start up.
When you wish to use GitHub Actions on frequently used events such as PR and Issue Comments, this can easily add up.

TypeScript can work seamlessly with JSON object, and axios provides easy HTTP POST handling.

About

Respost 📝 Simple comment response for GitHub Actions with "response post"

Resources

License

Stars

Watchers

Forks

Packages

No packages published