1 Star 0 Fork 0

king/lottie-android

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
post_pr_comment.js 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
#! /usr/bin/env node
if (!process.env.TRAVIS_REPO_SLUG) {
process.exit(0);
}
const https = require('https');
const postData = `{\"body\": \"**Snapshot Tests**\\nReport: https://happo.io/a/27/report/${process.env.GIT_SHA}-android26\\nDiff: https://happo.io/a/27/compare/master-android26/${process.env.GIT_SHA}-android26\"}`
const options = {
hostname: 'api.github.com',
path: `/repos/${process.env.TRAVIS_REPO_SLUG}/issues/${process.env.TRAVIS_PULL_REQUEST}/comments`,
port: 443,
method: 'POST',
headers: {
Authorization: `token ${process.env.GITHUB_ACCESS_TOKEN}`,
'Content-Length': postData.length,
'User-Agent': 'Travis/1.6.8 (Mac OS X 10.9.2 like Darwin; Ruby 2.1.1; RubyGems 2.0.14) Faraday/0.8.9 Typhoeus/0.6.7.'
}
};
const req = https.request(options, res => {
console.log('statusCode:', res.statusCode);
console.log('headers:', res.headers);
res.on('data', d => {
process.stdout.write(d);
});
res.on('error', e => {
process.stderr.write(e);
})
})
req.write(postData);
req.end();
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wjx1018960145/lottie-android.git
git@gitee.com:wjx1018960145/lottie-android.git
wjx1018960145
lottie-android
lottie-android
master

搜索帮助