-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve comment formatting #67
Improve comment formatting #67
Conversation
Thank you @travislikestocode!
I remember the If we're going to add this I'd like to also add documentation about how to reduce risk while using the
How would it be to expose the whole header and footer as inputs? Like, if there were |
Ah yes because it'll run a workflow from the base ref, but it could checkout and run code from the head of the pull request, right?
Would it be adequate to link to the official warning?
This makes so much more sense. I'll do that instead. |
I see it now: The flexibility I was thinking of would be one of the benefits of using the 3rd party commenter: https://github.com/marketplace/actions/create-or-update-comment @travislikestocode would it meet your needs to use ☝️ that Action to add the pull request comments? We currently have example implementations in #41 (comment) and in the solvahol/dns repo. I'm open to extending this Action's built-in pull request updater, and I'm wary of reinventing wheels. |
I'm getting myself hung up on "why are these changes coming from forks?", but I think that's not really relevant. I raised #70 to frame it as an issue with comment.sh and explore how to solve that.
Right. Actions triggered by the |
Sure, that works.
Makes sense. Keep this module concerned with octodns deploys and let the comment module handle comments. And it's possible to include the plan now that we added the output in #66 like you suggested. Good call.
For the record, we have developers submitting draft DNS changes from their forks of the octodns repo, which system engineering reviews and deploys.
I have a step in my workflow that verifies a sha256 hash for all of the executable scripts in the repo. Probably overkill for my private instance of github enterprise that's restricted to employees but thought I'd mention it in case it helps someone in the future. ... Closing since we can get the functionality we need without complicating comment.sh |
I dig it, thank you @travislikestocode 🙇
10-4, thank you for explaining. My experience leaves a huge blind spot for me: I and my teammates have write permission to all the repositories I collaborate on at work, and this project is my first practice working with contributors who use forks. I'll work to ask more questions up-front about how folks use, or would like to use, this Action.
Maybe overkill, but I think it's a difficult risk to quantify. Thank you for sharing. In case you'd like to try it out, I removed the event type check in 1f4d942 for #70. That's available by its SHA and at |
Description
On my fork I added some flair to the PR comments to make them easier to grok at a glance. I'm submitting the changes as a PR in hopes that @solvaholic and others like them.
Changes:
$DOIT
is'--doit'
, otherwise: 🧪'--doit'
. otherwise, add 'dry run'add_pr_comment_footer
which is enabled by default, but will hide the footer if anything but 'Yes' is supplied. AFAICT, Github actions don't support boolean inputs. In hindsight, this is probably overkill but I prefer not to have the footer. 🤷pull_request_target
Motivation and Context
Adding support for
pull_request_target
is helpful for people using the event trigger. The formatting changes are just a quality of life thing that make the comments more useful in my opinion.How Has This Been Tested?
Created test workflows for pull_request, and pull_request_target. Created a PR, and the actions runs were successful: pull_request, pull_request_target
Example Comment:
octoDNS deployment for 85b0b89
example.com.
etchosts
Summary: Creates=1, Updates=0, Deletes=0, Existing Records=0
Types of changes
Checklist: