A Node.js application for integrating with Atlassian Jira, providing REST API endpoints and webhook handling.
- Create, read, update, and delete Jira issues and projects
- Webhook support for Jira events
- Status management and transitions
- User and project management
- Install dependencies:
npm install- Create a
.envfile:
ATLASSIAN_USERNAME=[email protected]
ATLASSIAN_API_KEY=your-api-token
DOMAIN=your-domain
PORT=3000Get your API token from Atlassian Account Settings.
Start the server:
npm startPOST /api/jira/webhook - Receives and processes Jira webhook events
Uncomment functions in app.js to use:
getUsersFunc()- Get all users (needed for account IDs)createProject("KEY")- Create a new projectcreateIssueAndUpdate()- Create issue and set status to "In Progress"getIssuesFunc()- Get all issuesgetRecentProjects()- Get recent projectsgetIssueByIDFunc('PROJ-1')- Get specific issuegetTransitionsFunc('PROJ-1')- Get available transitionsupdateStatusFunc('PROJ-1', '21')- Update status (11=To Do, 21=In Progress, 31=In Review, 41=Done)updateIssue1()- Update issue detailsdeleteIssueByIDFunc('PROJ-1')- Delete issue
- Go to Jira Project Settings → Webhooks
- Add webhook URL:
http://your-server:3000/api/jira/webhook - Select events to receive
- express, axios, dotenv, request