/
octopull.js
40 lines (34 loc) · 893 Bytes
/
octopull.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const octopull = require('octopull')
const current_repo = process.argv[2]
const repos = [
'sandbox',
'sandbox2',
].filter(repo => repo != current_repo).map(repo => {
return {
owner: 'pomu0325',
repo: repo,
defaultBranch: 'main',
platform: 'github'
}
})
const branch = process.argv[3]
const title = process.argv[4]
const message = process.argv[5]
const options = {
files: [
'hello.sh',
'scripts/octopull.js',
'.github/workflows/octopull.yml',
],
branch: branch, // autogenerated if blank
message: title, // autogenerated if blank
// OPTIONAL
pullRequest: {
title: title, // autogenerated if blank
body: message.replace(/\\n/g, '\n'), // autogenerated if blank
// OPTIONAL
// assignees: ['username1', 'username2']
// reviewers: ['username3', 'username4']
}
}
repos.forEach((config) => octopull.commit(config, options))