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
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
NODE_ENV=production
PORT=8000
GITHUB_TOKEN=your-token-here
GITHUB_ORGANIZATION=org-name
GITHUB_REPOSITORY=repo-name
JIRA_HOST=https://<your-project>.atlassian.net
JIRA_API_TOKEN=your-jira-api-token-here
JIRA_ISSUER_EMAIL=your-email@example.com
JIRA_PROJECT=DEV
JIRA_PROJECT_ID=10000
JIRA_DONE_TRANSITION_ID=31
JIRA_DONE_STATUS_NAME=Done
JIRA_DEFAULT_ISSUE_TYPE_ID=10000
JIRA_CUSTOM_GITHUB_REPOSITORY_FIELD=10001
JIRA_CUSTOM_GITHUB_ISSUE_NUMBER_FIELD=10002
# Optional: Comma-separated mappings for syncing assignees between platforms
# Format: githubusername1:jiraaccountid1,githubusername2:jiraaccountid2
GITHUB_JIRA_USER_MAPPINGS=
60 changes: 60 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copilot Instructions for IssueForge

## Build, Test, and Lint Commands

- **Install dependencies:**
- `yarn install` (root)
- **Build all packages:**
- `yarn build` (root)
- `lerna run build` (root)
- **Build individual package:**
- `yarn workspace <package> build` (e.g., `yarn workspace @IssueForge/webhooks build`)
- **Start webhooks service:**
- `yarn start:webhooks` (root)
- `yarn workspace @IssueForge/webhooks start`
- Production: `yarn start:webhooks:prod` (root)
- **Start bot service:**
- `yarn start:bot` (root)
- `yarn workspace @IssueForge/bot start`
- **Expose local server for webhook testing:**
- `yarn start:expose` (root)
- **Run tests (bot package):**
- `yarn workspace @IssueForge/bot test`
- Run a single test: Use Jest's `--testNamePattern` or `--runTestsByPath` options
- **Linting:**
- No explicit lint command found; check package scripts for updates

## High-Level Architecture

- **Monorepo structure** managed by Lerna and Yarn workspaces.
- **Core packages:**
- `bot`: Probot-based bot for syncing GitHub and Jira issues
- `webhooks`: Handles webhook events and synchronization logic
- `handlers`: Business logic for issue and comment sync
- `clients`: API clients for GitHub/Jira
- `db`: SQLite-based mapping and persistence layer
- `utils`: Shared utilities
- **Synchronization:**
- Bi-directional sync for issues and comments between GitHub and Jira
- Uses structured logging, error handling, and infinite loop prevention
- **Deployment:**
- Docker support for both root and bot package
- `docker-compose.yml` for local orchestration

## Key Conventions

- **TypeScript:** All packages use TypeScript; build with `tsc`
- **Structured logging:** Timestamps and context included
- **Infinite loop prevention:** Control labels and comment markers
- **User mapping:** Assignee sync uses explicit user mapping
- **Error handling:** Robust error logs for failures
- **Database:** SQLite for mapping comment/user IDs
- **Branching:** Create feature branches for PRs; follow commit message conventions

## Integration with Other AI Assistant Configs

- No other AI assistant config files detected (Claude, Cursor, Codex, Windsurf, Aider, Cline)

---

This file summarizes build/test commands, architecture, and conventions for Copilot. Would you like to adjust anything or add coverage for areas I may have missed? If you want to configure MCP servers (e.g., Playwright for web projects), let me know.
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build --if-present
- run: npm test --if-present
- run: yarn install --frozen-lockfile
- run: yarn build
# - run: yarn workspace @IssueForge/bot test
env:
CI: true
# - name: Show test log output
# run: cat packages/bot/test/*.log || echo "No log file found"
8 changes: 4 additions & 4 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

env:
IMAGE_NAME: octosync
IMAGE_NAME: IssueForge

jobs:
build:
Expand All @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 18
- name: Install dependencies
run: npm install && npm run build
- name: Release
Expand All @@ -52,7 +52,7 @@ jobs:

push_to_registry:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-deploy]')"
name: Build and push Octosync's image to GHCR
name: Build and push IssueForge's image to GHCR
runs-on: ubuntu-latest
needs: build
steps:
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,8 @@ dist
.yarn/install-state.gz
.pnp.*

# octosync
build
# IssueForge
build

IssueForge.db
.DS_Store
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at marcelovicentegc@gmail.com. All
reported by contacting the project team at mhowlett@applied-ml.dev. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM node:14
FROM node:18-alpine

SHELL ["/bin/bash", "-c"]
SHELL ["/bin/sh", "-c"]

# Install build dependencies for better-sqlite3
RUN apk add --no-cache python3 make g++

RUN mkdir -p /app
WORKDIR /app
Expand All @@ -9,16 +12,17 @@ WORKDIR /app
COPY package.json /app/package.json
COPY yarn.lock /app/yarn.lock
COPY packages/clients/package.json /app/packages/clients/package.json
COPY packages/db/package.json /app/packages/db/package.json
COPY packages/handlers/package.json /app/packages/handlers/package.json
COPY packages/utils/package.json /app/packages/utils/package.json
COPY packages/webhooks/package.json /app/packages/webhooks/package.json

COPY lerna.json /app/lerna.json
RUN ["/bin/bash", "-c", "yarn install"]
RUN yarn install

# Bundle app source
COPY . /app
RUN ["/bin/bash", "-c", "yarn build"]
RUN yarn build

EXPOSE 8000
CMD [ "yarn", "start:webhooks:prod" ]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Marcelo Cardoso
Copyright (c) 2021 Matthew Howlett

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading