Skip to content
Source
Sign inSign up

Share an artifact

Code and repositories / Artifacts

Share an artifact

Your agent's plan is ready, and now your team must read it, or a person outside the team must see it before you start. A new artifact is private, so you share it. Share it on its target for everyone who can see the issue, or make a link for anyone who has it.

4 min read

To share on the target, you need to be the creator of the artifact or have write access. To make a share link, you need write access.

1. Share it on its target

  1. Open the artifact: from the Artifacts tab of the repository, or from the Artifacts section of the issue or pull request.
  2. Click Share on and its target, for example Share on issue #12.

The badge changes from Private to Shared. Everyone who can see the issue now sees the artifact in its Artifacts section.

If you do not have write access, your share can wait for a review, as your comments do. The badge then shows Waiting for review. The artifact shows on its target after the review. If the review refuses it, the badge shows Not shared, and only a person with write access can share it.

A share link lets anyone who has it read the artifact, also without an account. They cannot comment on it or change it.

  1. Click Share link on the page of the artifact.
  2. Under The link shows, pick one:
    • The latest version: each new version shows on the link.
    • Version 3 only: the version on the page. It never changes.
  3. Click Make link.
  4. Copy the link, and send it to the reader.

Important

The dialog shows the link only once. If you lose it, revoke it and make a new one.

If you see a note in place of Share link, it says why you cannot make a link now:

  • Share links are off for the repository. A repository admin turns them on: see Set share links and allowed hosts.
  • The artifact has no version yet.
  • The artifact waits for review.
  1. Click Share link.
  2. Under Links, find the link. Each link shows what it shows, who made it and when, and its state: Live or Revoked.
  3. Click Revoke on the link.

Done

Your team sees the plan on the issue, and the reader outside the team opens it with the link at /artifacts/s/<token>. The page says "You can view this artifact because you have its share link. You can only read it here."

A link works until one of these happens:

  • A person with write access, or the creator of the artifact, revokes it.
  • Someone deletes the artifact. A delete revokes all its links.
  • Link sharing is turned off for the repository or the organization. When it is on again, the links work again.

Warning

Make private does not stop the links. A link also works for a private artifact. To stop a link, revoke it.

A link works only in a browser. REST, MCP and git refuse it.

From a terminal or an agent

src artifact takes the number of the artifact in the repository. src artifact list shows it.

You want tosrcMCP toolREST, under /api/v1/repos/{owner}/{repo}/artifact-pages
Share it on its targetsrc artifact share 3share_repo_artifactPUT /{n}/share
Make it private againsrc artifact unshare 3unshare_repo_artifactDELETE /{n}/share
Make a link to the latest versionsrc artifact link create 3create_repo_artifact_linkPOST /{n}/links
Make a link to version 2 onlysrc artifact link create 3 --version 2create_repo_artifact_link, with version: 2POST /{n}/links, body {"version": 2}
List the linkssrc artifact link list 3list_repo_artifact_linksGET /{n}/links
Revoke a linksrc artifact link revoke 3 <link-id>revoke_repo_artifact_linkDELETE /{n}/links/{id}
  • The token of a link shows only in the answer that makes it.
  • For an artifact of an account, add --owner <name> to src. Use the MCP tools with account in their name, and the REST routes under /api/v1/accounts/{owner}/artifact-pages. See Show artifacts on your profile.