Skip to content

Commit b8b9365

Browse files
authored
Feat/breardon2011/instructions (#2085)
* initial examples * added lock and unlock, removed layer examples * added emojis * change to double arrow for all changes * Update provider.go - remove white space
1 parent b568c07 commit b8b9365

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

libs/comment_utils/summary/updater.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ func (b BasicCommentUpdater) UpdateComment(jobs []scheduler.SerializedJob, prNum
5959
job.ResourcesDeleted)
6060
}
6161

62+
message = message + "\n" + formatExampleCommands()
63+
6264
const GithubCommentMaxLength = 65536
6365
if len(message) > GithubCommentMaxLength {
6466
// TODO: Handle the case where message is too long by trimming
@@ -88,6 +90,26 @@ func (b BasicCommentUpdater) UpdateComment(jobs []scheduler.SerializedJob, prNum
8890
return nil
8991
}
9092

93+
// formatExampleCommands creates a collapsible markdown section with example commands
94+
func formatExampleCommands() string {
95+
return `
96+
<details>
97+
<summary>Instructions</summary>
98+
99+
⏩ To apply these changes, run the following command:
100+
101+
` + "```" + `bash
102+
digger apply
103+
` + "```" + `
104+
105+
🚮 To unlock the projects in this PR run the following command:
106+
` + "```" + `bash
107+
digger unlock
108+
` + "```" + `
109+
</details>
110+
`
111+
}
112+
91113
type NoopCommentUpdater struct {
92114
}
93115

0 commit comments

Comments
 (0)