Skip to content


A RepoRef identifies a repository.


  • owner the higher-level entity containing a repository. Organization, user, project - it goes by different names in different version control managers.
  • repo the repository name
  • url full location of this repository. Could be file:// or http(s)://
  • path? if you only want to work with a directory within the repository, put the relative path here.
  • sha? commit SHA within that repository. Optional; default to the tip of the default branch
  • branch? if you want to work from a branch other than the default, put its name here

Usually Atomist works with a RemoteRepoRef, which adds cloneUrl and apiUrl for communicating to version control.

Get a RepoRef


Use [GitHubRepoRef][apidoc-ghrr].from({...}) to instantiate a RepoRef for either or GitHub Enterprise.

Provide the usual RepoRef properties except:

  • instead of url, provide rawApiBase to post to your GitHub Enterprise instance.


On-prem and online BitBucket work differently.s

BitBucket Server

For on-prem BitBucket, use new [BitBucketServerRepoRef][apidoc-bbsrr](...).

Pass it:

  • remoteBase where is your BitBucket?
  • owner the BitBucket user or project
  • repo string
  • isProject? true if the owner is a project; false if the owner is a user
  • sha? string
  • path? string

Set the branch on the returned object if you don’t want the default one.

BitBucket Cloud

For BitBucket Cloud, use new [BitBucketRepoRef][apidoc-bbrr](...).

For Testing

You can usually use any of the concrete instances for local testing, with dummy information.