ci(release): rename codiumai/pr-agent to pragent/pr-agent#2360
ci(release): rename codiumai/pr-agent to pragent/pr-agent#2360
Conversation
Review Summary by QodoRename Docker image namespace from codiumai/pr-agent to pragent/pr-agent
WalkthroughsDescription• Rename Docker image namespace from codiumai/pr-agent to pragent/pr-agent • Update CI workflows to use new registry namespace for consistency • Update installation and security documentation with new image references • Update GitHub Action base image to pull from new namespace Diagramflowchart LR
old["codiumai/pr-agent"]
new["pragent/pr-agent"]
workflows["CI Workflows"]
docs["Documentation"]
action["GitHub Action"]
old -- "rename to" --> new
new --> workflows
new --> docs
new --> action
File Changes1. .github/workflows/publish.yml
|
Code Review by Qodo
1. E2E repo path mismatch
|
| ```bash | ||
| docker build -f /docker/Dockerfile -t pr-agent:gitea_app --target gitea_app . | ||
| docker push codiumai/pr-agent:gitea_webhook # Push to your Docker repository | ||
| docker push pragent/pr-agent:gitea_webhook # Push to your Docker repository |
There was a problem hiding this comment.
1. Gitea push tag mismatch 🐞 Bug ≡ Correctness
docs/docs/installation/gitea.md builds the image as pr-agent:gitea_app but then pushes pragent/pr-agent:gitea_webhook, which will fail because that tag was never built or retagged.
Agent Prompt
### Issue description
`docs/docs/installation/gitea.md` instructs users to build an image tagged `pr-agent:gitea_app` and then push `pragent/pr-agent:gitea_webhook`. As written, `docker push` will fail because the pushed tag was never built locally.
### Issue Context
This was surfaced while renaming the Docker Hub namespace; the push target was updated but the build/tag flow in the snippet was not.
### Fix Focus Areas
- docs/docs/installation/gitea.md[29-31]
(Adjust the snippet so the `docker build -t ...` tag matches the `docker push ...` tag, or add an explicit `docker tag ...` step before pushing.)
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| ```bash | ||
| docker build . -t gitlab_pr_agent --target gitlab_webhook -f docker/Dockerfile | ||
| docker push codiumai/pr-agent:gitlab_webhook # Push to your Docker repository | ||
| docker push pragent/pr-agent:gitlab_webhook # Push to your Docker repository |
There was a problem hiding this comment.
2. Gitlab push tag mismatch 🐞 Bug ≡ Correctness
docs/docs/installation/gitlab.md builds the image tagged gitlab_pr_agent but then pushes pragent/pr-agent:gitlab_webhook, which will fail unless the image is retagged to that name first.
Agent Prompt
### Issue description
`docs/docs/installation/gitlab.md` tells users to build an image as `gitlab_pr_agent` and then push `pragent/pr-agent:gitlab_webhook`. Without a `docker tag gitlab_pr_agent pragent/pr-agent:gitlab_webhook` step (or building with the final tag), the push will fail.
### Issue Context
The push destination was updated as part of the Docker Hub namespace rename, but the build tag in the snippet remained unchanged.
### Fix Focus Areas
- docs/docs/installation/gitlab.md[77-80]
(Update the snippet so build and push use the same tag, or add a retagging step before pushing.)
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Pull request overview
This PR migrates all documented and CI references of the PR-Agent Docker image from the codiumai/pr-agent namespace to pragent/pr-agent, aligning workflows, docs, and the GitHub Action’s base image with the new Docker Hub repository.
Changes:
- Updated GitHub workflows to build/test/publish images under
pragent/pr-agent. - Updated the GitHub Action Dockerfile base image to pull from
pragent/pr-agent:github_action. - Updated installation/security/docs references (
docker run,image:, anddocker://...) to the new namespace.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/publish.yml |
Publishes release tags to pragent/pr-agent:* instead of codiumai/pr-agent:*. |
.github/workflows/build-and-test.yaml |
Uses pragent/pr-agent:test for local CI build + unit tests. |
.github/workflows/code_coverage.yaml |
Uses pragent/pr-agent:test for local CI build + coverage run. |
.github/workflows/e2e_tests.yaml |
Uses pragent/pr-agent:test for local CI build + E2E runs. |
Dockerfile.github_action_dockerhub |
Switches GitHub Action base image to pragent/pr-agent:github_action. |
SECURITY.md |
Updates pinned example image reference to the new namespace. |
docs/docs/tools/help_docs.md |
Updates docker://... example image reference to the new namespace. |
docs/docs/installation/locally.md |
Updates local docker run examples to pull from pragent/pr-agent. |
docs/docs/installation/github.md |
Updates GitHub Action docker://... examples and Docker Hub link to the new namespace. |
docs/docs/installation/gitlab.md |
Updates GitLab pipeline image: and push/tag examples to the new namespace. |
docs/docs/installation/bitbucket.md |
Updates Bitbucket pipeline image: and push examples to the new namespace. |
docs/docs/installation/azure.md |
Updates Azure pipeline container image to the new namespace. |
docs/docs/installation/gitea.md |
Updates Docker push example to the new namespace. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -76,7 +76,7 @@ git clone https://github.com/the-pr-agent/pr-agent.git | |||
|
|
|||
| ```bash | |||
| docker build . -t gitlab_pr_agent --target gitlab_webhook -f docker/Dockerfile | |||
| @@ -27,7 +27,7 @@ git clone https://github.com/the-pr-agent/pr-agent.git | |||
|
|
|||
| ```bash | |||
| docker build -f /docker/Dockerfile -t pr-agent:gitea_app --target gitea_app . | |||
| For maximum security, you can specify the Docker image using its digest: | ||
|
|
||
| ```yaml | ||
| steps: | ||
| - name: PR Agent action step | ||
| id: pragent | ||
| uses: docker://codiumai/pr-agent@sha256:14165e525678ace7d9b51cda8652c2d74abb4e1d76b57c4a6ccaeba84663cc64 | ||
| uses: docker://pragent/pr-agent@sha256:14165e525678ace7d9b51cda8652c2d74abb4e1d76b57c4a6ccaeba84663cc64 | ||
| ``` |
| For enhanced security, you can also specify the Docker image by its [digest](https://hub.docker.com/repository/docker/pragent/pr-agent/tags): | ||
| ```yaml | ||
| ... | ||
| steps: | ||
| - name: PR Agent action step | ||
| id: pragent | ||
| uses: docker://codiumai/pr-agent@sha256:14165e525678ace7d9b51cda8652c2d74abb4e1d76b57c4a6ccaeba84663cc64 | ||
| uses: docker://pragent/pr-agent@sha256:14165e525678ace7d9b51cda8652c2d74abb4e1d76b57c4a6ccaeba84663cc64 | ||
| ... |
8c6d72a to
ca02e14
Compare
|
Persistent review updated to latest commit ca02e14 |
| if git diff --quiet pyproject.toml; then | ||
| echo "pyproject.toml already at $VERSION on $PUBLISHED_SHA; nothing to commit." | ||
| echo "bumped=false" >> "$GITHUB_OUTPUT" | ||
| echo "sha=$PUBLISHED_SHA" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
| git add pyproject.toml | ||
| git commit -m "chore(release): bump version to $VERSION [skip ci]" | ||
| if git push origin "HEAD:refs/heads/main"; then | ||
| echo "bumped=true" >> "$GITHUB_OUTPUT" | ||
| echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "::warning::main has moved past the published commit ($PUBLISHED_SHA); skipping bump push and tag-move so the tag continues to point at built artifacts. Bump pyproject.toml on main manually: git checkout main && python scripts/set_pyproject_version.py $VERSION && git commit -am 'chore(release): bump version to $VERSION' && git push" | ||
| echo "bumped=false" >> "$GITHUB_OUTPUT" | ||
| echo "sha=$PUBLISHED_SHA" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Create tag and GitHub Release (workflow_dispatch only) | ||
| if: github.event_name == 'workflow_dispatch' | ||
| env: | ||
| GH_TOKEN: ${{ secrets.RELEASE_TOKEN || secrets.GITHUB_TOKEN }} | ||
| TAG: ${{ needs.prepare.outputs.tag }} | ||
| SHA: ${{ steps.commit.outputs.sha }} | ||
| run: | | ||
| if gh release view "$TAG" >/dev/null 2>&1; then | ||
| echo "Release $TAG already exists; not recreating." | ||
| else | ||
| gh release create "$TAG" --target "$SHA" --title "$TAG" --generate-notes | ||
| fi |
There was a problem hiding this comment.
1. Tag targets unbumped commit 🐞 Bug ≡ Correctness
In workflow_dispatch publishes, if the version-bump commit cannot be pushed (non-fast-forward), the workflow still creates a tag/release targeting the pre-bump commit SHA. This can produce a release tag whose tree (pyproject.toml version) does not match the version used to build/publish PyPI and Docker artifacts.
Agent Prompt
### Issue description
On `workflow_dispatch`, the workflow can create a tag/Release pointing to `PUBLISHED_SHA` even when the bump commit couldn’t be pushed to `main`. That tag then references a commit whose `pyproject.toml` version may not match the version used to build/publish artifacts.
### Issue Context
In the `Commit & push bump` step, when `git push` fails, the step writes `sha=$PUBLISHED_SHA` to `$GITHUB_OUTPUT`. The subsequent `Create tag and GitHub Release` step always runs for `workflow_dispatch` and uses `--target "$SHA"`.
### Fix Focus Areas
- .github/workflows/publish.yml[218-252]
### Suggested fix approach
- Emit an explicit output like `can_tag=true/false` (or `push_succeeded=true/false`) from the commit step.
- Update the `Create tag and GitHub Release (workflow_dispatch only)` step to run only when tagging is safe (e.g., when the bump was not needed, or the bump commit was successfully pushed).
- If tagging isn’t safe, fail the workflow (or at minimum skip tag creation and emit an `::error::`) so a maintainer can rerun from a stable `main` state.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
ca02e14 to
b1d6757
Compare
|
Persistent review updated to latest commit b1d6757 |
b1d6757 to
2995ac1
Compare
|
Persistent review updated to latest commit 2995ac1 |
| repo_url = 'pragent/pr-agent-tests' | ||
| project = gl.projects.get(repo_url) |
There was a problem hiding this comment.
1. E2e repo path mismatch 🐞 Bug ≡ Correctness
tests/e2e_tests/test_gitlab_webhook.py now uses the GitLab project path pragent/pr-agent-tests, but other E2E tests still reference codiumai/Codium-ai for the same fixtures repo, so the GitLab E2E is likely to fail at gl.projects.get(repo_url) if the fixtures repo wasn’t migrated.
Agent Prompt
### Issue description
The GitLab E2E test hard-codes a different `pr-agent-tests` repo path (`pragent/pr-agent-tests`) than the rest of the E2E tests (`codiumai` / `Codium-ai`), which can break CI by failing to resolve the project.
### Issue Context
This PR is a Docker image namespace migration; the E2E fixtures repo namespace/org may not have moved.
### Fix Focus Areas
- tests/e2e_tests/test_gitlab_webhook.py[24-31]
### What to change
- Pick the canonical fixture repo location for `pr-agent-tests` and make the GitLab E2E test match it.
- (Optional but safer) centralize the fixture repo owner/path in one place (e.g., settings/env var) so future namespace changes don’t require updating multiple tests.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
2995ac1 to
77c6dda
Compare
The release pipeline now publishes images under pragent/pr-agent (see #2361). Update user-facing docs and the local :test tag in CI to match so docker pull / image: examples resolve to images that actually exist. RELEASE_NOTES.md is left as-is (historical record of past publishes). Code comments in bitbucket_provider.py / gitlab_provider.py reference git URLs (.git repos) not docker images, and tests/e2e_tests refers to codiumai/pr-agent-tests which is a separate fixtures repo — both intentionally untouched.
77c6dda to
2c5bbe1
Compare
|
Persistent review updated to latest commit 2c5bbe1 |
Summary
Renames the Docker image namespace from
codiumai/pr-agenttopragent/pr-agentacross docs, CI workflows, and the GitHub Action's base image.This PR is stacked on top of #2359 (release workflow) — the base is set to
ci/release-workflowso the diff shows only the rename. Once #2359 merges tomain, retarget this PR's base tomain(GitHub will offer this automatically) and merge.Why split from #2359
#2359 should land first publishing under the existing
codiumai/pr-agentnamespace so we can validate the release flow against the registry users currently depend on. Once verified, this PR migrates the namespace.Changed in this PR
.github/workflows/publish.yml— registry tags switch topragent/pr-agentDockerfile.github_action_dockerhub— base image flips topragent/pr-agent:github_action(so the GitHub Action stays in sync after the migration).github/workflows/build-and-test.yaml,code_coverage.yaml,e2e_tests.yaml— local:testtag uses the new namespace for consistencySECURITY.md,docs/docs/installation/{azure,bitbucket,gitea,github,gitlab,locally}.md,docs/docs/tools/help_docs.md— user-facingdocker pull/image:referencesIntentionally NOT changed
RELEASE_NOTES.md— historical record of past publishes under the old namespacepr_agent/git_providers/{bitbucket_provider,gitlab_provider}.py— thecodiumai/pr-agentstrings in those files are git-URL examples in code comments (bitbucket.org/codiumai/pr-agent.git,gitlab.com/codiumai/pr-agent.git), not Docker imagestests/e2e_tests/test_gitlab_webhook.py—'codiumai/pr-agent-tests'is a separate fixtures repoTest plan
main(or let GitHub auto-retarget once base merges).pragent/pr-agent:*and thataction.yaml(viaDockerfile.github_action_dockerhub) pulls cleanly.DOCKERHUB_TOKENsecret has write access to thepragentnamespace before merging.