OtterMind/Chat2DB · error · Error
GH_PROJECT_TOKEN is required.
Error message
GH_PROJECT_TOKEN is required.
What it means
Error "GH_PROJECT_TOKEN is required." thrown in OtterMind/Chat2DB.
Source
Thrown at script/github/sync-community-project.js:41
}
return pullRequest.draft ? 'In Progress' : 'In Review';
}
function fallbackIssueStatus(issue) {
if (String(issue.state).toLowerCase() === 'closed') return 'Done';
const labels = new Set((issue.labels || []).map((label) => label.name || label));
return [...ELIGIBLE_LABELS].some((label) => labels.has(label)) ? 'Ready' : 'Backlog';
}
function issueEventStatus(action, issue) {
if (action === 'closed') return 'Done';
if (action === 'reopened') return fallbackIssueStatus(issue);
return 'Inbox';
}
class GitHubClient {
constructor({ token, repository, apiUrl = 'https://api.github.com' }) {
if (!token) throw new Error('GH_PROJECT_TOKEN is required.');
const [owner, repo] = String(repository || '').split('/');
if (!owner || !repo) throw new Error('GITHUB_REPOSITORY must be owner/repository.');
this.token = token;
this.owner = owner;
this.repo = repo;
this.apiUrl = apiUrl.replace(/\/$/, '');
}
async request(endpoint, { method = 'GET', body } = {}) {
const response = await fetch(`${this.apiUrl}${endpoint}`, {
method,
headers: {
Accept: 'application/vnd.github+json',
Authorization: `Bearer ${this.token}`,
'Content-Type': 'application/json',
'X-GitHub-Api-Version': '2022-11-28',
},
body: body === undefined ? undefined : JSON.stringify(body),View on GitHub (pinned to 5ee1e990e7)
Solutions
- Set the GH_PROJECT_TOKEN environment variable to a GitHub token with project read/write scope before running the script.
- In CI, add GH_PROJECT_TOKEN to the workflow env block from repository secrets.
When it happens
Trigger: The sync-community-project.js script started without GH_PROJECT_TOKEN defined in the environment.
Common situations: See trigger scenarios.
AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14).
Data as JSON: /api/errors/7ee3bfd5c928ed45.
Report an issue: GitHub.