Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@boennemann/github-change-remote-files
Advanced tools
Note: this is a temporary hack because I needed this to work real quick. It will (? should) eventually land upstream
This module allows you to change a single file in a repository on GitHub and create a new commit or pull-request from that change. This has little to no overhead, because it doesn't work with a local copy of the git repository – everything is done via the GitHub API.
Create a new commit:
githubChangeRemoteFile({
user: 'boennemann',
repo: 'animals',
filenames: ['.gitattributes', '.editorconfig']
transforms: [function (content) {
return createNewContent(content)
}, function () {
return createNewContent(content)
}],
token: '<github access token with sufficent rights>'
}, function (err, res) {
console.log(res.sha) // sha of the new commit
})
Create a new commit and send a PR:
githubChangeRemoteFile({
user: 'boennemann',
repo: 'animals',
filenames: ['.gitattributes', '.editorconfig']
transforms: [function (content) {
return createNewContent(content)
}, function () {
return createNewContent(content)
}],
token: '<github access token with sufficent rights>',
pr: {
title: 'Updated standard to latest version',
body: 'whatever'
}
}, function (err, res) {
console.log(res.html_url) // url of the pr
})
Create a new commit and push it on top of the (master) branch:
githubChangeRemoteFile({
user: 'boennemann',
repo: 'animals',
filenames: ['.gitattributes', '.editorconfig']
transforms: [function (content) {
return createNewContent(content)
}, function () {
return createNewContent(content)
}],
token: '<github access token with sufficent rights>',
push: true
}, function (err, res) {
console.log(res.object.url) // url of the new commit
})
FAQs
create a new commit with a changed file
The npm package @boennemann/github-change-remote-files receives a total of 0 weekly downloads. As such, @boennemann/github-change-remote-files popularity was classified as not popular.
We found that @boennemann/github-change-remote-files 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.