Skip to content

Add new Revision Name Flags #5

Merged
alexagillman merged 3 commits intomainfrom
dev/alexagillman/addFlagsToCallNewDotcomEndpoints
May 5, 2025
Merged

Add new Revision Name Flags #5
alexagillman merged 3 commits intomainfrom
dev/alexagillman/addFlagsToCallNewDotcomEndpoints

Conversation

@alexagillman
Copy link
Copy Markdown
Contributor

@alexagillman alexagillman commented May 1, 2025

For item: https://github.com/github/spark/issues/639, https://github.com/github/spark/issues/1449. Add new flags to pass revision name to dotcom APIs

Copilot AI review requested due to automatic review settings May 1, 2025 17:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new revision_name flag to the deploy and create commands, allowing users to pass a revision identifier to dotcom APIs.

  • Introduce RevisionName field in command flag structs
  • Import net/url and append revision_name query parameter when provided
  • Update URL building for both deploy and create endpoints

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cmd/deploy.go Add RevisionName flag field and include it in the deployment URL
cmd/create.go Add RevisionName flag field and include it in the creation URL
Comments suppressed due to low confidence (2)

cmd/create.go:18

  • The new RevisionName field is never bound to a CLI flag. Add a StringVar or StringVarP call in init() (e.g., createCmd.Flags().StringVar(&createCmdFlags.RevisionName, "revision-name", "", "revision name to send to the API")).
RevisionName 	   string

cmd/deploy.go:136

  • Consider adding unit tests for URL construction when RevisionName is set or unset to ensure the query parameter is encoded correctly.
if deployCmdFlags.RevisionName != "" {

Comment thread cmd/deploy.go Outdated
@alexagillman alexagillman merged commit 241f9ba into main May 5, 2025
5 checks passed
@salvador-barboza salvador-barboza deleted the dev/alexagillman/addFlagsToCallNewDotcomEndpoints branch September 2, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants