https://github.com/dragonish/gitea-label-sync
Sync the Gitea repo's label.
https://github.com/dragonish/gitea-label-sync
gitea label labels sync
Last synced: about 2 months ago
JSON representation
Sync the Gitea repo's label.
- Host: GitHub
- URL: https://github.com/dragonish/gitea-label-sync
- Owner: dragonish
- License: apache-2.0
- Created: 2025-08-12T12:26:38.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-08-12T12:31:14.000Z (7 months ago)
- Last Synced: 2025-08-12T22:37:55.663Z (7 months ago)
- Topics: gitea, label, labels, sync
- Language: TypeScript
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitea-label-sync
Sync the Gitea repo's label.
## Installation
```bash
npm install gitea-label-sync
```
## Usage
```js
import { GiteaLabelSync } from 'gitea-label-sync';
const gls = new GiteaLabelSync('', '');
gls.sync(
'',
[ /* labels */ ],
{ /* options */ }
);
```
## Types
### GiteaLabelConf
| Property | Type | Description |
| ------------- | ----------- | ------------------------------- |
| `name` | `string` | The name of the label. |
| `color` | `string` | The color of the label. |
| `description` | `string?` | The description of the label. |
| `exclusive` | `boolean?` | Whether the label is exclusive. |
| `is_archived` | `boolean?` | Whether the label is archived. |
| `aliases` | `string[]?` | The aliases of the label. |
| `delete` | `boolean?` | Whether to delete the label. |
### SyncOptions
| Property | Type | Description |
| ----------- | ------------------ | -------------------------------------------------------------------------- |
| `action` | `SyncAction?` | The action to perform during the sync process. default: `"syncAndDelete"`. |
| `duplicate` | `DuplicateAction?` | Handle duplicate labels in the repository. default: `"delete"`. |
| `dryRun` | `boolean?` | Whether to perform a dry run (no changes will be made). default: `false`. |
| `verbose` | `boolean?` | Whether to print verbose output during the sync process. defalut: `false`. |
#### SyncAction
- `"syncAndDelete"`: Syncs labels and deletes any that are not present.
- `"syncAndArchived"`: Syncs labels and archives any that are not present.
- `"onlySync"`: Process only the given labels.
#### DuplicateAction
- `"delete"`: Deletes the duplicate label in the repository.
- `"archive"`: Archives the duplicate label in the repository.
- `"keep"`: Keeps both labels in the repository.
## Credits
- [Financial-Times/github-label-sync](https://github.com/Financial-Times/github-label-sync)
## License
[Apache-2.0](./LICENSE)