Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Support --generated and --upload for diff and diff-all#1883

Merged
niclim merged 14 commits intomainfrom
add-uncommitted-changes-check
May 1, 2023
Merged

Support --generated and --upload for diff and diff-all#1883
niclim merged 14 commits intomainfrom
add-uncommitted-changes-check

Conversation

@niclim
Copy link
Contributor

@niclim niclim commented Apr 26, 2023

🍗 Description

What does this PR do? Anything folks should know?

Two changes:

  • add an --generated flag to diff and diff-all
    • will include uncommitted changes on the branch
    • will automatically generate an optic url if not set (deduped by web_url + path)
  • the upload flow to handle cloud specs (i.e. we don't upload them, but instead we'll point at the already uploaded spec)

TODO

📚 References

Links to relevant docs (Notion, Twist, GH issues, etc.), if applicable.

👹 QA

How can other humans verify that this PR is correct?

@niclim niclim changed the title Support --include-uncommitted-changes and upload with cloud spec Support --generated and --upload for diff and diff-all Apr 27, 2023
tags,
orgId: specDetails.orgId,
});
} else if (specs.from.context.vcs === VCS.Cloud) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes the upload flow when using --compare-from cloud:tag - since we'll set the spec id to whatever we downloaded from cloud

export async function getOrganizationFromToken(
client: OpticBackendClient,
message: string
message: string | false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updates so that we can pass in false to just select the first org in certain cases (i.e. generated or CI)

@niclim niclim requested a review from nalanj April 27, 2023 22:18
@niclim niclim marked this pull request as ready for review April 27, 2023 22:18
@niclim niclim added this pull request to the merge queue May 1, 2023
Merged via the queue into main with commit c443e00 May 1, 2023
@niclim niclim deleted the add-uncommitted-changes-check branch May 1, 2023 15:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants