# RepositoryInfo

> Information about a repository that contains the source code of a package, including the repository type and URL.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.PackageManager](/engine/6000.3/script-reference/unityeditor/packagemanager.md)
* **Assembly:** UnityEditor

```csharp
public class RepositoryInfo
```

## Remarks

* This information is used mostly with Git repositories.
* All the properties can be null, for example when the repository information is not provided.

```csharp
using UnityEngine;
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;

[ExecuteInEditMode]
public class PackageRepositoryInfoExample : MonoBehaviour
{
    ListRequest m_ListRequest;

    void Start()
    {
        Debug.Log("Listing packages and getting their repository info...");
        m_ListRequest = Client.List();
    }
    void Update()
    {
        if (m_ListRequest != null && m_ListRequest.IsCompleted)
        {
            if (m_ListRequest.Status == StatusCode.Success)
            {
                foreach (var package in m_ListRequest.Result)
                {
                    var outputString = $"Dependencies for {package.name}:";
                    if (package.repository != null)
                    {
                        Debug.Log($"Repository info for {package.name}:" +
                            $"\n- Type: {package.repository.type}" +
                            $"\n- URL: {package.repository.url}" +
                            (string.IsNullOrEmpty(package.repository.revision) ? "" : $"\n- Revision: {package.repository.revision}"));
                    }
                }
            }
            m_ListRequest = null;
        }
    }
}
```

**Related information**

* [PackageInfo](/engine/6000.3/script-reference/unityeditor/packagemanager/packageinfo.md)
* [GitInfo](/engine/6000.3/script-reference/unityeditor/packagemanager/gitinfo.md)
* [Package Manifest](/engine/6000.3/manual/packages-list/cus-pkg-lp/cus-pkg-development/cus-pkg-manifest/upm-manifest-pkg.md)

## Properties

| Property                                                                                          | Description                                                                                           |
| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [path](/engine/6000.3/script-reference/unityeditor/packagemanager/repositoryinfo/path.md)         | The relative path to the package root in the repository, if it is different from the repository root. |
| [revision](/engine/6000.3/script-reference/unityeditor/packagemanager/repositoryinfo/revision.md) | The revision id corresponding to the package version.                                                 |
| [type](/engine/6000.3/script-reference/unityeditor/packagemanager/repositoryinfo/type.md)         | The type of the repository, e.g. git.                                                                 |
| [url](/engine/6000.3/script-reference/unityeditor/packagemanager/repositoryinfo/url.md)           | The url to the source code repository.                                                                |
