If commentId is zero, add rather than update #73
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hiyo! Thank you so much for this action @peter-evans 🙇
I'm using create-or-update-comment to address solvaholic/octodns-sync#41
Given how the
commentId
is checked now:create-or-update-comment/dist/index.js
Line 103 in f18a206
It seems necessary to write separate workflow steps gated on
comment-id
in the find-comment output, to avoid an error whencomment-id
is zero.If that check were more like "if commentId is set and it's not zero" then I think users could write one workflow step that will add a comment when
comment-id
is zero and update a comment when it's non-zero.I tested the change I've submitted here over in solvaholic/scaling-succotash#5
To me it looks great but idk about javascript actions. Two questions I have for you:
What do you think of running the update vs. add check this way?
What's the relationship between
index.js
anddist/index.js
in this repository?