Skip to content

Commit 25160bc

Browse files
committed
fix: output a link when publishing
1 parent 608195a commit 25160bc

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

cmd/publish.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ func runPublishCommand(cmd *cobra.Command, args []string) error {
204204
return fmt.Errorf("failed to publish rule: %w", err)
205205
}
206206

207-
color.Green("Successfully published package '%s/%s' (version %s)", rs.Name, packageVersion)
207+
// Create the URL for the published rule
208+
ruleURL := fmt.Sprintf("%s/%s/versions/%s", cfg.AppURL, rs.Name, packageVersion)
209+
color.Green("Successfully published package '%s' (version %s)", rs.Name, packageVersion)
210+
color.Green("Your rule is now available at: %s", ruleURL)
208211
return nil
209212
}
210213

spec/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ rules publish --visibility private
204204
- Uses the registry API's POST endpoint to publish the rule
205205
- Requires user to be logged in (uses Bearer auth)
206206
- Sets the visibility of the published rule according to the flag
207-
- Returns a confirmation message with the published rule's details
207+
- Returns a confirmation message with the published rule's details, including the URL where the rule is available
208208

209209
### `rules whoami`
210210

0 commit comments

Comments
 (0)