Skip to content

artifact: add PR body generator example#208

Merged
ProfRandom92 merged 1 commit into
mainfrom
feat/pr-body-example-artifact
May 22, 2026
Merged

artifact: add PR body generator example#208
ProfRandom92 merged 1 commit into
mainfrom
feat/pr-body-example-artifact

Conversation

@ProfRandom92
Copy link
Copy Markdown
Owner

Adds a deterministic Markdown example artifact for the PR body generator.

Validation:

  • python -m compileall -q scripts/pr_body_from_agent_bundle.py scripts/generate_pr_body_from_agent_bundle_example.py
  • pytest tests/test_pr_body_from_agent_bundle.py -q

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a deterministic PR body Markdown example along with a generation script and a regression test to ensure the committed artifact remains in sync with the generator. A review comment correctly identified that the artifact path in the test file is relative, which could lead to environment-dependent failures; a code suggestion was provided to anchor the path to the repository root for better robustness.

from scripts.generate_pr_body_from_agent_bundle_example import generate_pr_body_from_agent_bundle_example

ARTIFACT_PATH = Path("artifacts/agent_artifact_bundle_example.json")
PR_BODY_ARTIFACT_PATH = Path("artifacts/pr_body_from_agent_bundle_example.md")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The path PR_BODY_ARTIFACT_PATH is defined as a relative path. This makes the test environment-dependent and likely to fail if executed from a directory other than the repository root (e.g., from within the tests/ directory). It is recommended to anchor this path using the repository root. Since scripts.pr_body_from_agent_bundle (imported as pr_body) already calculates and exposes REPO_ROOT, you can use it here for consistency and robustness.

Suggested change
PR_BODY_ARTIFACT_PATH = Path("artifacts/pr_body_from_agent_bundle_example.md")
PR_BODY_ARTIFACT_PATH = pr_body.REPO_ROOT / "artifacts" / "pr_body_from_agent_bundle_example.md"

@ProfRandom92 ProfRandom92 merged commit ef3d39b into main May 22, 2026
7 checks passed
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