FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
algorithms/scripts/git-commit.js at master · AllAlgorithms/algorithms · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Sep 7, 2025. It is now read-only.
AllAlgorithms
/
algorithms
Public archive
Notifications
You must be signed in to change notification settings
Fork
57
Star
172
Code
Issues
4
Pull requests
4
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
algorithms
/
scripts
/
git-commit.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (34 loc) · 894 Bytes
Breadcrumbs
algorithms
/
scripts
/
git-commit.js
Copy path
File metadata and controls
37 lines (34 loc) · 894 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
/**
* Git add all the repositories.
*
*
@author
Carlos Abraham Hernandez (abranhe.com) <abraham@abranhe.com>
*/
'use strict'
;
const
exist
=
require
(
'dtfe'
)
;
const
chalk
=
require
(
'chalk'
)
;
const
shell
=
require
(
'shelljs'
)
;
const
commandExists
=
require
(
'command-exists'
)
;
const
repos
=
require
(
'../repos.json'
)
;
const
args
=
process
.
argv
.
slice
(
2
)
;
const
commitMessage
=
args
[
0
]
||
'refactofing!'
;
commandExists
(
'git'
)
.
then
(
(
)
=>
{
if
(
!
exist
(
'./projects'
)
)
{
shell
.
mkdir
(
'./projects'
)
;
}
shell
.
cd
(
'./projects'
)
;
try
{
repos
.
forEach
(
(
repo
)
=>
{
if
(
exist
(
repo
)
)
{
shell
.
cd
(
repo
)
;
shell
.
exec
(
`git ci -m '
${
commitMessage
}
'`
)
;
shell
.
cd
(
'../'
)
;
}
}
)
;
}
catch
(
_
)
{
console
.
log
(
chalk
.
red
(
'Something went wrong.'
)
)
;
}
}
)
.
catch
(
(
_
)
=>
{
console
.
log
(
chalk
.
red
(
`'git' is required!`
)
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL