Khan / pull-request-comment-trigger

A github action for detecting a "trigger" in a pull request description or comment
207 stars 91 forks source link

Arguments parsing implementation #34

Open shpingalet007 opened 1 year ago

shpingalet007 commented 1 year ago

Changes

  1. Added GitHub Actions input - allow_arguments: Boolean. It enables/disables arguments parsing. It is set to false by default.
  2. Arguments parsing via double-asterisk marker - script looks for ** in trigger and considers the marked part of the comment as argument. Output to the steps.check.outputs.arguments. It doesn't do anything if allow_arguments: false.
  3. Add new example - add job that enables debugging #deploy on ** environment comment.

Other changes

mattkeeler commented 1 year ago

This would be a great feature to add.

eliasmelgaco commented 1 year ago

hey @shpingalet007 can you publish on github marketplace as shanegenschaw did here? https://github.com/Khan/pull-request-comment-trigger/pull/46 ?

shpingalet007 commented 1 year ago

@eliasmelgaco I could do it, but wouldn't it be better if shanegenschaw merges my PR? There are already 5 modules (original + 4 forks) published on GitHub Actions Marketplace. I would recommend the community to select his repository as main fork while patches are not accepted in the original one. He already has 3 stars on his repo and looks like the most active fork. Cheers

shanegenschaw commented 1 year ago

Hey, @shpingalet007 and @eliasmelgaco, I have a PR ready to pull this into my fork, please take a look/give a trial, and let me know if it looks good:

If it looks okay, I'll merge and tag it as v2 and v2.1.0

eliasmelgaco commented 1 year ago

@shpingalet007 @shanegenschaw for me your PRs are perfect. I would love to use both changes in the Khan project (main project)

shpingalet007 commented 1 year ago

@eliasmelgaco okay, my PR was merged on shanegenschaw/pull-request-comment-trigger. Feel free to leave your feedback here, 🙂 I will use the opportunity to fix any found issues on this PR and push updates to the fork 👍

shanegenschaw commented 1 year ago

The work from @shpingalet007 has been merged and published as v2 and v2.1.0

shpingalet007 commented 1 year ago

@shanegenschaw I removed prefixOnly flag. It is very unstable and difficult to make it so. Updated the PR, you can update your fork too if you want to.

shanegenschaw commented 1 year ago

@shanegenschaw I removed prefixOnly flag. It is very unstable and difficult to make it so. Updated the PR, you can update your fork too if you want to.

@shpingalet007 I've merged your commit into a new branch/PR, if you think it looks good: https://github.com/shanegenschaw/pull-request-comment-trigger/pull/6