hungry-ghost-hive 0.40.1 → 0.40.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -546,6 +546,29 @@ When you select Jira during `hive init`, the setup wizard will:
|
|
|
546
546
|
4. **Select a board** — picks the board used for sprint operations
|
|
547
547
|
5. **Detect story points field** — auto-detects the correct custom field for story points (varies between classic and next-gen projects)
|
|
548
548
|
|
|
549
|
+
#### Setting up your Atlassian OAuth app
|
|
550
|
+
|
|
551
|
+
Before running `hive init`, you must configure an OAuth 2.0 (3LO) app in the Atlassian Developer Console:
|
|
552
|
+
|
|
553
|
+
1. Go to [developer.atlassian.com/console/myapps](https://developer.atlassian.com/console/myapps/) and create a new app
|
|
554
|
+
2. Under **Authorization** → **OAuth 2.0 (3LO)**, add the following callback URL:
|
|
555
|
+
```
|
|
556
|
+
http://127.0.0.1:9876/callback
|
|
557
|
+
```
|
|
558
|
+
> **Important:** Use `127.0.0.1` — not `localhost`. Hive constructs the redirect URI with `127.0.0.1` explicitly, and Atlassian validates it character-for-character.
|
|
559
|
+
3. Under **Permissions**, add the following scopes:
|
|
560
|
+
|
|
561
|
+
| API | Scopes |
|
|
562
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
563
|
+
| Jira API | `read:jira-work`, `write:jira-work`, `read:jira-user` |
|
|
564
|
+
| Jira Software API | `read:board-scope:jira-software`, `write:board-scope:jira-software`, `read:sprint:jira-software`, `write:sprint:jira-software` |
|
|
565
|
+
| Confluence API | `read:confluence-content.all` |
|
|
566
|
+
| User Identity API | `offline_access` |
|
|
567
|
+
|
|
568
|
+
4. Save your changes, then copy the **Client ID** and **Client Secret** from the app's settings page — the `hive init` wizard will prompt you for these
|
|
569
|
+
|
|
570
|
+
> **Prerequisite:** Your Atlassian account must have an active Jira Cloud site. If you don't have one, create a free site at [atlassian.com](https://www.atlassian.com) before proceeding.
|
|
571
|
+
|
|
549
572
|
Configuration is saved to `.hive/hive.config.yaml`:
|
|
550
573
|
|
|
551
574
|
```yaml
|
|
@@ -682,6 +705,8 @@ We appreciate contributions from everyone! This project is built and maintained
|
|
|
682
705
|
<tr>
|
|
683
706
|
<td align="center"><a href="https://github.com/nikrich"><img src="https://avatars.githubusercontent.com/u/8254123?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nikrich</b></sub></a><br /><a href="https://github.com/nikrich/hungry-ghost-hive/commits?author=nikrich" title="Code">💻</a> <a href="https://github.com/nikrich/hungry-ghost-hive/commits?author=nikrich" title="Documentation">📖</a> <a href="#infra-nikrich" title="Infrastructure">🚀</a> <a href="#maintenance-nikrich" title="Maintenance">🚧</a></td>
|
|
684
707
|
<td align="center"><a href="https://github.com/aleeuwen73"><img src="https://avatars.githubusercontent.com/u/73424841?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alastair van Leeuwen</b></sub></a><br /><a href="https://github.com/nikrich/hungry-ghost-hive/commits?author=aleeuwen73" title="Code">💻</a></td>
|
|
708
|
+
<td align="center"><a href="https://github.com/tzone85"><img src="https://avatars.githubusercontent.com/u/6205552?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Thando Mini</b></sub></a><br /><a href="https://github.com/nikrich/hungry-ghost-hive/commits?author=tzone85" title="Code">💻</a> <a href="https://github.com/nikrich/hungry-ghost-hive/commits?author=tzone85" title="Security">🛡️</a></td>
|
|
709
|
+
<td align="center"><a href="https://github.com/verigateart"><img src="https://avatars.githubusercontent.com/u/219031990?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Arthur</b></sub></a><br /><a href="https://github.com/nikrich/hungry-ghost-hive/commits?author=verigateart" title="Code">💻</a></td>
|
|
685
710
|
</tr>
|
|
686
711
|
</table>
|
|
687
712
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Open a URL in the user's default browser
|
|
2
|
+
* Open a URL in the user's default browser, or a specific browser if the
|
|
3
|
+
* BROWSER environment variable is set (e.g. BROWSER="Google Chrome" on macOS).
|
|
3
4
|
* Falls back silently if the browser cannot be opened.
|
|
4
5
|
*/
|
|
5
6
|
export declare function openBrowser(url: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-browser.d.ts","sourceRoot":"","sources":["../../src/utils/open-browser.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"open-browser.d.ts","sourceRoot":"","sources":["../../src/utils/open-browser.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B5D"}
|
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
// Licensed under the Hungry Ghost Hive License. See LICENSE.
|
|
2
|
-
import {
|
|
2
|
+
import { execFile } from 'child_process';
|
|
3
3
|
/**
|
|
4
|
-
* Open a URL in the user's default browser
|
|
4
|
+
* Open a URL in the user's default browser, or a specific browser if the
|
|
5
|
+
* BROWSER environment variable is set (e.g. BROWSER="Google Chrome" on macOS).
|
|
5
6
|
* Falls back silently if the browser cannot be opened.
|
|
6
7
|
*/
|
|
7
8
|
export async function openBrowser(url) {
|
|
8
|
-
const
|
|
9
|
+
const browserEnv = process.env.BROWSER;
|
|
10
|
+
let bin;
|
|
11
|
+
let args;
|
|
12
|
+
if (process.platform === 'darwin') {
|
|
13
|
+
if (browserEnv) {
|
|
14
|
+
bin = 'open';
|
|
15
|
+
args = ['-a', browserEnv, url];
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
bin = 'open';
|
|
19
|
+
args = [url];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else if (process.platform === 'win32') {
|
|
23
|
+
bin = 'cmd';
|
|
24
|
+
args = browserEnv ? ['/c', 'start', '', browserEnv, url] : ['/c', 'start', '', url];
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
bin = browserEnv ?? 'xdg-open';
|
|
28
|
+
args = [url];
|
|
29
|
+
}
|
|
9
30
|
return new Promise(resolve => {
|
|
10
|
-
|
|
31
|
+
execFile(bin, args, err => {
|
|
11
32
|
if (err) {
|
|
12
|
-
// Don't throw - caller should print the URL as fallback
|
|
13
33
|
console.warn(`Could not open browser automatically. Please open the URL manually.`);
|
|
14
34
|
}
|
|
15
35
|
resolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-browser.js","sourceRoot":"","sources":["../../src/utils/open-browser.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"open-browser.js","sourceRoot":"","sources":["../../src/utils/open-browser.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW;IAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;IAEvC,IAAI,GAAW,CAAC;IAChB,IAAI,IAAc,CAAC;IAEnB,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAClC,IAAI,UAAU,EAAE,CAAC;YACf,GAAG,GAAG,MAAM,CAAC;YACb,IAAI,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,GAAG,GAAG,MAAM,CAAC;YACb,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;IACH,CAAC;SAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACxC,GAAG,GAAG,KAAK,CAAC;QACZ,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;IACtF,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,UAAU,IAAI,UAAU,CAAC;QAC/B,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IAED,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE;YACxB,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC;YACtF,CAAC;YACD,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
// Licensed under the Hungry Ghost Hive License. See LICENSE.
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { execFile } from 'child_process';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Open a URL in the user's default browser
|
|
6
|
+
* Open a URL in the user's default browser, or a specific browser if the
|
|
7
|
+
* BROWSER environment variable is set (e.g. BROWSER="Google Chrome" on macOS).
|
|
7
8
|
* Falls back silently if the browser cannot be opened.
|
|
8
9
|
*/
|
|
9
10
|
export async function openBrowser(url: string): Promise<void> {
|
|
10
|
-
const
|
|
11
|
-
|
|
11
|
+
const browserEnv = process.env.BROWSER;
|
|
12
|
+
|
|
13
|
+
let bin: string;
|
|
14
|
+
let args: string[];
|
|
15
|
+
|
|
16
|
+
if (process.platform === 'darwin') {
|
|
17
|
+
if (browserEnv) {
|
|
18
|
+
bin = 'open';
|
|
19
|
+
args = ['-a', browserEnv, url];
|
|
20
|
+
} else {
|
|
21
|
+
bin = 'open';
|
|
22
|
+
args = [url];
|
|
23
|
+
}
|
|
24
|
+
} else if (process.platform === 'win32') {
|
|
25
|
+
bin = 'cmd';
|
|
26
|
+
args = browserEnv ? ['/c', 'start', '', browserEnv, url] : ['/c', 'start', '', url];
|
|
27
|
+
} else {
|
|
28
|
+
bin = browserEnv ?? 'xdg-open';
|
|
29
|
+
args = [url];
|
|
30
|
+
}
|
|
12
31
|
|
|
13
32
|
return new Promise(resolve => {
|
|
14
|
-
|
|
33
|
+
execFile(bin, args, err => {
|
|
15
34
|
if (err) {
|
|
16
|
-
// Don't throw - caller should print the URL as fallback
|
|
17
35
|
console.warn(`Could not open browser automatically. Please open the URL manually.`);
|
|
18
36
|
}
|
|
19
37
|
resolve();
|