Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

chore: GitHub upgrades and allow arguments #46

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

shanegenschaw
Copy link

@shanegenschaw shanegenschaw commented Mar 21, 2023

GitHub upgrades

Upgrades for deprecated GitHub Actions functionality:

This PR basically combines the following PRs, but adds a necessary rebuild of the ./dist/index.js file:

Resolves:

Allow arguments

Contribution from @shpingalet007 to allow parsing arguments from the comment body.

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

  • Replace npm @zeit/ncc to @vercel/ncc as it was deprecated.
  • Upload new action NCC build.
  • Documented everything in Readme.md.

Related PRs:

@shanegenschaw shanegenschaw force-pushed the master branch 2 times, most recently from de5ec82 to e682ec0 Compare March 21, 2023 17:42
@shanegenschaw
Copy link
Author

The updated action is published in the marketplace if anyone wants to use it until this repo gets patched.

@shpingalet007
Copy link

shpingalet007 commented May 26, 2023

@shanegenschaw would you like to merge my PR #34 in your fork? Mentioned your fork on #34 (comment)

@shanegenschaw
Copy link
Author

@shanegenschaw would you like to merge my PR #34 in your fork? Mentioned your fork on #34 (comment)

@shpingalet007 sure I will try to work on this asap

@shanegenschaw
Copy link
Author

@shanegenschaw would you like to merge my PR #34 in your fork? Mentioned your fork on #34 (comment)

PR is ready here if you wouldn't mind having a look @shpingalet007 : shanegenschaw#3

@shpingalet007
Copy link

Okay, done @shanegenschaw! Thanks 🤝 Btw, why is this a PR instead of issue?)

@shanegenschaw shanegenschaw changed the title chore: GitHub upgrades chore: GitHub upgrades and allow arguments May 26, 2023
@shanegenschaw
Copy link
Author

The work from @shpingalet007 has been merged in with this PR and published as v2 and v2.1.0

hasTrigger = regexTrigger.test(body);
}

if ((prefixOnly && !hasTrigger) || !hasTrigger) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking for prefixOnly here is superfluous. Can be rewritten to

if (!hasTrigger) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to PR #34. Would check this soon and apply there as this PR is duplicate. Thanks!

Copy link

@shpingalet007 shpingalet007 Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, took a look at that @ramiro.

Finally, removing prefixOnly everywhere as the functionality is not stable if trigger is somewhere in the middle of comment. Commit 8963ccd. The condition was changed to the suggested too as there is no need in prefixOnly.

As this is duplicate PR, I suppose the issue must be resolved here or this PR must be closed before this review can be resolved. Anyway, the original PR is fixed. Thanks for your suggestions, and if you have more related to arguments parsing, consider publishing them in #34.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shpingalet007 can you share more details of the kind of problems the prefix_only option introduces?

I've had cases of the official action from this repository master at the f8ab347 commit failing randomly to detect the comment keyword and I want to understand if this could be the reason.

@shpingalet007
Copy link

shpingalet007 commented Aug 1, 2023

@shanegenschaw this PR is duplicate of #34, #36, #37. If there are no reasons to keep it, the work must be proceeded there.

shpingalet007 added a commit to shpingalet007/pr-commands that referenced this pull request Aug 1, 2023
shpingalet007 added a commit to shpingalet007/pr-deployments that referenced this pull request Aug 1, 2023
Update to Node 20 and update dependencies
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants