Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @eldrforge/github-tools
# @grunnverk/github-tools

GitHub API utilities for automation - PR management, issue tracking, workflow monitoring.

Expand All @@ -16,13 +16,13 @@ GitHub API utilities for automation - PR management, issue tracking, workflow mo
## Installation

```bash
npm install @eldrforge/github-tools
npm install @grunnverk/github-tools
```

## Quick Start

```typescript
import { createPullRequest, mergePullRequest, getRepoDetails } from '@eldrforge/github-tools';
import { createPullRequest, mergePullRequest, getRepoDetails } from '@grunnverk/github-tools';

// Get repository details
const { owner, repo } = await getRepoDetails();
Expand Down Expand Up @@ -56,7 +56,7 @@ export GITHUB_TOKEN="ghp_your_token_here"
By default, github-tools uses a console-based logger. You can provide your own logger implementation (e.g., Winston):

```typescript
import { setLogger } from '@eldrforge/github-tools';
import { setLogger } from '@grunnverk/github-tools';
import winston from 'winston';

// Create Winston logger
Expand All @@ -75,7 +75,7 @@ setLogger(logger);
For interactive operations (like merge confirmations), you can provide a custom prompt function:

```typescript
import { setPromptFunction } from '@eldrforge/github-tools';
import { setPromptFunction } from '@grunnverk/github-tools';

// Custom prompt implementation
const myPrompt = async (message: string): Promise<boolean> => {
Expand All @@ -98,7 +98,7 @@ import {
findOpenPullRequestByHeadRef,
updatePullRequest,
mergePullRequest
} from '@eldrforge/github-tools';
} from '@grunnverk/github-tools';

// Create PR
const pr = await createPullRequest('title', 'body', 'head', 'base');
Expand All @@ -123,7 +123,7 @@ import {
createIssue,
getOpenIssues,
getRecentClosedIssuesForCommit
} from '@eldrforge/github-tools';
} from '@grunnverk/github-tools';

// Create issue
const issue = await createIssue(
Expand All @@ -146,7 +146,7 @@ import {
findMilestoneByTitle,
createMilestone,
closeMilestone
} from '@eldrforge/github-tools';
} from '@grunnverk/github-tools';

// Find existing milestone
const milestone = await findMilestoneByTitle('v1.0.0');
Expand All @@ -168,7 +168,7 @@ import {
createGitHubRelease,
getReleaseByTag,
getAllReleases
} from '@eldrforge/github-tools';
} from '@grunnverk/github-tools';

// Create release
await createGitHubRelease(
Expand All @@ -192,7 +192,7 @@ const allReleases = await getAllReleases();
import {
waitForWorkflowsToComplete,
getWorkflowRunsForCommit
} from '@eldrforge/github-tools';
} from '@grunnverk/github-tools';

// Wait for workflows to complete (with timeout)
await waitForWorkflowsToComplete('abc123', 300); // 5 minutes
Expand Down Expand Up @@ -291,7 +291,7 @@ npm run watch

## Dependencies

- **@eldrforge/git-tools**: Git operations and utilities
- **@grunnverk/git-tools**: Git operations and utilities
- **@octokit/rest**: GitHub API client
- **winston** (peer, optional): Logging framework

Expand All @@ -306,7 +306,7 @@ Tim O'Brien <tobrien@discursive.com>
## Related Projects

- [kodrdriv](https://github.com/grunnverk/kodrdriv) - AI-powered Git workflow automation tool
- [@eldrforge/git-tools](https://github.com/grunnverk/git-tools) - Git utilities for automation
- [@grunnverk/git-tools](https://github.com/grunnverk/git-tools) - Git utilities for automation


TEST
Expand Down
6 changes: 3 additions & 3 deletions guide/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @eldrforge/github-tools - Agentic Guide
# @grunnverk/github-tools - Agentic Guide

## Purpose

Expand All @@ -20,7 +20,7 @@ import {
createIssue,
publishReleaseNotes,
getPRStatus
} from '@eldrforge/github-tools';
} from '@grunnverk/github-tools';

// Create pull request
const pr = await createPullRequest({
Expand Down Expand Up @@ -51,7 +51,7 @@ await publishReleaseNotes({

## Dependencies

- @eldrforge/git-tools - Git operations
- @grunnverk/git-tools - Git operations
- @octokit/rest - GitHub API client

## Package Structure
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eldrforge/github-tools",
"version": "1.0.0",
"name": "@grunnverk/github-tools",
"version": "1.5.0",
"description": "GitHub API utilities for automation - PR management, issue tracking, workflow monitoring",
"main": "dist/index.js",
"type": "module",
Expand Down Expand Up @@ -45,7 +45,7 @@
"node": ">=24.0.0"
},
"dependencies": {
"@eldrforge/git-tools": "^1.0.0",
"@grunnverk/git-tools": "^1.5.0",
"@octokit/rest": "^22.0.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/github.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Octokit } from '@octokit/rest';
import { getLogger } from './logger';
import { PullRequest, MergeMethod, PromptFunction } from './types';
import { run } from '@eldrforge/git-tools';
import { run } from '@grunnverk/git-tools';

// Make promptConfirmation injectable
const defaultPrompt: PromptFunction = async (message: string) => {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @eldrforge/github-tools
* @grunnverk/github-tools
*
* GitHub API utilities for automation - PR management, issue tracking, workflow monitoring
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/checkWorkflowConfiguration.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Octokit } from '@octokit/rest';
import { describe, it, expect, vi, beforeEach, afterEach, type Mock } from 'vitest';
import * as child from '@eldrforge/git-tools';
import * as child from '@grunnverk/git-tools';
import { checkWorkflowConfiguration } from '../src/github';

vi.mock('@eldrforge/git-tools', () => ({
vi.mock('@grunnverk/git-tools', () => ({
run: vi.fn(),
}));

Expand Down
4 changes: 2 additions & 2 deletions tests/github.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Octokit } from '@octokit/rest';
import { afterEach, beforeEach, describe, expect, it, vi, type Mock } from 'vitest';
import * as child from '@eldrforge/git-tools';
import * as child from '@grunnverk/git-tools';
import * as GitHub from '../src/github';

vi.mock('@eldrforge/git-tools', () => ({
vi.mock('@grunnverk/git-tools', () => ({
run: vi.fn(),
runSecure: vi.fn(),
runSecureWithInheritedStdio: vi.fn(),
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default defineConfig({
},
rollupOptions: {
external: [
'@eldrforge/git-tools',
'@grunnverk/git-tools',
'@octokit/rest',
'winston'
],
Expand Down