Compare commits
632 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b97a9fe893 | ||
|
|
24b14e7659 | ||
|
|
db302697f8 | ||
|
|
744db5af4d | ||
|
|
c8bfb4ff65 | ||
|
|
2ad491f8e5 | ||
|
|
6883311425 | ||
|
|
e78426fc39 | ||
|
|
05c861957c | ||
|
|
9ff7798aa0 | ||
|
|
3b23368e0b | ||
|
|
4fd07a8ee2 | ||
|
|
53685330aa | ||
|
|
7a437dd3d9 | ||
|
|
cb041226ef | ||
|
|
ad45ba43fb | ||
|
|
e914420cec | ||
|
|
25b134cf68 | ||
|
|
c10002449f | ||
|
|
c7eeaf418e | ||
|
|
50e9817f15 | ||
|
|
9f7cf20ad4 | ||
|
|
29cdebd8d8 | ||
|
|
eeaeb4ee7b | ||
|
|
806eff9c6c | ||
|
|
4fd4ebb1a1 | ||
|
|
1488bbf60f | ||
|
|
ae3f4916c4 | ||
|
|
e5df44379d | ||
|
|
8d9e2551a8 | ||
|
|
618712b465 | ||
|
|
adf9d3d833 | ||
|
|
20fe0dc7f9 | ||
|
|
72f6e53268 | ||
|
|
d41df3cf95 | ||
|
|
b3fb60fa06 | ||
|
|
a3973579a5 | ||
|
|
fc70229fd7 | ||
|
|
6773ad24bd | ||
|
|
06d5ce7315 | ||
|
|
e401f2b3e7 | ||
|
|
3a7c05ee83 | ||
|
|
385d2d6d3a | ||
|
|
25ff3cc8fb | ||
|
|
90fb64e03a | ||
|
|
6e9dd5ddd5 | ||
|
|
f309cf59f7 | ||
|
|
0c7fc22deb | ||
|
|
8bd0710add | ||
|
|
77e8392b77 | ||
|
|
333a6eb0f2 | ||
|
|
e5287e06b1 | ||
|
|
7f650514d7 | ||
|
|
cba6741f01 | ||
|
|
30237071ab | ||
|
|
ff395b9380 | ||
|
|
29f94b7cce | ||
|
|
d4d066316a | ||
|
|
780b0df14e | ||
|
|
91b0f62409 | ||
|
|
f7edecabb7 | ||
|
|
68e252f6d5 | ||
|
|
22a5148239 | ||
|
|
f1e4faf559 | ||
|
|
a54a7342a8 | ||
|
|
6d81b3b072 | ||
|
|
5bf17ab674 | ||
|
|
1308272399 | ||
|
|
998652d28d | ||
|
|
66ecef4789 | ||
|
|
cbc4f17c16 | ||
|
|
ff41bd83fc | ||
|
|
f01349f789 | ||
|
|
0d52df43e8 | ||
|
|
9fc8e267d9 | ||
|
|
b7a37a1d30 | ||
|
|
d93b31c94f | ||
|
|
d56de922da | ||
|
|
d17f9e05d0 | ||
|
|
43f9ed2319 | ||
|
|
ecfc673e49 | ||
|
|
c5ea534638 | ||
|
|
19bc3334a6 | ||
|
|
625465ddfa | ||
|
|
56ba54f5eb | ||
|
|
27b19f81e0 | ||
|
|
d4433a238b | ||
|
|
c6058fcbe2 | ||
|
|
f290181c01 | ||
|
|
4d24efd108 | ||
|
|
89896039c8 | ||
|
|
ed576dbe8c | ||
|
|
8b817249e9 | ||
|
|
34260c9d7c | ||
|
|
02f7344d49 | ||
|
|
05ce3af6f3 | ||
|
|
c6b867bd0b | ||
|
|
4c184a79ea | ||
|
|
4250682bb5 | ||
|
|
8e591a749d | ||
|
|
050a667872 | ||
|
|
7fbfbfa278 | ||
|
|
0b47528fc7 | ||
|
|
a3279e7b72 | ||
|
|
0930a0f6f6 | ||
|
|
0e4f5f6417 | ||
|
|
d67ae5f689 | ||
|
|
2cbf8ebce9 | ||
|
|
6d7bd0506d | ||
|
|
e6dcd77d10 | ||
|
|
43eaf991fc | ||
|
|
61b52dba1f | ||
|
|
f53a7db16d | ||
|
|
72e246094f | ||
|
|
a9c53e5fc3 | ||
|
|
f9364915ea | ||
|
|
0d80c341c4 | ||
|
|
756d9ea820 | ||
|
|
cb4f06fa66 | ||
|
|
3d8fcf9529 | ||
|
|
664b419dc5 | ||
|
|
7b61ff5331 | ||
|
|
017fbd6dce | ||
|
|
2103e93ecc | ||
|
|
1a5e6d925d | ||
|
|
bfbc660a1b | ||
|
|
7ea52730bc | ||
|
|
0294aa039d | ||
|
|
b9360951d0 | ||
|
|
ab35b67df6 | ||
|
|
03fca92ff8 | ||
|
|
0e1feea77e | ||
|
|
f016b267be | ||
|
|
6fdb34ed01 | ||
|
|
bea30d7628 | ||
|
|
c989bf31e9 | ||
|
|
a790c74dfe | ||
|
|
90c92e18d6 | ||
|
|
b7e58855c4 | ||
|
|
4183cd85fa | ||
|
|
649affade7 | ||
|
|
d4d39927bf | ||
|
|
249b415d1b | ||
|
|
8e3afcf3c9 | ||
|
|
715ee20ac2 | ||
|
|
9b29ba5ec1 | ||
|
|
7d7466136c | ||
|
|
52d096458a | ||
|
|
40463d7b72 | ||
|
|
7392614f5c | ||
|
|
b1323b2f1c | ||
|
|
15c2ba6606 | ||
|
|
8c12ff729a | ||
|
|
5e435d82de | ||
|
|
7d94da29b1 | ||
|
|
f6438de30b | ||
|
|
fbeb5fd3a5 | ||
|
|
49756edd0d | ||
|
|
39badb77ba | ||
|
|
45a4ede867 | ||
|
|
502906541a | ||
|
|
0568295fb2 | ||
|
|
fe1e1da20c | ||
|
|
f6cc47a6d2 | ||
|
|
46020d9ef1 | ||
|
|
4b697d46a2 | ||
|
|
39cfc84aa6 | ||
|
|
e1bc13238c | ||
|
|
d77762158d | ||
|
|
2de1ed6ac4 | ||
|
|
314739c46f | ||
|
|
69da4fbdaf | ||
|
|
42c3cc63a5 | ||
|
|
323b81a282 | ||
|
|
95649ec874 | ||
|
|
75ae3f3b00 | ||
|
|
5a9731b8fa | ||
|
|
b1c040a8e3 | ||
|
|
e7b381e5b1 | ||
|
|
445402b323 | ||
|
|
9711082dae | ||
|
|
ba8cd550ed | ||
|
|
9d257a1a37 | ||
|
|
3649961bcb | ||
|
|
4d9c6e96c4 | ||
|
|
68050c9e64 | ||
|
|
fe4c39abb1 | ||
|
|
6310d67620 | ||
|
|
c735be1920 | ||
|
|
73382ae152 | ||
|
|
4393cf2c11 | ||
|
|
959be48ff3 | ||
|
|
93fa4f5cc2 | ||
|
|
5c82f36c45 | ||
|
|
c5fa67606e | ||
|
|
9614e36026 | ||
|
|
83f497690e | ||
|
|
d5067ccdaf | ||
|
|
45258c519b | ||
|
|
891d0d3f71 | ||
|
|
10f55d517a | ||
|
|
7fc3ba597b | ||
|
|
a32bf6a63e | ||
|
|
043279351f | ||
|
|
bc771e6c1d | ||
|
|
4bc8ca44f5 | ||
|
|
7fe81954dd | ||
|
|
0f29f11a25 | ||
|
|
b1b543f02f | ||
|
|
80cd6897bb | ||
|
|
b97a3a495e | ||
|
|
89725fcd74 | ||
|
|
078c8c02ac | ||
|
|
7c52819e02 | ||
|
|
4a2ad1578f | ||
|
|
275983970a | ||
|
|
c2654d6f08 | ||
|
|
528f445e38 | ||
|
|
8fb41ea727 | ||
|
|
aa55348a4b | ||
|
|
b70fe4ab9e | ||
|
|
173d574290 | ||
|
|
ba6889f70b | ||
|
|
d3dfb259f1 | ||
|
|
8869ee2fb3 | ||
|
|
4377bb38eb | ||
|
|
df4148f15a | ||
|
|
3718b8daa8 | ||
|
|
5511a2ed9d | ||
|
|
2da9ca5709 | ||
|
|
b2e24861f4 | ||
|
|
48c82f4dae | ||
|
|
1294315f5d | ||
|
|
24f3eda418 | ||
|
|
edd941f925 | ||
|
|
ee60873090 | ||
|
|
619b23ff62 | ||
|
|
50a489776c | ||
|
|
eddd081159 | ||
|
|
c4fb7bb8d6 | ||
|
|
2d7c2e89fc | ||
|
|
4c2a2620fa | ||
|
|
61c414aff4 | ||
|
|
587fa5a5d6 | ||
|
|
5451e40a77 | ||
|
|
581b7eb9b6 | ||
|
|
5b22413754 | ||
|
|
703aac3713 | ||
|
|
2591f685a2 | ||
|
|
366eced776 | ||
|
|
b2ad943ed9 | ||
|
|
bf5e32ae7d | ||
|
|
e2885277a1 | ||
|
|
7b6d1027a9 | ||
|
|
b4fa29cd69 | ||
|
|
44ad49f0a5 | ||
|
|
2bdc0a61a0 | ||
|
|
b1dfb478d7 | ||
|
|
6c2b50c246 | ||
|
|
3cbcd603a6 | ||
|
|
ea8b2e7ef9 | ||
|
|
2ef699642a | ||
|
|
88f3f3edfc | ||
|
|
cb134e499a | ||
|
|
4987a27882 | ||
|
|
5aac6ebaf9 | ||
|
|
de103249a8 | ||
|
|
9135e0cf47 | ||
|
|
7ecaaa9364 | ||
|
|
19cc5634e1 | ||
|
|
7242f6d3df | ||
|
|
245f959e32 | ||
|
|
f1c97a931c | ||
|
|
0ca78ab508 | ||
|
|
de0f67d9b6 | ||
|
|
a3adef035a | ||
|
|
e3d054462c | ||
|
|
ee9a9b3bd7 | ||
|
|
c698699df7 | ||
|
|
724766a764 | ||
|
|
eb4e956492 | ||
|
|
5c12301e2f | ||
|
|
0d2694bccc | ||
|
|
7f40311aeb | ||
|
|
c1404d189f | ||
|
|
3276c159ce | ||
|
|
d10f775791 | ||
|
|
bc9a4cf987 | ||
|
|
6d00245624 | ||
|
|
682e840606 | ||
|
|
369f404b6a | ||
|
|
6d400479e9 | ||
|
|
f519dbe2d8 | ||
|
|
7c4f8391e4 | ||
|
|
150689488d | ||
|
|
3edff1c959 | ||
|
|
8a5bf1f2c3 | ||
|
|
b7d8201cc4 | ||
|
|
d09e7e234b | ||
|
|
17dbbf433e | ||
|
|
95a1702b7a | ||
|
|
0d021d8d13 | ||
|
|
0cbeea6850 | ||
|
|
f7574eb56c | ||
|
|
99d8a21c83 | ||
|
|
913fd6894d | ||
|
|
de50d45399 | ||
|
|
e7ec8bd868 | ||
|
|
f1d41def84 | ||
|
|
78d8443c62 | ||
|
|
e49da51881 | ||
|
|
f4b07e6873 | ||
|
|
138434bf13 | ||
|
|
51d91f68e3 | ||
|
|
3e8da6e7cc | ||
|
|
82ec483431 | ||
|
|
701772d352 | ||
|
|
f5554ef7f0 | ||
|
|
17b09154e6 | ||
|
|
3883e0e350 | ||
|
|
d97b8ba941 | ||
|
|
7fe7d23a64 | ||
|
|
7451ee82a1 | ||
|
|
02188ba521 | ||
|
|
2ebdd90daa | ||
|
|
723820f876 | ||
|
|
dca126569c | ||
|
|
e78167ae29 | ||
|
|
d6639f85c1 | ||
|
|
8d2117abc3 | ||
|
|
b3c7c1e078 | ||
|
|
267e04bd5b | ||
|
|
fab2511822 | ||
|
|
57a540778b | ||
|
|
e59e7a1912 | ||
|
|
9c056146c1 | ||
|
|
1146c681e3 | ||
|
|
e3e22e1068 | ||
|
|
544fb5f507 | ||
|
|
60c76066ae | ||
|
|
b09a3f1699 | ||
|
|
299226adbb | ||
|
|
be3ffdfa40 | ||
|
|
ccb8558604 | ||
|
|
03660a0218 | ||
|
|
941a2d657a | ||
|
|
dbf207a670 | ||
|
|
234011c0f7 | ||
|
|
a536a7f5fc | ||
|
|
951eefe413 | ||
|
|
d7568d6287 | ||
|
|
a837bd27d9 | ||
|
|
9986de0edd | ||
|
|
a51640c51f | ||
|
|
d1d225c38f | ||
|
|
a26f63b0ce | ||
|
|
a71372f9dd | ||
|
|
7bdc8af1b2 | ||
|
|
5c9f1f7cef | ||
|
|
d84d80e417 | ||
|
|
4d73263e3e | ||
|
|
b8f7f0eada | ||
|
|
75a30a545a | ||
|
|
401756f9f0 | ||
|
|
21ed6afecd | ||
|
|
388ce4f475 | ||
|
|
a2ca498476 | ||
|
|
60e7d47c17 | ||
|
|
4215dc951b | ||
|
|
33836ed288 | ||
|
|
6fcd798e4a | ||
|
|
50a62d9e15 | ||
|
|
9e04524704 | ||
|
|
6f812a4e2c | ||
|
|
f11ed1f3d2 | ||
|
|
ab2f7e88a9 | ||
|
|
7209b6038a | ||
|
|
b17846f438 | ||
|
|
da58dc8f9a | ||
|
|
4e0f991445 | ||
|
|
b71678be3e | ||
|
|
f21bebd7d3 | ||
|
|
d0143fb99e | ||
|
|
d192ad0aba | ||
|
|
3bee5aeb33 | ||
|
|
5cb8787442 | ||
|
|
334c6c32a5 | ||
|
|
d4b7879e16 | ||
|
|
d8573f888f | ||
|
|
cac5e6ba5b | ||
|
|
655a68b116 | ||
|
|
524f96d401 | ||
|
|
28ab8fcce3 | ||
|
|
6da0ea7f9b | ||
|
|
11a529635a | ||
|
|
bc31c50167 | ||
|
|
07e991cfab | ||
|
|
0f3c8c6996 | ||
|
|
0f070625cd | ||
|
|
ed8cbae509 | ||
|
|
4b5a2df0dd | ||
|
|
c8e1fb0d1b | ||
|
|
fe1fb219a6 | ||
|
|
28fa18d5af | ||
|
|
a0873811e5 | ||
|
|
40e84d601c | ||
|
|
ec13f51fd9 | ||
|
|
3140d34146 | ||
|
|
3ed8463058 | ||
|
|
ea1d3cefff | ||
|
|
e298441a67 | ||
|
|
4387feb4b8 | ||
|
|
cfa65e13b2 | ||
|
|
eb9afeffe2 | ||
|
|
110b7e289f | ||
|
|
57c075ed5f | ||
|
|
dd36cc6914 | ||
|
|
15f07d3078 | ||
|
|
c0c96adb24 | ||
|
|
b36969554e | ||
|
|
0c6f4a1284 | ||
|
|
9358097a71 | ||
|
|
ed17cacb74 | ||
|
|
e0cd865b68 | ||
|
|
ed7b74af50 | ||
|
|
8c0903ea07 | ||
|
|
29856365a6 | ||
|
|
a7661122af | ||
|
|
1181181b70 | ||
|
|
32090e561e | ||
|
|
07a46e3fca | ||
|
|
b43e3143da | ||
|
|
9c99934303 | ||
|
|
34757b89f7 | ||
|
|
e3b93a10e2 | ||
|
|
b043969cfd | ||
|
|
101829e6c0 | ||
|
|
8cd8f9f071 | ||
|
|
c010bcbe2f | ||
|
|
1b176ae96b | ||
|
|
ecdc355d15 | ||
|
|
79fae44cb3 | ||
|
|
34b3c277a4 | ||
|
|
bd911ffe7e | ||
|
|
e6f30b78b7 | ||
|
|
9145a27b50 | ||
|
|
b5dec7ea76 | ||
|
|
0c4298a18d | ||
|
|
37e118a1f5 | ||
|
|
3088d83852 | ||
|
|
3f6e296fa8 | ||
|
|
82c397024b | ||
|
|
55e3676294 | ||
|
|
cbeb36fdb1 | ||
|
|
15954de18f | ||
|
|
1d34a38003 | ||
|
|
8693022acf | ||
|
|
c7b685622a | ||
|
|
56800c1fe2 | ||
|
|
d7ef3f3a99 | ||
|
|
e9dd7a4420 | ||
|
|
f5a3783aa2 | ||
|
|
208182ae37 | ||
|
|
f7d13fceb9 | ||
|
|
360b5ee4b9 | ||
|
|
6f5455c37d | ||
|
|
4e2f1656df | ||
|
|
5348e90423 | ||
|
|
a740f7e935 | ||
|
|
590bebf249 | ||
|
|
9650af1f95 | ||
|
|
ced56a7226 | ||
|
|
a988073222 | ||
|
|
88408e5833 | ||
|
|
27a89ad786 | ||
|
|
d5f44e7aeb | ||
|
|
52f10712cb | ||
|
|
51fc21c221 | ||
|
|
46b61e173e | ||
|
|
06d54462fa | ||
|
|
21a36873cf | ||
|
|
4d2a782ca7 | ||
|
|
feb7bba5df | ||
|
|
30fd5a24e7 | ||
|
|
4f4dea335c | ||
|
|
caecee358e | ||
|
|
79fc4adbf9 | ||
|
|
4fe29d7392 | ||
|
|
2b94f96e3e | ||
|
|
ab8370c244 | ||
|
|
61eda586c3 | ||
|
|
b34850c645 | ||
|
|
f0718670ec | ||
|
|
ce9997b52f | ||
|
|
8cb387e3de | ||
|
|
4d0876f6b0 | ||
|
|
34cf82b848 | ||
|
|
8cc88cd3ac | ||
|
|
c94b5af098 | ||
|
|
d992c49843 | ||
|
|
8a80768baa | ||
|
|
8b941d4dfd | ||
|
|
d5de9f3f0d | ||
|
|
2d9c41ae6b | ||
|
|
5560eecdc1 | ||
|
|
58530b3799 | ||
|
|
026e98aa42 | ||
|
|
c2e2293f44 | ||
|
|
08fe1b6e43 | ||
|
|
46d77cfa2d | ||
|
|
8feda109a1 | ||
|
|
7e9ca065e6 | ||
|
|
7acf8aea7c | ||
|
|
30fab2fa31 | ||
|
|
cbdf3e43f1 | ||
|
|
507713a63b | ||
|
|
c512c446c5 | ||
|
|
3067c9e15c | ||
|
|
85ed07244a | ||
|
|
13550b50b0 | ||
|
|
bf3210f533 | ||
|
|
6411f389b7 | ||
|
|
dec54c038c | ||
|
|
e109cd1639 | ||
|
|
ac2b74d9d0 | ||
|
|
d82f4d33b7 | ||
|
|
d926d1c554 | ||
|
|
8b797ba126 | ||
|
|
1b11953688 | ||
|
|
36bc3f778b | ||
|
|
c61b317dea | ||
|
|
22cdfa345a | ||
|
|
d4aeb9335d | ||
|
|
46569f991f | ||
|
|
83761c7e8e | ||
|
|
f0a1d2598a | ||
|
|
c902408157 | ||
|
|
6b705fa3a4 | ||
|
|
0e98be578d | ||
|
|
c07603c1c4 | ||
|
|
9cd6e9c0ea | ||
|
|
5bf921b386 | ||
|
|
beedcea439 | ||
|
|
6cb111a771 | ||
|
|
6a4387c9c9 | ||
|
|
132aa0f637 | ||
|
|
7dbb54bce3 | ||
|
|
7f1289bf4a | ||
|
|
88d475f304 | ||
|
|
98f4b8018b | ||
|
|
2f6a78549b | ||
|
|
9cd727829f | ||
|
|
f0fcdb07a3 | ||
|
|
5ead79aef9 | ||
|
|
72da43cf1b | ||
|
|
9eb0d21b0d | ||
|
|
2db75722ce | ||
|
|
68d0f64f6f | ||
|
|
d1cfc165c7 | ||
|
|
5f12f937cb | ||
|
|
2d77fa2c79 | ||
|
|
f6b13bc7e9 | ||
|
|
116c918fd3 | ||
|
|
fbbcae9aa5 | ||
|
|
7bd2b1ca10 | ||
|
|
61d14d1bee | ||
|
|
6a75638ec3 | ||
|
|
ff38b6c4a6 | ||
|
|
e67ce7f439 | ||
|
|
a83118880c | ||
|
|
a28158a63f | ||
|
|
30030e85c0 | ||
|
|
79fa1f9f98 | ||
|
|
06fd39b8b7 | ||
|
|
f278ec6d47 | ||
|
|
5a3f4c1c24 | ||
|
|
602bf4ea71 | ||
|
|
5148cf0f38 | ||
|
|
12febc42d8 | ||
|
|
de8a121ebd | ||
|
|
a2b49385e8 | ||
|
|
ea7cddff4f | ||
|
|
9acdb7d7f4 | ||
|
|
6d08b4f153 | ||
|
|
925751a406 | ||
|
|
d3ccc660f4 | ||
|
|
4d5fbad9c9 | ||
|
|
aa1a8cef82 | ||
|
|
df80e1746f | ||
|
|
e6702dc457 | ||
|
|
08a333fd51 | ||
|
|
570c13708e | ||
|
|
6354828f7b | ||
|
|
5f0bbb3e99 | ||
|
|
a32c180667 | ||
|
|
5ba43bd1de | ||
|
|
514b397571 | ||
|
|
0a723093dc | ||
|
|
f85bf9b85e | ||
|
|
2096009ef6 | ||
|
|
8063b07a5a | ||
|
|
dd4d657304 | ||
|
|
983180c6c6 | ||
|
|
aecfd6262a | ||
|
|
b5a17167bf | ||
|
|
c3549913c6 | ||
|
|
b4fc1efdd2 | ||
|
|
01b3042145 | ||
|
|
e5272e4c09 | ||
|
|
f118062594 | ||
|
|
d81e04e96c | ||
|
|
33d0a0858a | ||
|
|
5277b29cf2 | ||
|
|
463ebc38cb | ||
|
|
b99985e9be | ||
|
|
bfb772f923 | ||
|
|
b1b499b985 | ||
|
|
7a1f5ecb56 | ||
|
|
6d22917a33 | ||
|
|
cf96c454b6 | ||
|
|
98ce691ee3 | ||
|
|
abd5c01a4d | ||
|
|
f97486922d | ||
|
|
a34577c63e | ||
|
|
04cd48bddf | ||
|
|
2de99109b2 | ||
|
|
7f082ab428 | ||
|
|
782b6b1816 | ||
|
|
6a097ea13d | ||
|
|
bac719afe5 | ||
|
|
58ecc16393 | ||
|
|
0f9f6c2d95 |
468
.all-contributorsrc
Normal file
468
.all-contributorsrc
Normal file
@@ -0,0 +1,468 @@
|
||||
{
|
||||
"projectName": "add-and-commit",
|
||||
"projectOwner": "EndBug",
|
||||
"repoType": "github",
|
||||
"repoHost": "https://github.com",
|
||||
"files": [
|
||||
"README.md"
|
||||
],
|
||||
"imageSize": 100,
|
||||
"commit": true,
|
||||
"commitConvention": "angular",
|
||||
"contributors": [
|
||||
{
|
||||
"login": "EndBug",
|
||||
"name": "Federico Grandi",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/26386270?v=4",
|
||||
"profile": "https://github.com/EndBug",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jactor-rises",
|
||||
"name": "Tor Egil Jacobsen",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/14565088?v=4",
|
||||
"profile": "https://github.com/jactor-rises",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "yelizariev",
|
||||
"name": "Ivan Yelizariev",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/186131?v=4",
|
||||
"profile": "https://twitter.com/yelizariev",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jhhughes",
|
||||
"name": "jhhughes",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/13724293?v=4",
|
||||
"profile": "https://github.com/jhhughes",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "DmitrijOkeanij",
|
||||
"name": "Дмитрий Океаний",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/10674646?v=4",
|
||||
"profile": "https://sunengine.site",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "brahma-dev",
|
||||
"name": "Brahma Dev",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1793295?v=4",
|
||||
"profile": "https://github.com/brahma-dev",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "felixlapalma",
|
||||
"name": "Felix Rojo Lapalma",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/38389683?v=4",
|
||||
"profile": "https://github.com/felixlapalma",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "RobinWijnant",
|
||||
"name": "Robin Wijnant",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/33033209?v=4",
|
||||
"profile": "http://robinwijnant.me",
|
||||
"contributions": [
|
||||
"bug",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "onilton",
|
||||
"name": "Onilton Maciel",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/725676?v=4",
|
||||
"profile": "https://github.com/onilton",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jsoref",
|
||||
"name": "Josh Soref",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/2119212?v=4",
|
||||
"profile": "https://github.com/jsoref",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ToMe25",
|
||||
"name": "ToMe25",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/38815969?v=4",
|
||||
"profile": "https://github.com/ToMe25",
|
||||
"contributions": [
|
||||
"code",
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "JonasJacobsUserspace",
|
||||
"name": "JonasJacobsUserspace",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/59708720?v=4",
|
||||
"profile": "https://github.com/JonasJacobsUserspace",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "pvogt09",
|
||||
"name": "pvogt09",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/50047961?v=4",
|
||||
"profile": "https://github.com/pvogt09",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "connorjclark",
|
||||
"name": "Connor Clark",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/4071474?v=4",
|
||||
"profile": "http://hoten.cc",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Cyberbeni",
|
||||
"name": "Benedek Kozma",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/8356175?v=4",
|
||||
"profile": "https://github.com/Cyberbeni",
|
||||
"contributions": [
|
||||
"ideas",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "coffeegoddd",
|
||||
"name": "Dustin Brown",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/43383835?v=4",
|
||||
"profile": "https://github.com/coffeegoddd",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Chocrates",
|
||||
"name": "Chris McIntosh",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1758164?v=4",
|
||||
"profile": "https://github.com/Chocrates",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "kbsali",
|
||||
"name": "Kevin Saliou",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/53676?v=4",
|
||||
"profile": "https://github.com/kbsali",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ewjoachim",
|
||||
"name": "Joachim Jablon",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1457576?v=4",
|
||||
"profile": "https://github.com/ewjoachim",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "trallnag",
|
||||
"name": "Tim Schwenke",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/24834206?v=4",
|
||||
"profile": "https://github.com/trallnag",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "PssbleTrngle",
|
||||
"name": "Possible Triangle",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/12880806?v=4",
|
||||
"profile": "https://www.somethingcatchy.net",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ocean90",
|
||||
"name": "Dominik Schilling",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/617637?v=4",
|
||||
"profile": "https://dominikschilling.de",
|
||||
"contributions": [
|
||||
"ideas",
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "rugk",
|
||||
"name": "rugk",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/11966684?v=4",
|
||||
"profile": "https://chaos.social/@rugk",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "xenoterracide",
|
||||
"name": "Caleb Cushing",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/5517?v=4",
|
||||
"profile": "https://xenoterracide.com",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ruohola",
|
||||
"name": "Eero Ruohola",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/33625218?v=4",
|
||||
"profile": "https://ruohola.dev",
|
||||
"contributions": [
|
||||
"bug",
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "vincentchu12",
|
||||
"name": "Vincent Chu",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/23532586?v=4",
|
||||
"profile": "https://github.com/vincentchu12",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "CWSites",
|
||||
"name": "Matt H",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/1242102?v=4",
|
||||
"profile": "https://www.linkedin.com/in/cwsites",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "danielwerg",
|
||||
"name": "danielwerg",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/35052399?v=4",
|
||||
"profile": "https://github.com/danielwerg",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "koppor",
|
||||
"name": "Oliver Kopp",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/1366654?v=4",
|
||||
"profile": "https://orcid.org/0000-0001-6962-4290",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Glidias",
|
||||
"name": "Glenn Ko",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/190195?v=4",
|
||||
"profile": "https://github.com/Glidias",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "drewwells",
|
||||
"name": "Drew Wells",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/239123?v=4",
|
||||
"profile": "http://blog.madewithdrew.com/",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "JavierSegoviaCordoba",
|
||||
"name": "Javier Segovia Córdoba",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/7463564?v=4",
|
||||
"profile": "https://kotlin.desarrollador-android.com/",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Darylgolden",
|
||||
"name": "Darylgolden",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/9102529?v=4",
|
||||
"profile": "https://github.com/Darylgolden",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "mcargille",
|
||||
"name": "mcargille",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/20142895?v=4",
|
||||
"profile": "https://github.com/mcargille",
|
||||
"contributions": [
|
||||
"bug",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "secondmanveran",
|
||||
"name": "secondman",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/97000801?v=4",
|
||||
"profile": "https://github.com/secondmanveran",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "prince-chrismc",
|
||||
"name": "Chris Mc",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/16867443?v=4",
|
||||
"profile": "https://github.com/prince-chrismc",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Namyalg",
|
||||
"name": "Namya LG",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/53875297?v=4",
|
||||
"profile": "https://linkedin.com/in/namyalg",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "sconix",
|
||||
"name": "Janne Julkunen",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/921515?v=4",
|
||||
"profile": "https://github.com/sconix",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Josh-Cena",
|
||||
"name": "Joshua Chen",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/55398995?v=4",
|
||||
"profile": "https://joshcena.com",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Akimon658",
|
||||
"name": "Akimo",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/81888693?v=4",
|
||||
"profile": "http://akimon658.github.io",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "revolunet",
|
||||
"name": "Julien Bouquillon",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/124937?v=4",
|
||||
"profile": "https://revolunet.com",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "AvivPeledTalon",
|
||||
"name": "Aviv Peled",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/92471076?v=4",
|
||||
"profile": "https://github.com/AvivPeledTalon",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "onedr0p",
|
||||
"name": "Devin Buhl",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/213795?v=4",
|
||||
"profile": "https://github.com/onedr0p",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "melink14",
|
||||
"name": "Erek Speed",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/1176550?v=4",
|
||||
"profile": "https://erekspeed.com",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "kachkaev",
|
||||
"name": "Alexander Kachkaev",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/608862?v=4",
|
||||
"profile": "https://kachkaev.uk",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ManuelRauber",
|
||||
"name": "Manuel Rauber",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/740791?v=4",
|
||||
"profile": "https://manuel-rauber.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ggreif",
|
||||
"name": "Gabor Greif",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/1312006?v=4",
|
||||
"profile": "http://heisenbug.blogspot.com",
|
||||
"contributions": [
|
||||
"maintenance",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "keithrfung",
|
||||
"name": "Keith Fung",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/10125297?v=4",
|
||||
"profile": "http://keithrfung.dev",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "DenverCoder1",
|
||||
"name": "Jonah Lawrence",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/20955511?v=4",
|
||||
"profile": "https://freshidea.com/jonah",
|
||||
"contributions": [
|
||||
"bug",
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
"skipCi": true
|
||||
}
|
||||
36
.eslintrc.js
Normal file
36
.eslintrc.js
Normal file
@@ -0,0 +1,36 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
commonjs: true,
|
||||
es6: true,
|
||||
node: true
|
||||
},
|
||||
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
|
||||
globals: {},
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 6,
|
||||
sourceType: 'module'
|
||||
},
|
||||
plugins: ['@typescript-eslint'],
|
||||
ignorePatterns: ['lib/*'],
|
||||
rules: {
|
||||
'prettier/prettier': 'warn',
|
||||
'no-cond-assign': [2, 'except-parens'],
|
||||
'no-unused-vars': 0,
|
||||
'no-redeclare': 0,
|
||||
'@typescript-eslint/no-unused-vars': 1,
|
||||
'no-empty': [
|
||||
'error',
|
||||
{
|
||||
allowEmptyCatch: true
|
||||
}
|
||||
],
|
||||
'prefer-const': [
|
||||
'warn',
|
||||
{
|
||||
destructuring: 'all'
|
||||
}
|
||||
],
|
||||
'spaced-comment': 'warn'
|
||||
}
|
||||
}
|
||||
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
* text=auto eol=lf
|
||||
lib/* linguist-generated
|
||||
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [endbug] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
10
.github/ISSUE_TEMPLATE/blank-issue.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/blank-issue.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Blank issue
|
||||
about: Just a blank template
|
||||
title: ''
|
||||
labels: 'status: pending'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report an issue with the action
|
||||
title: ''
|
||||
labels: 'status: pending'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is. If a particular error is shown
|
||||
|
||||
**Workflow used**
|
||||
Provide a snippet of the workflow and/or a link to it (use the commit sha as the ref when you link it, so that it's not influenced by other changes). If you only share a section of the workflow, make sure it includes the step that uses the action!
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Logs**
|
||||
Either provide a link to the action run or (if your repo is private) paste here the logs from the step that uses it. If you paste the logs, please use this template, and remember to paste the logs from all the different sections.
|
||||
<details>
|
||||
<summary>Logs</summary>
|
||||
<pre><code>Your logs here.</code></pre>
|
||||
</details>
|
||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
10
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Question
|
||||
about: Ask a question on how to use the action
|
||||
title: ''
|
||||
labels: 'type: question'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
26
.github/dependabot.yml
vendored
Normal file
26
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: 'npm' # See documentation for possible values
|
||||
directory: '/' # Location of package manifests
|
||||
schedule:
|
||||
interval: 'weekly'
|
||||
commit-message:
|
||||
prefix: 'chore'
|
||||
include: 'scope'
|
||||
labels:
|
||||
- 'type: chore'
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
open-pull-requests-limit: 10
|
||||
commit-message:
|
||||
include: scope
|
||||
prefix: ci
|
||||
labels:
|
||||
- 'type: chore'
|
||||
74
.github/labels.yml
vendored
Normal file
74
.github/labels.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
- name: 'good first issue'
|
||||
color: '5319e7'
|
||||
description: 'Good for newcomers'
|
||||
aliases: []
|
||||
|
||||
- name: 'help wanted'
|
||||
color: '008672'
|
||||
description: 'Extra attention is needed'
|
||||
aliases: []
|
||||
|
||||
- name: 'status: pending'
|
||||
color: c5def5
|
||||
description: 'More info is needed before deciding what to do'
|
||||
aliases: []
|
||||
|
||||
- name: 'status: pinned'
|
||||
color: 0052cc
|
||||
description: 'Should not be labeled as stale'
|
||||
aliases: []
|
||||
|
||||
- name: 'status: stale'
|
||||
color: fbca04
|
||||
description: 'Inactive issues and PRs'
|
||||
aliases: ['stale']
|
||||
|
||||
- name: 'status: wontfix'
|
||||
color: cfd3d7
|
||||
description: 'This will not be worked on'
|
||||
aliases: ['wontfix']
|
||||
|
||||
- name: 'type: bug'
|
||||
color: d73a4a
|
||||
description: 'Verified problems that need to be worked on'
|
||||
aliases: ['bug']
|
||||
|
||||
- name: 'type: chore'
|
||||
color: C5DEF5
|
||||
description: 'Code changes that neither fix bugs nor add features (refactoring, dependency chnages, ...)'
|
||||
aliases: ['dependencies', 'type: dependencies', 'automation', 'type: automation']
|
||||
|
||||
- name: 'type: docs'
|
||||
color: C5DEF5
|
||||
description: "Documentation changes"
|
||||
aliases: ['documentation', 'maintenance', 'type: maintenance']
|
||||
|
||||
- name: 'type: duplicate'
|
||||
color: cfd3d7
|
||||
description: 'This issue or pull request already exists'
|
||||
aliases: ['duplicate']
|
||||
|
||||
- name: 'type: feature'
|
||||
color: 0E8A16
|
||||
description: 'New feature or feature request'
|
||||
aliases: ['enhancement', 'type: enhancement']
|
||||
|
||||
- name: 'type: fix'
|
||||
color: 1D76DB
|
||||
description: 'Updates to existing functionalities'
|
||||
aliases: ['fix']
|
||||
|
||||
- name: 'type: invalid'
|
||||
color: e4e669
|
||||
description: "This doesn't seem right"
|
||||
aliases: ['invalid']
|
||||
|
||||
- name: 'type: not a bug'
|
||||
color: 0e8a16
|
||||
description: 'Reports that happen not be our fault'
|
||||
aliases: ['not a bug']
|
||||
|
||||
- name: 'type: question'
|
||||
color: d876e3
|
||||
description: 'Further information is requested'
|
||||
aliases: ['question']
|
||||
60
.github/workflows/codeql-analysis.yml
vendored
Normal file
60
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '40 12 * * 2'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
# languages: go, javascript, csharp, python, cpp, java
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below).
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following
|
||||
# three lines and modify them (or add more) to build your code if your
|
||||
# project uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
22
.github/workflows/codesee-arch-diagram.yml
vendored
Normal file
22
.github/workflows/codesee-arch-diagram.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# This workflow was added by CodeSee. Learn more at https://codesee.io/
|
||||
# This is v2.0 of this workflow file
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
name: CodeSee
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
codesee:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
name: Analyze the repo with CodeSee
|
||||
steps:
|
||||
- uses: Codesee-io/codesee-action@v2
|
||||
with:
|
||||
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
|
||||
21
.github/workflows/export-labels.yml
vendored
Normal file
21
.github/workflows/export-labels.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Export label config
|
||||
on:
|
||||
# You can run this with every event, but it's better to run it only when you actually need it.
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
labels:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: EndBug/export-label-config@main
|
||||
with:
|
||||
# This is needed if you're dealing with private repos.
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Set this to `true` if you want to get the raw API reponse. Defaults to `false`.
|
||||
raw-result: false
|
||||
|
||||
# By default every label entry will have an `aliases` property set to an empty array.
|
||||
# It's for EndBug/label-sync, if you don't want it you cans set this to `false`
|
||||
add-aliases: true
|
||||
18
.github/workflows/label-sync.yml
vendored
Normal file
18
.github/workflows/label-sync.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Sync labels
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '.github/labels.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
name: Run EndBug/label-sync
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: EndBug/label-sync@v2
|
||||
with:
|
||||
config-file: '.github/labels.yml'
|
||||
9
.github/workflows/stale.yml
vendored
Normal file
9
.github/workflows/stale.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
name: 'Handle stale issues and PR'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '00 5,17 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
uses: EndBug/workflows/.github/workflows/stale.yml@main
|
||||
28
.github/workflows/test.yml
vendored
Normal file
28
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Test
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
13
.github/workflows/versioning.yml
vendored
Normal file
13
.github/workflows/versioning.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: Update tags
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published, edited]
|
||||
|
||||
jobs:
|
||||
actions-tagger:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- uses: Actions-R-Us/actions-tagger@v2
|
||||
with:
|
||||
publish_latest_tag: true
|
||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules
|
||||
build
|
||||
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
_
|
||||
5
.husky/pre-commit
Executable file
5
.husky/pre-commit
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npm run build
|
||||
git add lib
|
||||
7
.prettierrc
Normal file
7
.prettierrc
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"trailingComma": "none"
|
||||
}
|
||||
128
CODE_OF_CONDUCT.md
Normal file
128
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,128 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
fgrandi30@gmail.com.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
13
CONTRIBUTING.md
Normal file
13
CONTRIBUTING.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Contributing
|
||||
|
||||
If you want to contribute to this project, check out this steps!
|
||||
|
||||
1. Check out existing features to make sure your case is not already covered. Also, try [searching open or closed issues](https://github.com/EndBug/add-and-commit/issues) that may cover the same topic.
|
||||
2. Either [open a new issue](https://github.com/EndBug/add-and-commit/issues/new/choose) or comment on an existing one to let everyone know what you're working on.
|
||||
3. Edit the source files to implement your feature or fix.
|
||||
4. Build the action and test it in a test repo.
|
||||
5. Update the [action manifest](./action.yml) AND the [README](./README.md) with your changes.
|
||||
6. [Open a PR](https://github.com/EndBug/add-and-commit/compare).
|
||||
|
||||
Thanks! 💖
|
||||
|
||||
14
Dockerfile
14
Dockerfile
@@ -1,14 +0,0 @@
|
||||
FROM alpine/git:1.0.7
|
||||
|
||||
LABEL "com.github.actions.name"="Add & Commit"
|
||||
LABEL "com.github.actions.description"="Add & commit files from a path directly from GitHub Actions"
|
||||
LABEL "com.github.actions.icon"="git-commit"
|
||||
LABEL "com.github.actions.color"="black"
|
||||
|
||||
LABEL "repository"="https://github.com/EndBug/add-and-commit"
|
||||
LABEL "homepage"="https://github.com/EndBug/add-and-commit"
|
||||
LABEL "maintainer"="Federico Grandi <fgrandi30@gmail.com>"
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["sh", "/entrypoint.sh"]
|
||||
423
README.md
423
README.md
@@ -1,76 +1,409 @@
|
||||
# Add & Commit
|
||||
|
||||
You can use this GitHub Action to commit changes made in your workflow run directly to your repo: for example, you use it to lint your code, update documentation, commit updated builds and so on...
|
||||
[](#contributors-)
|
||||
|
||||
This is **heavily** inspired by [git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) (by [Stefan Zweifel](https://github.com/stefanzweifel)): that action automatically detects changed files and commits them. While this is useful for most situations, this doesn't commit untracked files and can sometimes commit unintended changes (such as `package-lock.json` or similar, that may have happened during previous steps).
|
||||
This action lets you choose the path that you want to use when adding & committing changes, so that it works as you would normally do using `git` on your machine.
|
||||
You can use this GitHub Action to commit changes made in your workflow run directly to your repo: for example, you use it to lint your code, update documentation, commit updated builds, etc...
|
||||
|
||||
## Usage
|
||||
## Table of contents
|
||||
|
||||
- [Inputs](#inputs)
|
||||
- [Outputs](#outputs)
|
||||
- [FAQs](#faqs)
|
||||
- [Examples](#examples)
|
||||
- [Contributors](#contributors-)
|
||||
|
||||
## Inputs
|
||||
|
||||
Add a step like this to your workflow:
|
||||
|
||||
```yaml
|
||||
- name: Commit changes # This is the step name that will be displayed in your runs
|
||||
uses: EndBug/add-and-commit@v1.0.0 # You can change this to use a specific version
|
||||
with: # See more info about inputs below
|
||||
author_name: Your Name
|
||||
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
|
||||
with:
|
||||
# The arguments for the `git add` command (see the paragraph below for more info)
|
||||
# Default: '.'
|
||||
add: 'src'
|
||||
|
||||
# The name of the user that will be displayed as the author of the commit.
|
||||
# Default: depends on the default_author input
|
||||
author_name: Author Name
|
||||
|
||||
# The email of the user that will be displayed as the author of the commit.
|
||||
# Default: depends on the default_author input
|
||||
author_email: mail@example.com
|
||||
message: "Your commit message"
|
||||
path: ./*.js
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
|
||||
|
||||
# Additional arguments for the git commit command. The --message argument is already set by the message input.
|
||||
# Default: ''
|
||||
commit: --signoff
|
||||
|
||||
# The name of the custom committer you want to use, if different from the author of the commit.
|
||||
# Default: the name of the author (set with either author_name or default_author)
|
||||
committer_name: Committer Name
|
||||
|
||||
# The email of the custom committer you want to use, if different from the author of the commit.
|
||||
# Default: the email of the author (set with either author_email or default_author)
|
||||
committer_email: mail@example.com
|
||||
|
||||
# The local path to the directory where your repository is located. You should use actions/checkout first to set it up.
|
||||
# Default: '.'
|
||||
cwd: './path/to/the/repo'
|
||||
|
||||
# Determines the way the action fills missing author name and email. Three options are available:
|
||||
# - github_actor -> UserName <UserName@users.noreply.github.com>
|
||||
# - user_info -> Your Display Name <your-actual@email.com>
|
||||
# - github_actions -> github-actions <email associated with the github logo>
|
||||
# Default: github_actor
|
||||
default_author: github_actor
|
||||
|
||||
# Arguments for the git fetch command. If set to false, the action won't fetch the repo.
|
||||
# For more info as to why fetching is usually recommended, please see the "Performance on large repos" FAQ.
|
||||
# Default: --tags --force
|
||||
fetch: false
|
||||
|
||||
# The message for the commit.
|
||||
# Default: 'Commit from GitHub Actions (name of the workflow)'
|
||||
message: 'Your commit message'
|
||||
|
||||
# If this input is set, the action will push the commit to a new branch with this name.
|
||||
# Default: ''
|
||||
new_branch: custom-new-branch
|
||||
|
||||
# The way the action should handle pathspec errors from the add and remove commands. Three options are available:
|
||||
# - ignore -> errors will be logged but the step won't fail
|
||||
# - exitImmediately -> the action will stop right away, and the step will fail
|
||||
# - exitAtEnd -> the action will go on, every pathspec error will be logged at the end, the step will fail.
|
||||
# Default: ignore
|
||||
pathspec_error_handling: ignore
|
||||
|
||||
# Arguments for the git pull command. By default, the action does not pull.
|
||||
# Default: ''
|
||||
pull: '--rebase --autostash ...'
|
||||
|
||||
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (see the paragraph below for more info)
|
||||
# Default: true
|
||||
push: false
|
||||
|
||||
# The arguments for the `git rm` command (see the paragraph below for more info)
|
||||
# Default: ''
|
||||
remove: './dir/old_file.js'
|
||||
|
||||
# Arguments for the git tag command (the tag name always needs to be the first word not preceded by an hyphen)
|
||||
# Default: ''
|
||||
tag: 'v1.0.0 --force'
|
||||
|
||||
# Arguments for the git push --tags command (any additional argument will be added after --tags)
|
||||
# Default: ''
|
||||
tag_push: '--force'
|
||||
```
|
||||
|
||||
### Inputs:
|
||||
### Git arguments
|
||||
|
||||
- `author_name` : the name of the user that will be displayed as the author of the commit
|
||||
- `author_email` : the email of the user that will be displayed as the author of the commit
|
||||
- `message` : the message for the commit
|
||||
- `path` : the path to stage files from
|
||||
Multiple options let you provide the `git` arguments that you want the action to use. It's important to note that these arguments **are not actually used with a CLI command**, but they are parsed by a package called [`string-argv`](https://npm.im/string-argv), and then used with [`simple-git`](https://npm.im/simple-git).
|
||||
What does this mean for you? It means that strings that contain a lot of nested quotes may be parsed incorrectly, and that specific ways of declaring arguments may not be supported by these libraries. If you're having issues with your argument strings you can check whether they're being parsed correctly either by [enabling debug logging](https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging) for your workflow runs or by testing it directly with `string-argv` ([RunKit demo](https://npm.runkit.com/string-argv)): if each argument and option is parsed correctly you'll see an array where every string is an option or value.
|
||||
|
||||
### Environment variables:
|
||||
### Adding files
|
||||
|
||||
The only `env` variable required is the token for the action to run: GitHub generates one automatically, but you need to pass it through `env` to make it available to actions. You can find more about `GITHUB_TOKEN` [here](https://help.github.com/en/articles/virtual-environments-for-github-actions#github_token-secret).
|
||||
With that said, you can just copy the example line and don't worry about it. If you do want to use a different token you can pass that in, but I wouldn't see any possible advantage in doing so.
|
||||
The action adds files using a regular `git add` command, so you can put every kind of argument in the `add` option. For example, if you want to force-add a file: `./path/to/file.txt --force`.
|
||||
The script will not stop if one of the git commands doesn't match any file. E.g.: if your command shows a "fatal: pathspec 'yourFile' did not match any files" error the action will go on.
|
||||
You can also use JSON or YAML arrays (e.g. `'["first", "second"]'`, `"['first', 'second']"`) to make the action run multiple `git add` commands: the action will log how your input has been parsed. Please mind that your input still needs to be a string because of how GitHub Actions works with inputs: just write your array inside the string, the action will parse it later.
|
||||
|
||||
### Example:
|
||||
### Deleting files
|
||||
|
||||
You want to lint your JavaScript files, located in the `src` folder, with ESLint so that fixable changes are done without your intervention. You can use a workflow like this:
|
||||
The `remove` option can be used if a predetermined list of files needs to be removed. It runs the `git rm` command, so you can pass every kind of argument with it. As if with the [`add` input](#adding-files), you can also use JSON or YAML arrays to make the action run multiple `git rm` commands.
|
||||
|
||||
If you want deleted files to be auto-detected and committed, you can use the [`--no-ignore-removal`/`-A`](https://git-scm.com/docs/git-add#Documentation/git-add.txt--A) git arguments.
|
||||
|
||||
### Pushing
|
||||
|
||||
By default the action runs the following command: `git push origin ${new_branch input} --set-upstream`. You can use the `push` input to modify this behavior, here's what you can set it to:
|
||||
|
||||
- `true`: this is the default value, it will behave as usual.
|
||||
- `false`: this prevents the action from pushing at all, no `git push` command is run.
|
||||
- any other string:
|
||||
The action will use your string as the arguments for the `git push` command. Please note that nothing is used other than your arguments, and the command will result in `git push ${push input}` (no remote, no branch, no `--set-upstream`, you have to include them yourself).
|
||||
|
||||
One way to use this is if you want to force push to a branch of your repo: you'll need to set the `push` input to, for example, `origin yourBranch --force`.
|
||||
|
||||
### Creating a new branch
|
||||
|
||||
If you want the action to commit in a new branch, you can use the `new_branch` input.
|
||||
|
||||
Please note that if the branch exists, the action will still try push to it, but it's possible that the push will be rejected by the remote as non-straightforward.
|
||||
|
||||
If that's the case, you need to make sure that the branch you want to commit to is already checked out before you run the action.
|
||||
If you're **really** sure that you want to commit to that branch, you can also force-push by setting the `push` input to something like `origin yourBranchName --set-upstream --force`.
|
||||
|
||||
If you want to commit files "across different branches", here are two ways to do it:
|
||||
|
||||
1. You can check them out in two different directories, generate your files, move them to your destination and then run `add-and-commit` in the destination directory using the `cwd` input.
|
||||
2. You can manually commit those files with `git` commands as you would on your machine. There are several ways to do this depending on the scenario. One of them if to stash your changes, checkout the destination branch, and popping the stash. You can then use the `add-and-commit` action as usual. Please note that this is just an example and may not work for you, since your use case may be different.
|
||||
|
||||
### Tagging
|
||||
|
||||
You can use the `tag` option to enter the arguments for a `git add` command. In order for the action to isolate the tag name from the rest of the arguments, it should be the first word not preceded by an hyphen (e.g. `-a tag-name -m "some other stuff"` is ok).
|
||||
You can also change the arguments of the push command for tags: every argument in the `tag_push` input will be appended to the `git push --tags` command.
|
||||
For more info on how git arguments are parsed, see [the "Git arguments" section](#git-arguments).
|
||||
|
||||
## Outputs
|
||||
|
||||
The action provides these outputs:
|
||||
|
||||
- `committed`: whether the action has created a commit (`'true'` or `'false'`)
|
||||
- `commit_long_sha`: the full SHA of the commit that has just been created
|
||||
- `commit_sha`: the short 7-character SHA of the commit that has just been created
|
||||
- `pushed`: whether the action has pushed to the remote (`'true'` or `'false'`)
|
||||
- `tagged`: whether the action has created a tag (`'true'` or `'false'`)
|
||||
- `tag_pushed`: whether the action has pushed a tag (`'true'` or `'false'`)
|
||||
|
||||
For more info on how to use outputs, see ["Context and expression syntax"](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions).
|
||||
|
||||
## FAQs
|
||||
|
||||
### Working with PRs
|
||||
|
||||
By default, when you use `actions/checkout` on a PR, it will checkout the head commit in a detached head state.
|
||||
If you want to make some changes, you have to checkout the branch the PR is coming from in the head repo.
|
||||
You can set it up like this:
|
||||
|
||||
```yaml
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
```
|
||||
|
||||
You can find the full docs for payloads of `pull_request` events [here](https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#webhook-payload-example-32).
|
||||
|
||||
If you're planning on running this only on "internal" PRs (where head and base are in the same repo) then you can omit the `repository` input.
|
||||
If you're planning to use this with PRs coming from other forks, please keep in mind that you might not have write access to those repos.
|
||||
You can try setting up the repo with your PAT, as explained in the ["About tokens" paragraph](#about-tokens) of this section.
|
||||
|
||||
Keep in mind that this "custom checkout" is meant only for PRs: if your workflow runs on multiple events (like `push` or `workflow_dispatch`), you could try having this step run only for `pull_request` events, while other ones will trigger the usual checkout.
|
||||
If you wish to do so, you can use the `step.if` property, [here](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif)'s the docs.
|
||||
|
||||
### About tokens
|
||||
|
||||
When pushing, the action uses the token that the local git repository has been configured with: that means that if you want to change it you'll need to do it in the steps that run before this action. For example: if you set up your repo with [`actions/checkout`](https://github.com/actions/checkout/) then you have to add the token there.
|
||||
Changing the token with which the repo is configured can be useful if you want to run CI checks on the commit pushed by this action; anyway, it has to be set up outside of this action.
|
||||
|
||||
The action automatically gets the GitHub token from a `github_token` input: this input should not be modified by the user, since it doesn't affect the commits as it's only used to access the GitHub API to get user info, in case they selected that option for the commit author.
|
||||
|
||||
### The commit from the action is not triggering CI!
|
||||
|
||||
That's because you're checking out the repo using the built-in [`GITHUB_TOKEN` secret](https://docs.github.com/en/actions/security-guides/automatic-token-authentication): GitHub sees that the push event has been triggered by a commit generated by CI, and doesn't run any further checks to avoid unintentional check loops.
|
||||
|
||||
**If you're sure** that you want the commits generated during CI to trigger other workflow runs, you can checkout the repo using a [Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token): this will make the resulting commit the same as if you made it yourself.
|
||||
If you're using `actions/checkout`, check out their [docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) to see how to set your repo token.
|
||||
|
||||
### About `actions/checkout`
|
||||
|
||||
The token you use when setting up the repo with this action will determine what token `add-and-commit` will use.
|
||||
Some users reported that they were getting an error:
|
||||
|
||||
```
|
||||
> fatal: could not read Username for 'https://github.com': No such device or address
|
||||
```
|
||||
|
||||
If you're getting this error and you're using `actions/checkout@v1`, try upgrading to `actions/checkout@v2`. If you're still having problems after upgrading, feel free to open an issue. Issue ref: [#146](https://github.com/EndBug/add-and-commit/issues/146)
|
||||
|
||||
### Performance on large repos
|
||||
|
||||
By default, the action will fetch the repository before starting to work on it: this ensures that it can see the already existing refs.
|
||||
|
||||
When working with a repository that has a lot of branches and tags, fetching it can take a long time. If the fetch step is taking too much time, you can decide to skip it by setting the `fetch` input to `false`: this will prevent the action from running `git fetch` altogether.
|
||||
|
||||
Please note that you have to set up your workflow accordingly: not fetching the repo can impact branch and tag creation within the action, and for this reason it's recommended to disable it only if necessary. Issue ref: [#386](https://github.com/EndBug/add-and-commit/issues/386)
|
||||
|
||||
## Examples
|
||||
|
||||
### Different author/committer configurations
|
||||
|
||||
If you don't want to use your GitHub username for the CI commits, you can use the `default_author` input to make it appear as if it was made by "GitHub Actions", by setting its value to `github_actions`.
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/26386270/115738624-80b51780-a38d-11eb-9bbe-77461654274c.png" height=40/>
|
||||
|
||||
```yaml
|
||||
on: push
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
default_author: github_actions
|
||||
```
|
||||
|
||||
You can also use the `committer_name` and `committer_email` inputs to make it appear as if GitHub Actions is the committer, here are a couple of example steps:
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/26386270/130594168-1d910710-e2d0-4b06-9324-cbe5dde59154.png" height=70/>
|
||||
|
||||
```yaml
|
||||
- uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
message: Show GitHub Actions logo
|
||||
committer_name: GitHub Actions
|
||||
committer_email: actions@github.com
|
||||
```
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/26386270/130594443-b881fae7-3064-4020-a4cc-6db37ef0df65.png" height=70/>
|
||||
|
||||
```yaml
|
||||
- uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
message: Show GitHub logo
|
||||
committer_name: GitHub Actions
|
||||
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
|
||||
```
|
||||
|
||||
### Automated linting
|
||||
|
||||
Do you want to lint your JavaScript files, located in the `src` folder, with ESLint, so that fixable changes are done without your intervention? You can use a workflow like this:
|
||||
|
||||
```yaml
|
||||
name: Lint source code
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
jobs:
|
||||
run:
|
||||
name: Lint with ESLint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@master
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@master
|
||||
with:
|
||||
node-version: 10.0.0
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
|
||||
- name: Update source code
|
||||
run: eslint "src/**" --fix
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Commit changes
|
||||
uses: EndBug/add-and-commit@v1.0.0
|
||||
with:
|
||||
author_name: Your Name
|
||||
author_email: mail@example.com
|
||||
message: "Your commit message"
|
||||
path: ./*.js
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Update source code
|
||||
run: eslint "src/**" --fix
|
||||
|
||||
- name: Commit changes
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
author_name: Your Name
|
||||
author_email: mail@example.com
|
||||
message: 'Your commit message'
|
||||
add: '*.js'
|
||||
```
|
||||
|
||||
### Running the action in a different directory
|
||||
|
||||
If you need to run the action on a repository that is not located in [`$GITHUB_WORKSPACE`](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables#default-environment-variables), you can use the `cwd` option: the action uses a `cd` normal command, so the path should follow bash standards.
|
||||
|
||||
```yaml
|
||||
name: Use a different repository directory
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: Add a text file
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# If you need to, you can check out your repo to a different location
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: './pathToRepo/'
|
||||
|
||||
# You can make whatever type of change to the repo...
|
||||
- run: echo "123" > ./pathToRepo/file.txt
|
||||
|
||||
# ...and then use the action as you would normally do, but providing the path to the repo
|
||||
- uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
message: 'Add the very useful text file'
|
||||
add: '*.txt --force'
|
||||
cwd: './pathToRepo/'
|
||||
```
|
||||
|
||||
## Contributors ✨
|
||||
|
||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/EndBug"><img src="https://avatars1.githubusercontent.com/u/26386270?v=4?s=100" width="100px;" alt="Federico Grandi"/><br /><sub><b>Federico Grandi</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=EndBug" title="Code">💻</a> <a href="https://github.com/EndBug/add-and-commit/commits?author=EndBug" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jactor-rises"><img src="https://avatars3.githubusercontent.com/u/14565088?v=4?s=100" width="100px;" alt="Tor Egil Jacobsen"/><br /><sub><b>Tor Egil Jacobsen</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=jactor-rises" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/yelizariev"><img src="https://avatars0.githubusercontent.com/u/186131?v=4?s=100" width="100px;" alt="Ivan Yelizariev"/><br /><sub><b>Ivan Yelizariev</b></sub></a><br /><a href="#ideas-yelizariev" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jhhughes"><img src="https://avatars2.githubusercontent.com/u/13724293?v=4?s=100" width="100px;" alt="jhhughes"/><br /><sub><b>jhhughes</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Ajhhughes" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://sunengine.site"><img src="https://avatars3.githubusercontent.com/u/10674646?v=4?s=100" width="100px;" alt="Дмитрий Океаний"/><br /><sub><b>Дмитрий Океаний</b></sub></a><br /><a href="#ideas-DmitrijOkeanij" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/brahma-dev"><img src="https://avatars3.githubusercontent.com/u/1793295?v=4?s=100" width="100px;" alt="Brahma Dev"/><br /><sub><b>Brahma Dev</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Abrahma-dev" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/felixlapalma"><img src="https://avatars2.githubusercontent.com/u/38389683?v=4?s=100" width="100px;" alt="Felix Rojo Lapalma"/><br /><sub><b>Felix Rojo Lapalma</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Afelixlapalma" title="Bug reports">🐛</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://robinwijnant.me"><img src="https://avatars3.githubusercontent.com/u/33033209?v=4?s=100" width="100px;" alt="Robin Wijnant"/><br /><sub><b>Robin Wijnant</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3ARobinWijnant" title="Bug reports">🐛</a> <a href="https://github.com/EndBug/add-and-commit/commits?author=RobinWijnant" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/onilton"><img src="https://avatars2.githubusercontent.com/u/725676?v=4?s=100" width="100px;" alt="Onilton Maciel"/><br /><sub><b>Onilton Maciel</b></sub></a><br /><a href="#ideas-onilton" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jsoref"><img src="https://avatars0.githubusercontent.com/u/2119212?v=4?s=100" width="100px;" alt="Josh Soref"/><br /><sub><b>Josh Soref</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=jsoref" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ToMe25"><img src="https://avatars1.githubusercontent.com/u/38815969?v=4?s=100" width="100px;" alt="ToMe25"/><br /><sub><b>ToMe25</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=ToMe25" title="Code">💻</a> <a href="#ideas-ToMe25" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JonasJacobsUserspace"><img src="https://avatars0.githubusercontent.com/u/59708720?v=4?s=100" width="100px;" alt="JonasJacobsUserspace"/><br /><sub><b>JonasJacobsUserspace</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3AJonasJacobsUserspace" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pvogt09"><img src="https://avatars3.githubusercontent.com/u/50047961?v=4?s=100" width="100px;" alt="pvogt09"/><br /><sub><b>pvogt09</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=pvogt09" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://hoten.cc"><img src="https://avatars1.githubusercontent.com/u/4071474?v=4?s=100" width="100px;" alt="Connor Clark"/><br /><sub><b>Connor Clark</b></sub></a><br /><a href="#ideas-connorjclark" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Cyberbeni"><img src="https://avatars1.githubusercontent.com/u/8356175?v=4?s=100" width="100px;" alt="Benedek Kozma"/><br /><sub><b>Benedek Kozma</b></sub></a><br /><a href="#ideas-Cyberbeni" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/EndBug/add-and-commit/commits?author=Cyberbeni" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/coffeegoddd"><img src="https://avatars3.githubusercontent.com/u/43383835?v=4?s=100" width="100px;" alt="Dustin Brown"/><br /><sub><b>Dustin Brown</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Acoffeegoddd" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Chocrates"><img src="https://avatars1.githubusercontent.com/u/1758164?v=4?s=100" width="100px;" alt="Chris McIntosh"/><br /><sub><b>Chris McIntosh</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3AChocrates" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kbsali"><img src="https://avatars0.githubusercontent.com/u/53676?v=4?s=100" width="100px;" alt="Kevin Saliou"/><br /><sub><b>Kevin Saliou</b></sub></a><br /><a href="#ideas-kbsali" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ewjoachim"><img src="https://avatars0.githubusercontent.com/u/1457576?v=4?s=100" width="100px;" alt="Joachim Jablon"/><br /><sub><b>Joachim Jablon</b></sub></a><br /><a href="#ideas-ewjoachim" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/trallnag"><img src="https://avatars3.githubusercontent.com/u/24834206?v=4?s=100" width="100px;" alt="Tim Schwenke"/><br /><sub><b>Tim Schwenke</b></sub></a><br /><a href="#ideas-trallnag" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.somethingcatchy.net"><img src="https://avatars1.githubusercontent.com/u/12880806?v=4?s=100" width="100px;" alt="Possible Triangle"/><br /><sub><b>Possible Triangle</b></sub></a><br /><a href="#ideas-PssbleTrngle" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://dominikschilling.de"><img src="https://avatars2.githubusercontent.com/u/617637?v=4?s=100" width="100px;" alt="Dominik Schilling"/><br /><sub><b>Dominik Schilling</b></sub></a><br /><a href="#ideas-ocean90" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/EndBug/add-and-commit/commits?author=ocean90" title="Documentation">📖</a> <a href="https://github.com/EndBug/add-and-commit/commits?author=ocean90" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://chaos.social/@rugk"><img src="https://avatars.githubusercontent.com/u/11966684?v=4?s=100" width="100px;" alt="rugk"/><br /><sub><b>rugk</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=rugk" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://xenoterracide.com"><img src="https://avatars.githubusercontent.com/u/5517?v=4?s=100" width="100px;" alt="Caleb Cushing"/><br /><sub><b>Caleb Cushing</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Axenoterracide" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://ruohola.dev"><img src="https://avatars.githubusercontent.com/u/33625218?v=4?s=100" width="100px;" alt="Eero Ruohola"/><br /><sub><b>Eero Ruohola</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Aruohola" title="Bug reports">🐛</a> <a href="#ideas-ruohola" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vincentchu12"><img src="https://avatars.githubusercontent.com/u/23532586?v=4?s=100" width="100px;" alt="Vincent Chu"/><br /><sub><b>Vincent Chu</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Avincentchu12" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/cwsites"><img src="https://avatars.githubusercontent.com/u/1242102?v=4?s=100" width="100px;" alt="Matt H"/><br /><sub><b>Matt H</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=CWSites" title="Documentation">📖</a> <a href="#ideas-CWSites" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/danielwerg"><img src="https://avatars.githubusercontent.com/u/35052399?v=4?s=100" width="100px;" alt="danielwerg"/><br /><sub><b>danielwerg</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=danielwerg" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://orcid.org/0000-0001-6962-4290"><img src="https://avatars.githubusercontent.com/u/1366654?v=4?s=100" width="100px;" alt="Oliver Kopp"/><br /><sub><b>Oliver Kopp</b></sub></a><br /><a href="#ideas-koppor" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Glidias"><img src="https://avatars.githubusercontent.com/u/190195?v=4?s=100" width="100px;" alt="Glenn Ko"/><br /><sub><b>Glenn Ko</b></sub></a><br /><a href="#ideas-Glidias" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://blog.madewithdrew.com/"><img src="https://avatars.githubusercontent.com/u/239123?v=4?s=100" width="100px;" alt="Drew Wells"/><br /><sub><b>Drew Wells</b></sub></a><br /><a href="#ideas-drewwells" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://kotlin.desarrollador-android.com/"><img src="https://avatars.githubusercontent.com/u/7463564?v=4?s=100" width="100px;" alt="Javier Segovia Córdoba"/><br /><sub><b>Javier Segovia Córdoba</b></sub></a><br /><a href="#ideas-JavierSegoviaCordoba" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Darylgolden"><img src="https://avatars.githubusercontent.com/u/9102529?v=4?s=100" width="100px;" alt="Darylgolden"/><br /><sub><b>Darylgolden</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3ADarylgolden" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mcargille"><img src="https://avatars.githubusercontent.com/u/20142895?v=4?s=100" width="100px;" alt="mcargille"/><br /><sub><b>mcargille</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Amcargille" title="Bug reports">🐛</a> <a href="https://github.com/EndBug/add-and-commit/commits?author=mcargille" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/secondmanveran"><img src="https://avatars.githubusercontent.com/u/97000801?v=4?s=100" width="100px;" alt="secondman"/><br /><sub><b>secondman</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=secondmanveran" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/prince-chrismc"><img src="https://avatars.githubusercontent.com/u/16867443?v=4?s=100" width="100px;" alt="Chris Mc"/><br /><sub><b>Chris Mc</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=prince-chrismc" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://linkedin.com/in/namyalg"><img src="https://avatars.githubusercontent.com/u/53875297?v=4?s=100" width="100px;" alt="Namya LG"/><br /><sub><b>Namya LG</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=Namyalg" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sconix"><img src="https://avatars.githubusercontent.com/u/921515?v=4?s=100" width="100px;" alt="Janne Julkunen"/><br /><sub><b>Janne Julkunen</b></sub></a><br /><a href="#ideas-sconix" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://joshcena.com"><img src="https://avatars.githubusercontent.com/u/55398995?v=4?s=100" width="100px;" alt="Joshua Chen"/><br /><sub><b>Joshua Chen</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3AJosh-Cena" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://akimon658.github.io"><img src="https://avatars.githubusercontent.com/u/81888693?v=4?s=100" width="100px;" alt="Akimo"/><br /><sub><b>Akimo</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=Akimon658" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://revolunet.com"><img src="https://avatars.githubusercontent.com/u/124937?v=4?s=100" width="100px;" alt="Julien Bouquillon"/><br /><sub><b>Julien Bouquillon</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=revolunet" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/AvivPeledTalon"><img src="https://avatars.githubusercontent.com/u/92471076?v=4?s=100" width="100px;" alt="Aviv Peled"/><br /><sub><b>Aviv Peled</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3AAvivPeledTalon" title="Bug reports">🐛</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/onedr0p"><img src="https://avatars.githubusercontent.com/u/213795?v=4?s=100" width="100px;" alt="Devin Buhl"/><br /><sub><b>Devin Buhl</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Aonedr0p" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://erekspeed.com"><img src="https://avatars.githubusercontent.com/u/1176550?v=4?s=100" width="100px;" alt="Erek Speed"/><br /><sub><b>Erek Speed</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Amelink14" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://kachkaev.uk"><img src="https://avatars.githubusercontent.com/u/608862?v=4?s=100" width="100px;" alt="Alexander Kachkaev"/><br /><sub><b>Alexander Kachkaev</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Akachkaev" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://manuel-rauber.com"><img src="https://avatars.githubusercontent.com/u/740791?v=4?s=100" width="100px;" alt="Manuel Rauber"/><br /><sub><b>Manuel Rauber</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=ManuelRauber" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://heisenbug.blogspot.com"><img src="https://avatars.githubusercontent.com/u/1312006?v=4?s=100" width="100px;" alt="Gabor Greif"/><br /><sub><b>Gabor Greif</b></sub></a><br /><a href="#maintenance-ggreif" title="Maintenance">🚧</a> <a href="https://github.com/EndBug/add-and-commit/commits?author=ggreif" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://keithrfung.dev"><img src="https://avatars.githubusercontent.com/u/10125297?v=4?s=100" width="100px;" alt="Keith Fung"/><br /><sub><b>Keith Fung</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=keithrfung" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://freshidea.com/jonah"><img src="https://avatars.githubusercontent.com/u/20955511?v=4?s=100" width="100px;" alt="Jonah Lawrence"/><br /><sub><b>Jonah Lawrence</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3ADenverCoder1" title="Bug reports">🐛</a> <a href="https://github.com/EndBug/add-and-commit/commits?author=DenverCoder1" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
||||
### Additional credits
|
||||
|
||||
This action is inspired by [`git-auto-commit-action`](https://github.com/stefanzweifel/git-auto-commit-action) by [Stefan Zweifel](https://github.com/stefanzweifel).
|
||||
|
||||
## License
|
||||
|
||||
This action is distributed under the MIT license, check the [license](LICENSE) for more info.
|
||||
This action is distributed under the MIT license, check the [license](LICENSE) for more info.
|
||||
|
||||
101
action.yml
101
action.yml
@@ -1,28 +1,89 @@
|
||||
name: 'Add & Commit'
|
||||
description: 'Add & commit files from a path directly from GitHub Actions'
|
||||
name: Add & Commit
|
||||
description: Automatically commit changes made in your workflow run directly to your repo
|
||||
|
||||
inputs:
|
||||
add:
|
||||
description: Arguments for the git add command
|
||||
required: false
|
||||
default: '.'
|
||||
author_name:
|
||||
description: 'The name of the user that will be displayed as the author of the commit'
|
||||
required: true
|
||||
default: 'Add & Commit GitHub Action'
|
||||
description: The name of the user that will be displayed as the author of the commit
|
||||
required: false
|
||||
author_email:
|
||||
description: 'The email of the user that will be displayed as the author of the commit'
|
||||
required: true
|
||||
default: 'actions@github.com'
|
||||
description: The email of the user that will be displayed as the author of the commit
|
||||
required: false
|
||||
commit:
|
||||
description: Additional arguments for the git commit command
|
||||
required: false
|
||||
committer_name:
|
||||
description: The name of the custom committer you want to use
|
||||
required: false
|
||||
committer_email:
|
||||
description: The email of the custom committer you want to use
|
||||
required: false
|
||||
cwd:
|
||||
description: The directory where your repository is located. You should use actions/checkout first to set it up
|
||||
required: false
|
||||
default: '.'
|
||||
default_author:
|
||||
description: How the action should fill missing author name or email.
|
||||
required: false
|
||||
default: 'github_actor'
|
||||
fetch:
|
||||
description: Arguments for the git fetch command (if 'false', the action won't fetch the repo)
|
||||
required: false
|
||||
default: --tags --force
|
||||
message:
|
||||
description: 'The message for the commit'
|
||||
required: true
|
||||
default: 'Commit from GitHub Actions'
|
||||
path:
|
||||
description: 'The path to stage files from'
|
||||
required: true
|
||||
default: './**/*.*'
|
||||
description: The message for the commit
|
||||
required: false
|
||||
new_branch:
|
||||
description: The name of the branch to create.
|
||||
required: false
|
||||
pathspec_error_handling:
|
||||
description: The way the action should handle pathspec errors from the add and remove commands.
|
||||
required: false
|
||||
default: ignore
|
||||
pull:
|
||||
description: Arguments for the git pull command. By default, the action does not pull.
|
||||
required: false
|
||||
push:
|
||||
description: Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (more info in the README)
|
||||
required: false
|
||||
default: 'true'
|
||||
remove:
|
||||
description: Arguments for the git rm command
|
||||
required: false
|
||||
tag:
|
||||
description: Arguments for the git tag command (the tag name always needs to be the first word not preceded by a hyphen)
|
||||
required: false
|
||||
tag_push:
|
||||
description: Arguments for the git push --tags command (any additional argument will be added after --tags)
|
||||
required: false
|
||||
|
||||
# Input not required from the user
|
||||
github_token:
|
||||
description: The token used to make requests to the GitHub API. It's NOT used to make commits and should not be changed.
|
||||
required: false
|
||||
default: ${{ github.token }}
|
||||
|
||||
outputs:
|
||||
committed:
|
||||
description: Whether the action has created a commit.
|
||||
commit_long_sha:
|
||||
description: The complete SHA of the commit that has been created.
|
||||
commit_sha:
|
||||
description: The short SHA of the commit that has been created.
|
||||
pushed:
|
||||
description: Whether the action has pushed to the remote.
|
||||
tagged:
|
||||
description: Whether the action has created a tag.
|
||||
tag_pushed:
|
||||
description: Whether the action has pushed a tag.
|
||||
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
using: node16
|
||||
main: lib/index.js
|
||||
|
||||
branding:
|
||||
icon: 'git-commit'
|
||||
color: black
|
||||
branding:
|
||||
icon: git-commit
|
||||
color: gray-dark
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
# Set up .netrc file with GitHub credentials
|
||||
git_setup ( ) {
|
||||
cat <<- EOF > $HOME/.netrc
|
||||
machine github.com
|
||||
login $GITHUB_ACTOR
|
||||
password $GITHUB_TOKEN
|
||||
|
||||
machine api.github.com
|
||||
login $GITHUB_ACTOR
|
||||
password $GITHUB_TOKEN
|
||||
EOF
|
||||
chmod 600 $HOME/.netrc
|
||||
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "Add & Commit GitHub Action"
|
||||
}
|
||||
|
||||
# This is needed to make the check work for untracked files
|
||||
echo "Staging files in commit path..."
|
||||
git add "${INPUT_PATH}"
|
||||
|
||||
echo "Checking for uncommitted changes in the git working tree..."
|
||||
# This section only runs if there have been file changes
|
||||
if ! git diff --cached --exit-code
|
||||
then
|
||||
git_setup
|
||||
|
||||
git fetch
|
||||
|
||||
# Switch to branch from current Workflow run
|
||||
echo "Creating and switching branch..."
|
||||
git branch "${GITHUB_REF:11}"
|
||||
git checkout "${GITHUB_REF:11}"
|
||||
|
||||
echo "Adding files..."
|
||||
git add "${INPUT_PATH}"
|
||||
|
||||
echo "Creating commit..."
|
||||
git commit -m "$INPUT_MESSAGE" --author="$INPUT_AUTHOR_NAME <$INPUT_AUTHOR_EMAIL>"
|
||||
|
||||
echo "Pushing to repo..."
|
||||
git push --set-upstream origin "${GITHUB_REF:11}"
|
||||
else
|
||||
echo "Working tree clean. Nothing to commit."
|
||||
fi
|
||||
7
lib/index.js
generated
Normal file
7
lib/index.js
generated
Normal file
File diff suppressed because one or more lines are too long
5640
package-lock.json
generated
Normal file
5640
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
53
package.json
Normal file
53
package.json
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "add-and-commit",
|
||||
"version": "9.1.2",
|
||||
"private": true,
|
||||
"description": "Add & commit files from a path directly from GitHub Actions",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"build": "ncc build src/main.ts --minify --out lib",
|
||||
"watch": "ncc build src/main.ts --watch --out lib",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:fix": "eslint --ext .ts --fix src",
|
||||
"prepare": "husky install",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/EndBug/add-and-commit.git"
|
||||
},
|
||||
"keywords": [
|
||||
"github",
|
||||
"action",
|
||||
"version",
|
||||
"npm",
|
||||
"node"
|
||||
],
|
||||
"author": "Federico Grandi <fgrandi30@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/EndBug/add-and-commit/issues"
|
||||
},
|
||||
"homepage": "https://github.com/EndBug/add-and-commit#readme",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.0",
|
||||
"actions-toolkit": "github:EndBug/actions-toolkit#core-actions",
|
||||
"js-yaml": "^4.1.0",
|
||||
"simple-git": "^3.7.1",
|
||||
"string-argv": "^0.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/node": "^12.12.54",
|
||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||
"@typescript-eslint/parser": "^4.33.0",
|
||||
"@vercel/ncc": "^0.36.1",
|
||||
"all-contributors-cli": "^6.24.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"husky": "^8.0.3",
|
||||
"prettier": "^2.8.8",
|
||||
"typescript": "^5.0.4"
|
||||
}
|
||||
}
|
||||
259
src/io.ts
Normal file
259
src/io.ts
Normal file
@@ -0,0 +1,259 @@
|
||||
import * as core from '@actions/core'
|
||||
import { getUserInfo, parseInputArray } from './util'
|
||||
|
||||
interface InputTypes {
|
||||
add: string
|
||||
author_name: string
|
||||
author_email: string
|
||||
commit: string | undefined
|
||||
committer_name: string
|
||||
committer_email: string
|
||||
cwd: string
|
||||
default_author: 'github_actor' | 'user_info' | 'github_actions'
|
||||
fetch: string
|
||||
message: string
|
||||
new_branch: string | undefined
|
||||
pathspec_error_handling: 'ignore' | 'exitImmediately' | 'exitAtEnd'
|
||||
pull: string | undefined
|
||||
push: string
|
||||
remove: string | undefined
|
||||
tag: string | undefined
|
||||
tag_push: string | undefined
|
||||
|
||||
github_token: string | undefined
|
||||
}
|
||||
export type input = keyof InputTypes
|
||||
|
||||
interface OutputTypes {
|
||||
committed: 'true' | 'false'
|
||||
commit_long_sha: string | undefined
|
||||
commit_sha: string | undefined
|
||||
pushed: 'true' | 'false'
|
||||
tagged: 'true' | 'false'
|
||||
tag_pushed: 'true' | 'false'
|
||||
}
|
||||
export type output = keyof OutputTypes
|
||||
|
||||
export const outputs: OutputTypes = {
|
||||
committed: 'false',
|
||||
commit_long_sha: undefined,
|
||||
commit_sha: undefined,
|
||||
pushed: 'false',
|
||||
tagged: 'false',
|
||||
tag_pushed: 'false'
|
||||
}
|
||||
// Setup default output values
|
||||
Object.entries(outputs).forEach(([name, value]) => core.setOutput(name, value))
|
||||
|
||||
export function getInput<T extends input>(name: T, parseAsBool: true): boolean
|
||||
export function getInput<T extends input>(
|
||||
name: T,
|
||||
parseAsBool?: false
|
||||
): InputTypes[T]
|
||||
export function getInput<T extends input>(
|
||||
name: T,
|
||||
parseAsBool = false
|
||||
): InputTypes[T] | boolean {
|
||||
if (parseAsBool) return core.getBooleanInput(name)
|
||||
// @ts-expect-error
|
||||
return core.getInput(name)
|
||||
}
|
||||
|
||||
export function setOutput<T extends output>(name: T, value: OutputTypes[T]) {
|
||||
core.debug(`Setting output: ${name}=${value}`)
|
||||
outputs[name] = value
|
||||
core.setOutput(name, value)
|
||||
}
|
||||
|
||||
export function logOutputs() {
|
||||
core.startGroup('Outputs')
|
||||
for (const key in outputs) {
|
||||
core.info(`${key}: ${outputs[key]}`)
|
||||
}
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
export async function checkInputs() {
|
||||
function setInput(input: input, value: string | undefined) {
|
||||
if (value) return (process.env[`INPUT_${input.toUpperCase()}`] = value)
|
||||
else return delete process.env[`INPUT_${input.toUpperCase()}`]
|
||||
}
|
||||
function setDefault(input: input, value: string) {
|
||||
if (!getInput(input)) setInput(input, value)
|
||||
return getInput(input)
|
||||
}
|
||||
|
||||
// #region add, remove
|
||||
if (!getInput('add') && !getInput('remove'))
|
||||
throw new Error(
|
||||
"Both 'add' and 'remove' are empty, the action has nothing to do."
|
||||
)
|
||||
|
||||
if (getInput('add')) {
|
||||
const parsed = parseInputArray(getInput('add'))
|
||||
if (parsed.length == 1)
|
||||
core.info('Add input parsed as single string, running 1 git add command.')
|
||||
else if (parsed.length > 1)
|
||||
core.info(
|
||||
`Add input parsed as string array, running ${parsed.length} git add commands.`
|
||||
)
|
||||
else core.setFailed('Add input: array length < 1')
|
||||
}
|
||||
if (getInput('remove')) {
|
||||
const parsed = parseInputArray(getInput('remove') || '')
|
||||
if (parsed.length == 1)
|
||||
core.info(
|
||||
'Remove input parsed as single string, running 1 git rm command.'
|
||||
)
|
||||
else if (parsed.length > 1)
|
||||
core.info(
|
||||
`Remove input parsed as string array, running ${parsed.length} git rm commands.`
|
||||
)
|
||||
else core.setFailed('Remove input: array length < 1')
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region default_author
|
||||
const default_author_valid = ['github_actor', 'user_info', 'github_actions']
|
||||
if (!default_author_valid.includes(getInput('default_author')))
|
||||
throw new Error(
|
||||
`'${getInput(
|
||||
'default_author'
|
||||
)}' is not a valid value for default_author. Valid values: ${default_author_valid.join(
|
||||
', '
|
||||
)}`
|
||||
)
|
||||
// #endregion
|
||||
|
||||
// #region fetch
|
||||
if (getInput('fetch')) {
|
||||
let value: string | boolean
|
||||
|
||||
try {
|
||||
value = getInput('fetch', true)
|
||||
} catch {
|
||||
value = getInput('fetch')
|
||||
}
|
||||
|
||||
core.debug(`Current fetch option: '${value}' (parsed as ${typeof value})`)
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region author_name, author_email
|
||||
let name, email
|
||||
switch (getInput('default_author')) {
|
||||
case 'github_actor': {
|
||||
name = process.env.GITHUB_ACTOR
|
||||
email = `${process.env.GITHUB_ACTOR}@users.noreply.github.com`
|
||||
break
|
||||
}
|
||||
|
||||
case 'user_info': {
|
||||
if (!getInput('author_name') || !getInput('author_email')) {
|
||||
const res = await getUserInfo(process.env.GITHUB_ACTOR)
|
||||
if (!res?.name)
|
||||
core.warning("Couldn't fetch author name, filling with github_actor.")
|
||||
if (!res?.email)
|
||||
core.warning(
|
||||
"Couldn't fetch author email, filling with github_actor."
|
||||
)
|
||||
|
||||
res?.name && (name = res?.name)
|
||||
res?.email && (email = res.email)
|
||||
if (name && email) break
|
||||
}
|
||||
|
||||
!name && (name = process.env.GITHUB_ACTOR)
|
||||
!email && (email = `${process.env.GITHUB_ACTOR}@users.noreply.github.com`)
|
||||
break
|
||||
}
|
||||
|
||||
case 'github_actions': {
|
||||
name = 'github-actions'
|
||||
email = '41898282+github-actions[bot]@users.noreply.github.com'
|
||||
break
|
||||
}
|
||||
|
||||
default:
|
||||
throw new Error(
|
||||
'This should not happen, please contact the author of this action. (checkInputs.author)'
|
||||
)
|
||||
}
|
||||
|
||||
setDefault('author_name', name)
|
||||
setDefault('author_email', email)
|
||||
core.info(
|
||||
`> Using '${getInput('author_name')} <${getInput(
|
||||
'author_email'
|
||||
)}>' as author.`
|
||||
)
|
||||
// #endregion
|
||||
|
||||
// #region committer_name, committer_email
|
||||
if (getInput('committer_name') || getInput('committer_email'))
|
||||
core.info(
|
||||
`> Using custom committer info: ${
|
||||
getInput('committer_name') ||
|
||||
getInput('author_name') + ' [from author info]'
|
||||
} <${
|
||||
getInput('committer_email') ||
|
||||
getInput('author_email') + ' [from author info]'
|
||||
}>`
|
||||
)
|
||||
|
||||
setDefault('committer_name', getInput('author_name'))
|
||||
setDefault('committer_email', getInput('author_email'))
|
||||
core.debug(
|
||||
`Committer: ${getInput('committer_name')} <${getInput('committer_email')}>`
|
||||
)
|
||||
// #endregion
|
||||
|
||||
// #region message
|
||||
setDefault(
|
||||
'message',
|
||||
`Commit from GitHub Actions (${process.env.GITHUB_WORKFLOW})`
|
||||
)
|
||||
core.info(`> Using "${getInput('message')}" as commit message.`)
|
||||
// #endregion
|
||||
|
||||
// #region pathspec_error_handling
|
||||
const peh_valid = ['ignore', 'exitImmediately', 'exitAtEnd']
|
||||
if (!peh_valid.includes(getInput('pathspec_error_handling')))
|
||||
throw new Error(
|
||||
`"${getInput(
|
||||
'pathspec_error_handling'
|
||||
)}" is not a valid value for the 'pathspec_error_handling' input. Valid values are: ${peh_valid.join(
|
||||
', '
|
||||
)}`
|
||||
)
|
||||
// #endregion
|
||||
|
||||
// #region pull
|
||||
if (getInput('pull') == 'NO-PULL')
|
||||
core.warning(
|
||||
"`NO-PULL` is a legacy option for the `pull` input. If you don't want the action to pull the repo, simply remove this input."
|
||||
)
|
||||
// #endregion
|
||||
|
||||
// #region push
|
||||
if (getInput('push')) {
|
||||
// It has to be either 'true', 'false', or any other string (use as arguments)
|
||||
let value: string | boolean
|
||||
|
||||
try {
|
||||
value = getInput('push', true)
|
||||
} catch {
|
||||
value = getInput('push')
|
||||
}
|
||||
|
||||
core.debug(`Current push option: '${value}' (parsed as ${typeof value})`)
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region github_token
|
||||
if (!getInput('github_token'))
|
||||
core.warning(
|
||||
'No github_token has been detected, the action may fail if it needs to use the API'
|
||||
)
|
||||
// #endregion
|
||||
}
|
||||
300
src/main.ts
Normal file
300
src/main.ts
Normal file
@@ -0,0 +1,300 @@
|
||||
import * as core from '@actions/core'
|
||||
import path from 'path'
|
||||
import simpleGit, { Response } from 'simple-git'
|
||||
import { checkInputs, getInput, logOutputs, setOutput } from './io'
|
||||
import { log, matchGitArgs, parseInputArray } from './util'
|
||||
|
||||
const baseDir = path.join(process.cwd(), getInput('cwd') || '')
|
||||
const git = simpleGit({ baseDir })
|
||||
|
||||
const exitErrors: Error[] = []
|
||||
|
||||
core.info(`Running in ${baseDir}`)
|
||||
;(async () => {
|
||||
await checkInputs()
|
||||
|
||||
core.startGroup('Internal logs')
|
||||
core.info('> Staging files...')
|
||||
|
||||
const ignoreErrors =
|
||||
getInput('pathspec_error_handling') == 'ignore' ? 'pathspec' : 'none'
|
||||
|
||||
if (getInput('add')) {
|
||||
core.info('> Adding files...')
|
||||
await add(ignoreErrors)
|
||||
} else core.info('> No files to add.')
|
||||
|
||||
if (getInput('remove')) {
|
||||
core.info('> Removing files...')
|
||||
await remove(ignoreErrors)
|
||||
} else core.info('> No files to remove.')
|
||||
|
||||
core.info('> Checking for uncommitted changes in the git working tree...')
|
||||
const changedFiles = (await git.diffSummary(['--cached'])).files.length
|
||||
// continue if there are any changes or if the allow-empty commit argument is included
|
||||
if (
|
||||
changedFiles > 0 ||
|
||||
matchGitArgs(getInput('commit') || '').includes('--allow-empty')
|
||||
) {
|
||||
core.info(`> Found ${changedFiles} changed files.`)
|
||||
core.debug(
|
||||
`--allow-empty argument detected: ${matchGitArgs(
|
||||
getInput('commit') || ''
|
||||
).includes('--allow-empty')}`
|
||||
)
|
||||
|
||||
await git
|
||||
.addConfig('user.email', getInput('author_email'), undefined, log)
|
||||
.addConfig('user.name', getInput('author_name'), undefined, log)
|
||||
.addConfig('author.email', getInput('author_email'), undefined, log)
|
||||
.addConfig('author.name', getInput('author_name'), undefined, log)
|
||||
.addConfig('committer.email', getInput('committer_email'), undefined, log)
|
||||
.addConfig('committer.name', getInput('committer_name'), undefined, log)
|
||||
core.debug(
|
||||
'> Current git config\n' +
|
||||
JSON.stringify((await git.listConfig()).all, null, 2)
|
||||
)
|
||||
|
||||
let fetchOption: string | boolean
|
||||
try {
|
||||
fetchOption = getInput('fetch', true)
|
||||
} catch {
|
||||
fetchOption = getInput('fetch')
|
||||
}
|
||||
if (fetchOption) {
|
||||
core.info('> Fetching repo...')
|
||||
await git.fetch(
|
||||
matchGitArgs(fetchOption === true ? '' : fetchOption),
|
||||
log
|
||||
)
|
||||
} else core.info('> Not fetching repo.')
|
||||
|
||||
const targetBranch = getInput('new_branch')
|
||||
if (targetBranch) {
|
||||
core.info('> Checking-out branch...')
|
||||
|
||||
if (!fetchOption)
|
||||
core.warning(
|
||||
'Creating a new branch without fetching the repo first could result in an error when pushing to GitHub. Refer to the action README for more info about this topic.'
|
||||
)
|
||||
|
||||
await git
|
||||
.checkout(targetBranch)
|
||||
.then(() => {
|
||||
log(undefined, `'${targetBranch}' branch already existed.`)
|
||||
})
|
||||
.catch(() => {
|
||||
log(undefined, `Creating '${targetBranch}' branch.`)
|
||||
return git.checkoutLocalBranch(targetBranch, log)
|
||||
})
|
||||
}
|
||||
|
||||
const pullOption = getInput('pull')
|
||||
if (pullOption) {
|
||||
core.info('> Pulling from remote...')
|
||||
core.debug(`Current git pull arguments: ${pullOption}`)
|
||||
await git
|
||||
.fetch(undefined, log)
|
||||
.pull(undefined, undefined, matchGitArgs(pullOption), log)
|
||||
|
||||
core.info('> Checking for conflicts...')
|
||||
const status = await git.status(undefined, log)
|
||||
|
||||
if (!status.conflicted.length) {
|
||||
core.info('> No conflicts found.')
|
||||
core.info('> Re-staging files...')
|
||||
if (getInput('add')) await add(ignoreErrors)
|
||||
if (getInput('remove')) await remove(ignoreErrors)
|
||||
} else
|
||||
throw new Error(
|
||||
`There are ${
|
||||
status.conflicted.length
|
||||
} conflicting files: ${status.conflicted.join(', ')}`
|
||||
)
|
||||
} else core.info('> Not pulling from repo.')
|
||||
|
||||
core.info('> Creating commit...')
|
||||
await git
|
||||
.commit(getInput('message'), matchGitArgs(getInput('commit') || ''))
|
||||
.then(async (data) => {
|
||||
log(undefined, data)
|
||||
setOutput('committed', 'true')
|
||||
setOutput('commit_long_sha', data.commit)
|
||||
setOutput('commit_sha', data.commit.substring(0, 7))
|
||||
})
|
||||
.catch((err) => core.setFailed(err))
|
||||
|
||||
if (getInput('tag')) {
|
||||
core.info('> Tagging commit...')
|
||||
|
||||
if (!fetchOption)
|
||||
core.warning(
|
||||
'Creating a tag without fetching the repo first could result in an error when pushing to GitHub. Refer to the action README for more info about this topic.'
|
||||
)
|
||||
|
||||
await git
|
||||
.tag(matchGitArgs(getInput('tag') || ''), (err, data?) => {
|
||||
if (data) setOutput('tagged', 'true')
|
||||
return log(err, data)
|
||||
})
|
||||
.then((data) => {
|
||||
setOutput('tagged', 'true')
|
||||
return log(null, data)
|
||||
})
|
||||
.catch((err) => core.setFailed(err))
|
||||
} else core.info('> No tag info provided.')
|
||||
|
||||
let pushOption: string | boolean
|
||||
try {
|
||||
pushOption = getInput('push', true)
|
||||
} catch {
|
||||
pushOption = getInput('push')
|
||||
}
|
||||
if (pushOption) {
|
||||
// If the options is `true | string`...
|
||||
core.info('> Pushing commit to repo...')
|
||||
|
||||
if (pushOption === true) {
|
||||
core.debug(
|
||||
`Running: git push origin ${
|
||||
getInput('new_branch') || ''
|
||||
} --set-upstream`
|
||||
)
|
||||
await git.push(
|
||||
'origin',
|
||||
getInput('new_branch'),
|
||||
{ '--set-upstream': null },
|
||||
(err, data?) => {
|
||||
if (data) setOutput('pushed', 'true')
|
||||
return log(err, data)
|
||||
}
|
||||
)
|
||||
} else {
|
||||
core.debug(`Running: git push ${pushOption}`)
|
||||
await git.push(
|
||||
undefined,
|
||||
undefined,
|
||||
matchGitArgs(pushOption),
|
||||
(err, data?) => {
|
||||
if (data) setOutput('pushed', 'true')
|
||||
return log(err, data)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (getInput('tag')) {
|
||||
core.info('> Pushing tags to repo...')
|
||||
|
||||
await git
|
||||
.pushTags('origin', matchGitArgs(getInput('tag_push') || ''))
|
||||
.then((data) => {
|
||||
setOutput('tag_pushed', 'true')
|
||||
return log(null, data)
|
||||
})
|
||||
.catch((err) => core.setFailed(err))
|
||||
} else core.info('> No tags to push.')
|
||||
} else core.info('> Not pushing anything.')
|
||||
|
||||
core.endGroup()
|
||||
core.info('> Task completed.')
|
||||
} else {
|
||||
core.endGroup()
|
||||
core.info('> Working tree clean. Nothing to commit.')
|
||||
}
|
||||
})()
|
||||
.then(() => {
|
||||
// Check for exit errors
|
||||
if (exitErrors.length == 1) throw exitErrors[0]
|
||||
else if (exitErrors.length > 1) {
|
||||
exitErrors.forEach((e) => core.error(e))
|
||||
throw 'There have been multiple runtime errors.'
|
||||
}
|
||||
})
|
||||
.then(logOutputs)
|
||||
.catch((e) => {
|
||||
core.endGroup()
|
||||
logOutputs()
|
||||
core.setFailed(e)
|
||||
})
|
||||
|
||||
async function add(ignoreErrors: 'all' | 'pathspec' | 'none' = 'none') {
|
||||
const input = getInput('add')
|
||||
if (!input) return []
|
||||
|
||||
const parsed = parseInputArray(input)
|
||||
const res: (string | void)[] = []
|
||||
|
||||
for (const args of parsed) {
|
||||
res.push(
|
||||
// Push the result of every git command (which are executed in order) to the array
|
||||
// If any of them fails, the whole function will return a Promise rejection
|
||||
await git
|
||||
.add(matchGitArgs(args), (err: any, data?: any) =>
|
||||
log(ignoreErrors == 'all' ? null : err, data)
|
||||
)
|
||||
.catch((e: Error) => {
|
||||
// if I should ignore every error, return
|
||||
if (ignoreErrors == 'all') return
|
||||
|
||||
// if it's a pathspec error...
|
||||
if (
|
||||
e.message.includes('fatal: pathspec') &&
|
||||
e.message.includes('did not match any files')
|
||||
) {
|
||||
if (ignoreErrors == 'pathspec') return
|
||||
|
||||
const peh = getInput('pathspec_error_handling'),
|
||||
err = new Error(
|
||||
`Add command did not match any file: git add ${args}`
|
||||
)
|
||||
if (peh == 'exitImmediately') throw err
|
||||
if (peh == 'exitAtEnd') exitErrors.push(err)
|
||||
} else throw e
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
async function remove(
|
||||
ignoreErrors: 'all' | 'pathspec' | 'none' = 'none'
|
||||
): Promise<(void | Response<void>)[]> {
|
||||
const input = getInput('remove')
|
||||
if (!input) return []
|
||||
|
||||
const parsed = parseInputArray(input)
|
||||
const res: (void | Response<void>)[] = []
|
||||
|
||||
for (const args of parsed) {
|
||||
res.push(
|
||||
// Push the result of every git command (which are executed in order) to the array
|
||||
// If any of them fails, the whole function will return a Promise rejection
|
||||
await git
|
||||
.rm(matchGitArgs(args), (e: any, d?: any) =>
|
||||
log(ignoreErrors == 'all' ? null : e, d)
|
||||
)
|
||||
.catch((e: Error) => {
|
||||
// if I should ignore every error, return
|
||||
if (ignoreErrors == 'all') return
|
||||
|
||||
// if it's a pathspec error...
|
||||
if (
|
||||
e.message.includes('fatal: pathspec') &&
|
||||
e.message.includes('did not match any files')
|
||||
) {
|
||||
if (ignoreErrors == 'pathspec') return
|
||||
|
||||
const peh = getInput('pathspec_error_handling'),
|
||||
err = new Error(
|
||||
`Remove command did not match any file:\n git rm ${args}`
|
||||
)
|
||||
if (peh == 'exitImmediately') throw err
|
||||
if (peh == 'exitAtEnd') exitErrors.push(err)
|
||||
} else throw e
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
117
src/util.ts
Normal file
117
src/util.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
import { parseArgsStringToArgv } from 'string-argv'
|
||||
import * as core from '@actions/core'
|
||||
import YAML from 'js-yaml'
|
||||
import { Toolkit } from 'actions-toolkit'
|
||||
import fs from 'fs'
|
||||
import { input, output } from './io'
|
||||
|
||||
type RecordOf<T extends string> = Record<T, string | undefined>
|
||||
export const tools = new Toolkit<RecordOf<input>, RecordOf<output>>({
|
||||
secrets: [
|
||||
'GITHUB_EVENT_PATH',
|
||||
'GITHUB_EVENT_NAME',
|
||||
'GITHUB_REF',
|
||||
'GITHUB_ACTOR'
|
||||
]
|
||||
})
|
||||
|
||||
export async function getUserInfo(username?: string) {
|
||||
if (!username) return undefined
|
||||
|
||||
const res = await tools.github.users.getByUsername({ username })
|
||||
|
||||
core.debug(
|
||||
`Fetched github actor from the API: ${JSON.stringify(res?.data, null, 2)}`
|
||||
)
|
||||
|
||||
return {
|
||||
name: res?.data?.name,
|
||||
email: res?.data?.email
|
||||
}
|
||||
}
|
||||
|
||||
export function log(err: any | Error, data?: any) {
|
||||
if (data) console.log(data)
|
||||
if (err) core.error(err)
|
||||
}
|
||||
|
||||
/**
|
||||
* Matches the given string to an array of arguments.
|
||||
* The parsing is made by `string-argv`: if your way of using argument is not supported, the issue is theirs!
|
||||
* {@link https://www.npm.im/string-argv}
|
||||
* @example
|
||||
* ```js
|
||||
* matchGitArgs(`
|
||||
-s
|
||||
--longOption 'This uses the "other" quotes'
|
||||
--foo 1234
|
||||
--file=message.txt
|
||||
--file2="Application 'Support'/\"message\".txt"
|
||||
`) => [
|
||||
'-s',
|
||||
'--longOption',
|
||||
'This uses the "other" quotes',
|
||||
'--foo',
|
||||
'1234',
|
||||
'--file=message.txt',
|
||||
`--file2="Application 'Support'/\\"message\\".txt"`
|
||||
]
|
||||
* matchGitArgs(' ') => [ ]
|
||||
* ```
|
||||
* @returns An array, if there's no match it'll be empty
|
||||
*/
|
||||
export function matchGitArgs(string: string) {
|
||||
const parsed = parseArgsStringToArgv(string)
|
||||
core.debug(`Git args parsed:
|
||||
- Original: ${string}
|
||||
- Parsed: ${JSON.stringify(parsed)}`)
|
||||
return parsed
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to parse a JSON array, then a YAML array.
|
||||
* If both fail, it returns an array containing the input value as its only element
|
||||
*/
|
||||
export function parseInputArray(input: string): string[] {
|
||||
try {
|
||||
const json = JSON.parse(input)
|
||||
if (
|
||||
json &&
|
||||
Array.isArray(json) &&
|
||||
json.every((e) => typeof e == 'string')
|
||||
) {
|
||||
core.debug(`Input parsed as JSON array of length ${json.length}`)
|
||||
return json
|
||||
}
|
||||
} catch {}
|
||||
|
||||
try {
|
||||
const yaml = YAML.load(input)
|
||||
if (
|
||||
yaml &&
|
||||
Array.isArray(yaml) &&
|
||||
yaml.every((e) => typeof e == 'string')
|
||||
) {
|
||||
core.debug(`Input parsed as YAML array of length ${yaml.length}`)
|
||||
return yaml
|
||||
}
|
||||
} catch {}
|
||||
|
||||
core.debug('Input parsed as single string')
|
||||
return [input]
|
||||
}
|
||||
|
||||
export function readJSON(filePath: string) {
|
||||
let fileContent: string
|
||||
try {
|
||||
fileContent = fs.readFileSync(filePath, { encoding: 'utf8' })
|
||||
} catch {
|
||||
throw `Couldn't read file. File path: ${filePath}`
|
||||
}
|
||||
|
||||
try {
|
||||
return JSON.parse(fileContent)
|
||||
} catch {
|
||||
throw `Couldn't parse file to JSON. File path: ${filePath}`
|
||||
}
|
||||
}
|
||||
62
tsconfig.json
Normal file
62
tsconfig.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Basic Options */
|
||||
// "incremental": true, /* Enable incremental compilation */
|
||||
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||
// "checkJs": true, /* Report errors in .js files. */
|
||||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
||||
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||
"outDir": "./build", /* Redirect output structure to the directory. */
|
||||
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||
// "composite": true, /* Enable project compilation */
|
||||
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
||||
// "removeComments": true, /* Do not emit comments to output. */
|
||||
// "noEmit": true, /* Do not emit outputs. */
|
||||
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
||||
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
||||
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
||||
/* Strict Type-Checking Options */
|
||||
"strict": true, /* Enable all strict type-checking options. */
|
||||
"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
/* Additional Checks */
|
||||
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
||||
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
||||
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
/* Module Resolution Options */
|
||||
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||
// "types": [], /* Type declaration files to be included in compilation. */
|
||||
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||
/* Source Map Options */
|
||||
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
||||
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
||||
/* Experimental Options */
|
||||
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
||||
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/*.test.ts",
|
||||
"scripts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user