Skip to content

Commit 0f855bd

Browse files
authored
Merge pull request #313 from walkerk1980/main
2 parents 368e17c + a53cb67 commit 0f855bd

File tree

6 files changed

+18
-3
lines changed

6 files changed

+18
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ As seen above, we have two steps. One for a noop deploy, and one for a regular d
323323
| `fork_checkout` | The console command presented in the GitHub UI to checkout a given fork locally |
324324
| `fork_full_name` | The full name of the fork in "org/repo" format |
325325
| `initial_reaction_id` | The reaction id for the initial reaction on the trigger comment |
326+
| `initial_comment_id` | The comment id for the "Deployment Triggered 🚀" comment created by the action |
326327
| `actor_handle` | The handle of the user who triggered the action |
327328
| `global_lock_claimed` | The string "true" if the global lock was claimed |
328329
| `global_lock_released` | The string "true" if the global lock was released |

__tests__/schemas/action.schema.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,10 @@ outputs:
551551
description:
552552
type: string
553553
required: true
554+
initial_comment_id:
555+
description:
556+
type: string
557+
required: true
554558
actor_handle:
555559
description:
556560
type: string

action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ outputs:
222222
description: The environment URL detected and used for the deployment (sourced from the environment_urls input)
223223
initial_reaction_id:
224224
description: The reaction id for the initial reaction on the trigger comment
225+
initial_comment_id:
226+
description: The comment id for the "Deployment Triggered 🚀" comment created by the action
225227
actor_handle:
226228
description: The handle of the user who triggered the action
227229
global_lock_claimed:

dist/index.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,12 +561,16 @@ export async function run() {
561561
`)
562562

563563
// Make a comment on the PR
564-
await octokit.rest.issues.createComment({
564+
const initialComment = await octokit.rest.issues.createComment({
565565
...context.repo,
566566
issue_number: context.issue.number,
567567
body: commentBody
568568
})
569569

570+
// Set output for initial comment id
571+
core.setOutput('initial_comment_id', initialComment.data.id)
572+
core.saveState('initial_comment_id', initialComment.data.id)
573+
570574
// Set outputs for noopMode
571575
if (precheckResults.noopMode) {
572576
core.setOutput('noop', precheckResults.noopMode)

0 commit comments

Comments
 (0)