Fix Gitea issue ID/URL being wrong

Internal issue IDs are different from the public ones in Gitea. The one
used in URLs etc. is called "number" instead of "id" in hook payloads.

fixes #33
This commit is contained in:
Basti 2019-04-28 13:01:09 +01:00
parent 23033b3813
commit c390fc9ce7
No known key found for this signature in database
GPG Key ID: BE4634D632D39B67

View File

@ -85,7 +85,7 @@ module.exports = async function(robot, kredits) {
async function handleGiteaIssueClosed(data) {
const issue = data.issue;
const repoName = data.repository.full_name;
const web_url = `${data.repository.html_url}/issues/${issue.id}`;
const web_url = `${data.repository.html_url}/issues/${issue.number}`;
const description = `${repoName}: ${issue.title}`;
const amount = amountFromLabels(issue.labels);
const assignees = issue.assignees ? issue.assignees.map(a => a.login) : [];