
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
gulp-github
Advanced tools
A gulp plugin to comment jscs/jshint/eslint issues to a github pull request.
npm install gulp-github
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
jscs = require('gulp-jscs'),
eslint = require('gulp-eslint'),
github = require('gulp-github');
gulp.task('lint_report_github', function () {
return gulp.src('lib/*.js')
.pipe(jshint())
.pipe(jscs()).on('error', function (E) {
console.log(E.message); // This handled jscs stream error.
})
.pipe(eslint())
.pipe(github(options)) // Comment issues in github PR!
.pipe(github.failThisTask()); // Fail this task when jscs/jshint/eslint issues found.
});
// Or, direct output your comment with same options
github.commentToPR('Yes! it works!!', options);
// Or, direct set status to a commit
github.createStatusToCommit({
description: 'No! 2 failures...',
context: 'my gulp task',
state: 'failure',
target_url: 'http://www.homerswebpage.com/'
}, options);
// Or, create a task to reject PR with merged commits
gulp.task('git_rules', function (cb) {
git.failMergedPR(options, cb);
});
{
// Required options: git_token, git_repo
// refer to https://help.github.com/articles/creating-an-access-token-for-command-line-use/
git_token: 'your_github_oauth_token',
// comment into this repo, this pr.
git_repo: 'zordius/test',
git_prid: '1',
// create status to this commit, optional
git_sha: 00000000,
jshint_status: 'error', // Set status to error when jshint errors, optional
jscs_status: 'failure', // Set git status to failure when jscs errors, optional
eslint_status: 'error', // Set git status to error when eslint errors, optional
// when using github enterprise, optional
git_option: {
// refer to https://www.npmjs.com/package/github for more options
host: 'github.mycorp.com',
// You may require this when you using Enterprise Github
pathPrefix: '/api/v3'
},
// Provide your own jshint reporter, optional
jshint_reporter: function (E, file) { // gulp stream file object
// refer to http://jshint.com/docs/reporters/ for E structure.
return 'Error in ' + E.file + '!';
},
// Provide your own jscs reporter, optional
jscs_reporter: function (E, file) { // gulp stream file object
// refer to https://github.com/jscs-dev/node-jscs/wiki/Error-Filters for E structure.
return 'Error in ' + E.filename + '!';
}
}
Check this sample gulpfile to see how to migrate this with travis CI.
Check This PR to see live demo.
FAQs
A gulp plugin to pipe contents to github pull request comments.
The npm package gulp-github receives a total of 2 weekly downloads. As such, gulp-github popularity was classified as not popular.
We found that gulp-github demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.