Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging contribution from shpingalet007 to allow arguments #3

Merged
merged 10 commits into from
May 26, 2023

Conversation

shanegenschaw
Copy link
Owner

@shanegenschaw shanegenschaw commented May 26, 2023

Merging Khan#34.

With contributions from @shpingalet007 in https://github.com/shpingalet007/pr-commands

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.

@shpingalet007
Copy link
Collaborator

Looks good 👍

@shanegenschaw
Copy link
Owner Author

@shpingalet007 I noticed the example.yml workflow is failing due to "The template is not valid", any ideas? https://github.com/shanegenschaw/pull-request-comment-trigger/actions/runs/5093067003/jobs/9155209868#step:3:1

@shanegenschaw
Copy link
Owner Author

#deploy show me a rocket

@shanegenschaw
Copy link
Owner Author

test comment

@shanegenschaw
Copy link
Owner Author

#deploy test

@shanegenschaw
Copy link
Owner Author

#look

@shanegenschaw
Copy link
Owner Author

#deploy on ** environment

@shanegenschaw
Copy link
Owner Author

#deploy test

@shpingalet007
Copy link
Collaborator

@shpingalet007 I noticed the example.yml workflow is failing due to "The template is not valid", any ideas? https://github.com/shanegenschaw/pull-request-comment-trigger/actions/runs/5093067003/jobs/9155209868#step:3:1

Seems like API access error as responds with 403, but no idea why. I'll look into it soon

@shanegenschaw
Copy link
Owner Author

#look

@shanegenschaw
Copy link
Owner Author

#deploy test

@shanegenschaw
Copy link
Owner Author

#deploy on ** environment test

@shanegenschaw
Copy link
Owner Author

I didn't have the repo setup to allow GitHub Actions to post comments, I've fixed that issue so the access errors are gone.
GHA still doesn't like the template string, here's a more recent run: https://github.com/shanegenschaw/pull-request-comment-trigger/actions/runs/5093459388/jobs/9156082798#step:3:1

It's really not a blocker IMO since it is just in the example workflow, and shouldn't break the action itself. Just would be nice to not trip up future contributions.

@shpingalet007
Copy link
Collaborator

#deploy on dev environment

@shpingalet007
Copy link
Collaborator

@shanegenschaw I see... Looks like some unhandled error. The asterisks in the example command are a wildcard for a word. That's why it breaks if we put there **. However, something is wrong here.

The command #deploy on dev environment does the thing. Look into the run#5093533819

@shanegenschaw
Copy link
Owner Author

@shpingalet007 gotcha, user error on my part then 😄
I'm going to go ahead and merge this, thanks for the collaboration and quick replies!

@shanegenschaw shanegenschaw merged commit 95f6c12 into master May 26, 2023
@shanegenschaw shanegenschaw deleted the comment-args branch May 26, 2023 17:52
@shpingalet007
Copy link
Collaborator

shpingalet007 commented May 26, 2023

Okay @shanegenschaw 😀👍 Happy to collaborate on that, it's a pleasure. Anyway, I'll look into that next days and update the mainstream PR. I will let you know to update that on your fork when it would be ready. Have a nice weekend!

Update: I have a test repo where I was using this action charged with arguments. I will leave here the link for you if you would like to look for a reference on what can be done with this PR accepted shpingalet007/pr-deployments/pull/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants