Skip to content

Comments

feat: add artifacts and deployment visibility for pipelines and merge requests#353

Open
oleksiigolikov wants to merge 3 commits intozereight:mainfrom
Corporate-Finance-Institute:feature/deployment-artifacts-env-mr-summary
Open

feat: add artifacts and deployment visibility for pipelines and merge requests#353
oleksiigolikov wants to merge 3 commits intozereight:mainfrom
Corporate-Finance-Institute:feature/deployment-artifacts-env-mr-summary

Conversation

@oleksiigolikov
Copy link
Contributor

Implements pipeline artifact tools, deployment/environment tools, and compact deployment summary in get_merge_request.

oleksiicfi and others added 2 commits February 23, 2026 11:48
…acts

Adds three new MCP tools for working with GitLab job artifacts:
- list_job_artifacts: List files in a job's artifact archive (tree endpoint)
- download_job_artifacts: Download entire artifact archive (zip) to local disk
- get_job_artifact_file: Retrieve content of a single file from artifacts

These tools enable investigating failed pipeline jobs by downloading and
inspecting their artifacts locally, which is essential for CI/CD debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@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: 1ca3622027

ℹ️ 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".

package.json Outdated
"format:check": "prettier --check \"**/*.{js,ts,json,md}\""
},
"dependencies": {
"@esbuild/darwin-arm64": "^0.27.3",

Choose a reason for hiding this comment

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

P1 Badge Remove darwin-only esbuild package from dependencies

Adding @esbuild/darwin-arm64 as a top-level dependency makes installation fail on non-macOS ARM hosts (e.g., Linux/Windows), because this package is platform-specific rather than cross-platform tooling. The repo’s own lockfile already models it as an optional platform package under esbuild; making it direct here can block npm install for many users before the server can run.

Useful? React with 👍 / 👎.

index.ts Outdated
const effectiveProjectId = getEffectiveProjectId(projectId);

const url = new URL(
`${getEffectiveApiUrl()}/projects/${encodeURIComponent(effectiveProjectId)}/jobs/${jobId}/artifacts/${artifactPath}`

Choose a reason for hiding this comment

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

P2 Badge Encode artifact path when building artifact file URL

The URL is built with raw artifactPath, so filenames containing reserved URL characters (notably # or ?) are parsed as fragment/query delimiters by new URL(...) and the request path is truncated. In those cases get_job_artifact_file returns 404 even though the artifact exists; the path needs encoding (while preserving / separators) before interpolation.

Useful? React with 👍 / 👎.

Comment on lines 5115 to 5117
const savePath = localPath ? path.join(localPath, filename) : filename;

fs.writeFileSync(savePath, Buffer.from(buffer));

Choose a reason for hiding this comment

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

P2 Badge Create destination directories before writing artifact zip

download_job_artifacts writes directly to savePath without creating parent directories, so passing a new local_path (e.g., artifacts/run-42) throws ENOENT and the download fails. Since the tool accepts a directory target, it should ensure path.dirname(savePath) exists before writeFileSync.

Useful? React with 👍 / 👎.

@oleksiigolikov
Copy link
Contributor Author

oleksiigolikov commented Feb 23, 2026

Implemented follow-up fixes from review and CI:

  • Removed accidental direct dependency on @esbuild/darwin-arm64 (fixes Linux npm ci EBADPLATFORM failures).
  • Hardened download_job_artifacts to create destination directories before writing archives.
  • Hardened get_job_artifact_file by URL-encoding artifact path segments while preserving /.
  • Added tests for nested directory creation and reserved characters in artifact paths.

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.

2 participants