Skip to content

Commit

Permalink
[docs] multiple owners/maintainers
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenVoich committed Nov 18, 2024
1 parent fc0f5fc commit f9c9336
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 35 deletions.
20 changes: 20 additions & 0 deletions docs/docs/articles/03-package-owners-and-maintainers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
slug: /package-owners-and-maintainers
sidebar_label: Package owners and maintainers
---

# Package owners and maintainers

A package can have multiple owners and maintainers.

Owners have full control over the package, including the ability to publish new versions, add or remove owners, and maintainers. Maintainers can publish new versions, but they cannot add or remove owners or maintainers.

| Action | Owner | Maintainer |
|--------|-------|------------|
| Publish new versions | :heavy_check_mark: | :heavy_check_mark: |
| Add or remove owners | :heavy_check_mark: | :x: |
| Add or remove maintainers | :heavy_check_mark: | :x: |

Use [`mops owner`](/cli/mops-owner) command to manage owners of a package.

Use [`mops maintainer`](/cli/mops-maintainer) command to manage maintainers of a package.
50 changes: 50 additions & 0 deletions docs/docs/cli/2-publish/05-mops-owner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
slug: /cli/mops-owner
sidebar_label: mops owner
---

# `mops owner`

List, add or remove owners of a package.

:::info
Check the [Package owners and maintainers](/package-owners-and-maintainers) for more information.
:::

## `mops owner`
Manage owners of the current package.

### `mops owner list`

List all owners of the package.

### `mops owner add`

Add new package owner.
```
mops owner add <principal>
```

### `mops owner remove`

Remove package owner.
```
mops owner remove <principal>
```

## Example

Imagine you have a package named `hello` and you want to add the principal `2d2zu-vaaaa-aaaak-qb6pq-cai` as an owner.

mops.toml:
```toml
[package]
name = "hello"
version = "0.1.0"
...
```

Add the owner:
```
mops owner add 2d2zu-vaaaa-aaaak-qb6pq-cai
```
35 changes: 0 additions & 35 deletions docs/docs/cli/2-publish/05-mops-transfer-ownership.md

This file was deleted.

50 changes: 50 additions & 0 deletions docs/docs/cli/2-publish/06-mops-maintainer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
slug: /cli/mops-maintainer
sidebar_label: mops maintainer
---

# `mops maintainer`

List, add or remove maintainers of a package.

:::info
Check the [Package owners and maintainers](/package-owners-and-maintainers) for more information.
:::

## `mops maintainer`
Manage maintainers of the current package.

### `mops maintainer list`

List all maintainers of the package.

### `mops maintainer add`

Add new package maintainer.
```
mops maintainer add <principal>
```

### `mops maintainer remove`

Remove package maintainer.
```
mops maintainer remove <principal>
```

## Example

Imagine you have a package named `hello` and you want to add the principal `2d2zu-vaaaa-aaaak-qb6pq-cai` as a maintainer.

mops.toml:
```toml
[package]
name = "hello"
version = "0.1.0"
...
```

Add the maintainer:
```
mops maintainer add 2d2zu-vaaaa-aaaak-qb6pq-cai
```

0 comments on commit f9c9336

Please sign in to comment.