Skip to content

feat: add HCP run-id input source#3

Closed
dwizzle204 wants to merge 1 commit intomainfrom
feat/hcp-input
Closed

feat: add HCP run-id input source#3
dwizzle204 wants to merge 1 commit intomainfrom
feat/hcp-input

Conversation

@dwizzle204
Copy link
Copy Markdown
Owner

@dwizzle204 dwizzle204 commented Mar 20, 2026

Summary

  • Add native HCP Terraform run-id input via --hcp-run-id <id> so tfplan2md can fetch plan JSON directly from HCP/TFE.
  • Keep the existing parse/render pipeline unchanged by introducing this strictly as a new input source.
  • Add focused docs and tests for authentication, endpoint validation, conflict handling, and API error paths.

What Changed

  • CLI / wiring

    • Added --hcp-run-id parsing and input-mode conflict validation.
    • Routed HCP mode through ProgramEntry input selection logic.
  • New HCP input adapter

    • Added HcpTerraformPlanInput to:
      • require TFE_TOKEN
      • optionally use TFE_ADDRESS (default https://app.terraform.io)
      • resolve run → plan relationship
      • fetch plan JSON output
      • return actionable errors for auth/HTTP/payload failures
  • Tests

    • Added mocked HTTP tests for:
      • successful run-id flow
      • missing token
      • non-success HTTP responses
      • malformed/unexpected payloads
      • HTTPS validation for TFE_ADDRESS
  • Docs / examples

    • Updated CLI/help docs for HCP mode and env vars.
    • Added example usage: examples/hcp-run-id/README.md.

Notes

  • This PR intentionally does not change markdown rendering behavior.
  • Branch history was squashed to a single commit for clean review.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b9bb212c6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 903f912722

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 171ba14d25

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ded8f08cbd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bbca371529

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e71ab8a4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d1d43a8a51

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: af7976c581

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dwizzle204 dwizzle204 closed this Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Mar 21, 2026
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.

1 participant