Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitlab的issues评论 #30

Open
sky5454 opened this issue Jun 26, 2021 · 1 comment
Open

gitlab的issues评论 #30

sky5454 opened this issue Jun 26, 2021 · 1 comment

Comments

@sky5454
Copy link

sky5454 commented Jun 26, 2021

async function handleNote(body, robotid) {
    const robot = new ChatRobot(
        robotid || config.chatid
    );
    const { user, project, issue, object_attributes, repository } = body;
    const { noteable_type, url } = object_attributes;
    if (noteable_type === 'Issue') {
        const mdMsg = `${user.name} 评论了[${repository.name}](${repository.url})的issue[${issue.title}]
                        评论${object_attributes.note}
                        [查看详情](${url})`
        await robot.sendMdMsg(mdMsg);
    }
    return;
}

仅支持文字,gitlab8中文社区版

新增对 ISSUE 评论的支持(标题、ISSUE名 )

@LeoEatle
Copy link
Owner

这些可以自己随意修改,把我的云函数代码当成一个模板就好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants