42 lines
976 B
Markdown
42 lines
976 B
Markdown
|
|
# Workflows
|
||
|
|
|
||
|
|
YouTrack workflows for Workflows
|
||
|
|
|
||
|
|
## Setup
|
||
|
|
|
||
|
|
1. Install dependencies: `npm install`
|
||
|
|
2. Get permanent token from your YouTrack instance (Profile → Authentication → New Token)
|
||
|
|
3. Create `.env` file with your credentials:
|
||
|
|
```env
|
||
|
|
YOUTRACK_BASE_URL=https://your-youtrack-instance.com
|
||
|
|
YOUTRACK_TOKEN=perm:your-permanent-token-here
|
||
|
|
```
|
||
|
|
4. Verify setup: `npx ytw list`
|
||
|
|
|
||
|
|
## Usage
|
||
|
|
|
||
|
|
- **Add new workflow**: `npx ytw add`
|
||
|
|
- **Sync workflows**: `npx ytw sync`
|
||
|
|
- **Push changes**: `npx ytw push`
|
||
|
|
- **Pull from YouTrack**: `npx ytw pull`
|
||
|
|
- **Watch for changes**: `npx ytw sync --watch`
|
||
|
|
|
||
|
|
## TypeScript Support
|
||
|
|
|
||
|
|
Generate YouTrack type definitions for your project:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
npx ytw types
|
||
|
|
```
|
||
|
|
|
||
|
|
This creates TypeScript definitions in the `types` directory that can be used via JSDoc annotations:
|
||
|
|
|
||
|
|
```js
|
||
|
|
/** @import { Issue, Project } from '../types/youtrack' */
|
||
|
|
```
|
||
|
|
|
||
|
|
## Scripts
|
||
|
|
|
||
|
|
- `npm run sync` - Sync workflows with YouTrack
|
||
|
|
- `npm run check` - Lint and type check
|