Coder Social home page Coder Social logo

rytswd / comvent Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 1.0 21.98 MB

⚡️ Comvent - Simple control for GitHub Actions workflow with "comment event", allowing you to parse comments with regular expression

License: MIT License

TypeScript 75.52% JavaScript 24.48%
github-actions typescript

comvent's Introduction

Hi there, I'm Ryota 🐈👋

It's pronounced as REE-YO-TA 👻

Passionate about learning, building, and sharing technology.

comvent's People

Contributors

dependabot[bot] avatar rytswd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

comvent's Issues

[Feature Request]: Add support for better pull request comment handling, with assignee, reviewer, etc.

Enhancement Area

Comvent Configuration YAML, Issue Comment Event Handling, Pull Request Comment Event Handling, Runtime

Details

Comment event can pull in a bit more information to control when Comvent is triggered for Pull Request specific use cases.

Use Cases

Assignee based trigger

When an assignee comments to their Issue or Pull Request, s/he can trigger some automation only when they want. This may be useful for automation where the assignee needs to trigger some preview build, etc.

Reviewer based trigger

Similar to the assignee, but when a review is requested, reviewers can trigger some other automation such as extra tests that are lengthy to run for each change.

Other possibilities

Code Owner based trigger

This would be a bit more tricky as finding code owner will require further delving into the associated PR and its affected files. I'd think assignee and reviewer would mostly cover these cases, so I'm not sure if there is a specific need for this.

Comvent ⚡️ Playground 🏞

😎 TL; DR

Comment to this issue with the following one line (no need to wrap in backticks):

/hello-world

You will see an automated comment response in 1 min or so!

🔎 About

This is only a playground 🏞
You can comment on this to see Comvent in action, which uses https://github.com/actions/github-script.

Multiple commands can be issued at once in a single comment, as long as they are provided in separate lines.

📝 Note

Because GitHub Action takes several seconds to initiate the action, you may see up to 1 min delay.

💻 Available Commands

For all users

  • /weather: automation responds with a comment
  • /hello-world: automation responds with a comment
  • /echo (.+)$: automation responds with your comment in (.+) portion of regexp

Ref: https://github.com/rytswd/comvent/blob/main/.github/workflows/issue-comment-blacklist-demo.yaml

For specific users (currently set for only @rytswd)

  • /random: automation responds with a comment
  • /today: automation responds with a comment
  • /httpbin: automation responds with a comment

Ref: https://github.com/rytswd/comvent/blob/main/.github/workflows/issue-comment-whitelist-demo.yaml

Abuse Monitor

  • some abusive content: If you write a comment including this exact phrase in a single line, you will see the comment being removed via the automation. You will also see a comment about the comment deletion.

Ref: https://github.com/rytswd/comvent/blob/main/.github/workflows/abusive-comment-demo.yaml

[Feature Request]: Add support for trigger type of assignee only

Enhancement Area

Issue Comment Event Handling, Comvent Configuration YAML, Runtime

Details

Add another trigger type of Assignee only. This allows more dynamic updates to who can trigger Comvent to kick off based on each issue.

It is likely that the runtime will need to parse the event payload, which means extra GitHub Action usage, but that is probably a good start.

[Bug]: test

Contact Details

No response

What happened?

test

Version

1.0.2 (Default)

What browsers are you seeing the problem on?

No response

Relevant log output

test

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Bug]: Test

Version

0.4

What happened?

Test

Relevant log output

No response

Reference

No response

Support regex group match

When regex group match is used, instead of returning found for each match, it should return the regex group as the output value returned by comvent.

This allows having a simpler comvent configuration to cover multiple commands in one go.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.