forge
login
or
join now
clay.rip
/
bluesky-commit-bot
star
0
fork
atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
babies first atproto thingy
star
0
fork
atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
overview
issues
pulls
pipelines
initial
Clay
3 months ago
3c40e3f2
+598
8 changed files
expand all
collapse all
unified
split
.env.example
.gitignore
.vscode
settings.json
README.md
deno.json
deno.lock
main.ts
usermap.json
+10
.env.example
reviewed
···
1
1
+
# express
2
2
+
PORT=3000
3
3
+
4
4
+
# github
5
5
+
WEBHOOK_SECRET=yourwebhooksecret
6
6
+
7
7
+
# atproto
8
8
+
IDENTIFIER=balls.bsky.social
9
9
+
PASSWORD=nuhuh
10
10
+
PDS=https://bsky.social
+1
.gitignore
reviewed
···
1
1
+
.env
+3
.vscode/settings.json
reviewed
···
1
1
+
{
2
2
+
"deno.enable": true
3
3
+
}
+5
README.md
reviewed
···
1
1
+
# bluesky commit bot
2
2
+
3
3
+
thingy that posts whenever you commit to a github repo
4
4
+
5
5
+
uhh completely untested atm but whatever 👍
+6
deno.json
reviewed
···
1
1
+
{
2
2
+
"imports": {
3
3
+
"@atproto/api": "npm:@atproto/api@^0.18.18",
4
4
+
"express": "npm:express@^5.2.1"
5
5
+
}
6
6
+
}
+477
deno.lock
reviewed
···
1
1
+
{
2
2
+
"version": "5",
3
3
+
"specifiers": {
4
4
+
"npm:@atproto/api@~0.18.18": "0.18.18",
5
5
+
"npm:express@^5.2.1": "5.2.1"
6
6
+
},
7
7
+
"npm": {
8
8
+
"@atproto/api@0.18.18": {
9
9
+
"integrity": "sha512-Vg7/sjbwDQZDj8fXtb4E48U4gA+6RC1iSt7onGnH2NyR0E25uds1KnqSKMzqcphdJXrz5GXrgHWc747XPGibzg==",
10
10
+
"dependencies": [
11
11
+
"@atproto/common-web",
12
12
+
"@atproto/lexicon",
13
13
+
"@atproto/syntax",
14
14
+
"@atproto/xrpc",
15
15
+
"await-lock",
16
16
+
"multiformats",
17
17
+
"tlds",
18
18
+
"zod"
19
19
+
]
20
20
+
},
21
21
+
"@atproto/common-web@0.4.14": {
22
22
+
"integrity": "sha512-rMU8Q+kpyPpirUS9OqT7aOD1hxKa+diem3vc7BA0lOkj0tU6wcAxegxmbPZ8JaOsR7SSYhP/jCt/5wbT4qqkuQ==",
23
23
+
"dependencies": [
24
24
+
"@atproto/lex-data",
25
25
+
"@atproto/lex-json",
26
26
+
"@atproto/syntax",
27
27
+
"zod"
28
28
+
]
29
29
+
},
30
30
+
"@atproto/lex-data@0.0.9": {
31
31
+
"integrity": "sha512-1slwe4sG0cyWtsq16+rBoWIxNDqGPkkvN+PV6JuzA7dgUK9bjUmXBGQU4eZlUPSS43X1Nhmr/9VjgKmEzU9vDw==",
32
32
+
"dependencies": [
33
33
+
"multiformats",
34
34
+
"tslib",
35
35
+
"uint8arrays",
36
36
+
"unicode-segmenter"
37
37
+
]
38
38
+
},
39
39
+
"@atproto/lex-json@0.0.9": {
40
40
+
"integrity": "sha512-Q2v1EVZcnd+ndyZj1r2UlGikA7q6It24CFPLbxokcf5Ba4RBupH8IkkQX7mqUDSRWPgQdmZYIdW9wUln+MKDqw==",
41
41
+
"dependencies": [
42
42
+
"@atproto/lex-data",
43
43
+
"tslib"
44
44
+
]
45
45
+
},
46
46
+
"@atproto/lexicon@0.6.1": {
47
47
+
"integrity": "sha512-/vI1kVlY50Si+5MXpvOucelnYwb0UJ6Qto5mCp+7Q5C+Jtp+SoSykAPVvjVtTnQUH2vrKOFOwpb3C375vSKzXw==",
48
48
+
"dependencies": [
49
49
+
"@atproto/common-web",
50
50
+
"@atproto/syntax",
51
51
+
"iso-datestring-validator",
52
52
+
"multiformats",
53
53
+
"zod"
54
54
+
]
55
55
+
},
56
56
+
"@atproto/syntax@0.4.3": {
57
57
+
"integrity": "sha512-YoZUz40YAJr5nPwvCDWgodEOlt5IftZqPJvA0JDWjuZKD8yXddTwSzXSaKQAzGOpuM+/A3uXRtPzJJqlScc+iA==",
58
58
+
"dependencies": [
59
59
+
"tslib"
60
60
+
]
61
61
+
},
62
62
+
"@atproto/xrpc@0.7.7": {
63
63
+
"integrity": "sha512-K1ZyO/BU8JNtXX5dmPp7b5UrkLMMqpsIa/Lrj5D3Su+j1Xwq1m6QJ2XJ1AgjEjkI1v4Muzm7klianLE6XGxtmA==",
64
64
+
"dependencies": [
65
65
+
"@atproto/lexicon",
66
66
+
"zod"
67
67
+
]
68
68
+
},
69
69
+
"accepts@2.0.0": {
70
70
+
"integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
71
71
+
"dependencies": [
72
72
+
"mime-types",
73
73
+
"negotiator"
74
74
+
]
75
75
+
},
76
76
+
"await-lock@2.2.2": {
77
77
+
"integrity": "sha512-aDczADvlvTGajTDjcjpJMqRkOF6Qdz3YbPZm/PyW6tKPkx2hlYBzxMhEywM/tU72HrVZjgl5VCdRuMlA7pZ8Gw=="
78
78
+
},
79
79
+
"body-parser@2.2.1": {
80
80
+
"integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==",
81
81
+
"dependencies": [
82
82
+
"bytes",
83
83
+
"content-type",
84
84
+
"debug",
85
85
+
"http-errors",
86
86
+
"iconv-lite",
87
87
+
"on-finished",
88
88
+
"qs",
89
89
+
"raw-body",
90
90
+
"type-is"
91
91
+
]
92
92
+
},
93
93
+
"bytes@3.1.2": {
94
94
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
95
95
+
},
96
96
+
"call-bind-apply-helpers@1.0.2": {
97
97
+
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
98
98
+
"dependencies": [
99
99
+
"es-errors",
100
100
+
"function-bind"
101
101
+
]
102
102
+
},
103
103
+
"call-bound@1.0.4": {
104
104
+
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
105
105
+
"dependencies": [
106
106
+
"call-bind-apply-helpers",
107
107
+
"get-intrinsic"
108
108
+
]
109
109
+
},
110
110
+
"content-disposition@1.0.1": {
111
111
+
"integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q=="
112
112
+
},
113
113
+
"content-type@1.0.5": {
114
114
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="
115
115
+
},
116
116
+
"cookie-signature@1.2.2": {
117
117
+
"integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg=="
118
118
+
},
119
119
+
"cookie@0.7.2": {
120
120
+
"integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="
121
121
+
},
122
122
+
"debug@4.4.3": {
123
123
+
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
124
124
+
"dependencies": [
125
125
+
"ms"
126
126
+
]
127
127
+
},
128
128
+
"depd@2.0.0": {
129
129
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
130
130
+
},
131
131
+
"dunder-proto@1.0.1": {
132
132
+
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
133
133
+
"dependencies": [
134
134
+
"call-bind-apply-helpers",
135
135
+
"es-errors",
136
136
+
"gopd"
137
137
+
]
138
138
+
},
139
139
+
"ee-first@1.1.1": {
140
140
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
141
141
+
},
142
142
+
"encodeurl@2.0.0": {
143
143
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="
144
144
+
},
145
145
+
"es-define-property@1.0.1": {
146
146
+
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="
147
147
+
},
148
148
+
"es-errors@1.3.0": {
149
149
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="
150
150
+
},
151
151
+
"es-object-atoms@1.1.1": {
152
152
+
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
153
153
+
"dependencies": [
154
154
+
"es-errors"
155
155
+
]
156
156
+
},
157
157
+
"escape-html@1.0.3": {
158
158
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
159
159
+
},
160
160
+
"etag@1.8.1": {
161
161
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="
162
162
+
},
163
163
+
"express@5.2.1": {
164
164
+
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
165
165
+
"dependencies": [
166
166
+
"accepts",
167
167
+
"body-parser",
168
168
+
"content-disposition",
169
169
+
"content-type",
170
170
+
"cookie",
171
171
+
"cookie-signature",
172
172
+
"debug",
173
173
+
"depd",
174
174
+
"encodeurl",
175
175
+
"escape-html",
176
176
+
"etag",
177
177
+
"finalhandler",
178
178
+
"fresh",
179
179
+
"http-errors",
180
180
+
"merge-descriptors",
181
181
+
"mime-types",
182
182
+
"on-finished",
183
183
+
"once",
184
184
+
"parseurl",
185
185
+
"proxy-addr",
186
186
+
"qs",
187
187
+
"range-parser",
188
188
+
"router",
189
189
+
"send",
190
190
+
"serve-static",
191
191
+
"statuses",
192
192
+
"type-is",
193
193
+
"vary"
194
194
+
]
195
195
+
},
196
196
+
"finalhandler@2.1.1": {
197
197
+
"integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
198
198
+
"dependencies": [
199
199
+
"debug",
200
200
+
"encodeurl",
201
201
+
"escape-html",
202
202
+
"on-finished",
203
203
+
"parseurl",
204
204
+
"statuses"
205
205
+
]
206
206
+
},
207
207
+
"forwarded@0.2.0": {
208
208
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
209
209
+
},
210
210
+
"fresh@2.0.0": {
211
211
+
"integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="
212
212
+
},
213
213
+
"function-bind@1.1.2": {
214
214
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
215
215
+
},
216
216
+
"get-intrinsic@1.3.0": {
217
217
+
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
218
218
+
"dependencies": [
219
219
+
"call-bind-apply-helpers",
220
220
+
"es-define-property",
221
221
+
"es-errors",
222
222
+
"es-object-atoms",
223
223
+
"function-bind",
224
224
+
"get-proto",
225
225
+
"gopd",
226
226
+
"has-symbols",
227
227
+
"hasown",
228
228
+
"math-intrinsics"
229
229
+
]
230
230
+
},
231
231
+
"get-proto@1.0.1": {
232
232
+
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
233
233
+
"dependencies": [
234
234
+
"dunder-proto",
235
235
+
"es-object-atoms"
236
236
+
]
237
237
+
},
238
238
+
"gopd@1.2.0": {
239
239
+
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="
240
240
+
},
241
241
+
"has-symbols@1.1.0": {
242
242
+
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="
243
243
+
},
244
244
+
"hasown@2.0.2": {
245
245
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
246
246
+
"dependencies": [
247
247
+
"function-bind"
248
248
+
]
249
249
+
},
250
250
+
"http-errors@2.0.1": {
251
251
+
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
252
252
+
"dependencies": [
253
253
+
"depd",
254
254
+
"inherits",
255
255
+
"setprototypeof",
256
256
+
"statuses",
257
257
+
"toidentifier"
258
258
+
]
259
259
+
},
260
260
+
"iconv-lite@0.7.1": {
261
261
+
"integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==",
262
262
+
"dependencies": [
263
263
+
"safer-buffer"
264
264
+
]
265
265
+
},
266
266
+
"inherits@2.0.4": {
267
267
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
268
268
+
},
269
269
+
"ipaddr.js@1.9.1": {
270
270
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
271
271
+
},
272
272
+
"is-promise@4.0.0": {
273
273
+
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="
274
274
+
},
275
275
+
"iso-datestring-validator@2.2.2": {
276
276
+
"integrity": "sha512-yLEMkBbLZTlVQqOnQ4FiMujR6T4DEcCb1xizmvXS+OxuhwcbtynoosRzdMA69zZCShCNAbi+gJ71FxZBBXx1SA=="
277
277
+
},
278
278
+
"math-intrinsics@1.1.0": {
279
279
+
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="
280
280
+
},
281
281
+
"media-typer@1.1.0": {
282
282
+
"integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw=="
283
283
+
},
284
284
+
"merge-descriptors@2.0.0": {
285
285
+
"integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="
286
286
+
},
287
287
+
"mime-db@1.54.0": {
288
288
+
"integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="
289
289
+
},
290
290
+
"mime-types@3.0.2": {
291
291
+
"integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
292
292
+
"dependencies": [
293
293
+
"mime-db"
294
294
+
]
295
295
+
},
296
296
+
"ms@2.1.3": {
297
297
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
298
298
+
},
299
299
+
"multiformats@9.9.0": {
300
300
+
"integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg=="
301
301
+
},
302
302
+
"negotiator@1.0.0": {
303
303
+
"integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="
304
304
+
},
305
305
+
"object-inspect@1.13.4": {
306
306
+
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="
307
307
+
},
308
308
+
"on-finished@2.4.1": {
309
309
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
310
310
+
"dependencies": [
311
311
+
"ee-first"
312
312
+
]
313
313
+
},
314
314
+
"once@1.4.0": {
315
315
+
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
316
316
+
"dependencies": [
317
317
+
"wrappy"
318
318
+
]
319
319
+
},
320
320
+
"parseurl@1.3.3": {
321
321
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
322
322
+
},
323
323
+
"path-to-regexp@8.3.0": {
324
324
+
"integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA=="
325
325
+
},
326
326
+
"proxy-addr@2.0.7": {
327
327
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
328
328
+
"dependencies": [
329
329
+
"forwarded",
330
330
+
"ipaddr.js"
331
331
+
]
332
332
+
},
333
333
+
"qs@6.14.0": {
334
334
+
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
335
335
+
"dependencies": [
336
336
+
"side-channel"
337
337
+
]
338
338
+
},
339
339
+
"range-parser@1.2.1": {
340
340
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
341
341
+
},
342
342
+
"raw-body@3.0.2": {
343
343
+
"integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
344
344
+
"dependencies": [
345
345
+
"bytes",
346
346
+
"http-errors",
347
347
+
"iconv-lite",
348
348
+
"unpipe"
349
349
+
]
350
350
+
},
351
351
+
"router@2.2.0": {
352
352
+
"integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
353
353
+
"dependencies": [
354
354
+
"debug",
355
355
+
"depd",
356
356
+
"is-promise",
357
357
+
"parseurl",
358
358
+
"path-to-regexp"
359
359
+
]
360
360
+
},
361
361
+
"safer-buffer@2.1.2": {
362
362
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
363
363
+
},
364
364
+
"send@1.2.1": {
365
365
+
"integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
366
366
+
"dependencies": [
367
367
+
"debug",
368
368
+
"encodeurl",
369
369
+
"escape-html",
370
370
+
"etag",
371
371
+
"fresh",
372
372
+
"http-errors",
373
373
+
"mime-types",
374
374
+
"ms",
375
375
+
"on-finished",
376
376
+
"range-parser",
377
377
+
"statuses"
378
378
+
]
379
379
+
},
380
380
+
"serve-static@2.2.1": {
381
381
+
"integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
382
382
+
"dependencies": [
383
383
+
"encodeurl",
384
384
+
"escape-html",
385
385
+
"parseurl",
386
386
+
"send"
387
387
+
]
388
388
+
},
389
389
+
"setprototypeof@1.2.0": {
390
390
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
391
391
+
},
392
392
+
"side-channel-list@1.0.0": {
393
393
+
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
394
394
+
"dependencies": [
395
395
+
"es-errors",
396
396
+
"object-inspect"
397
397
+
]
398
398
+
},
399
399
+
"side-channel-map@1.0.1": {
400
400
+
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
401
401
+
"dependencies": [
402
402
+
"call-bound",
403
403
+
"es-errors",
404
404
+
"get-intrinsic",
405
405
+
"object-inspect"
406
406
+
]
407
407
+
},
408
408
+
"side-channel-weakmap@1.0.2": {
409
409
+
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
410
410
+
"dependencies": [
411
411
+
"call-bound",
412
412
+
"es-errors",
413
413
+
"get-intrinsic",
414
414
+
"object-inspect",
415
415
+
"side-channel-map"
416
416
+
]
417
417
+
},
418
418
+
"side-channel@1.1.0": {
419
419
+
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
420
420
+
"dependencies": [
421
421
+
"es-errors",
422
422
+
"object-inspect",
423
423
+
"side-channel-list",
424
424
+
"side-channel-map",
425
425
+
"side-channel-weakmap"
426
426
+
]
427
427
+
},
428
428
+
"statuses@2.0.2": {
429
429
+
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="
430
430
+
},
431
431
+
"tlds@1.261.0": {
432
432
+
"integrity": "sha512-QXqwfEl9ddlGBaRFXIvNKK6OhipSiLXuRuLJX5DErz0o0Q0rYxulWLdFryTkV5PkdZct5iMInwYEGe/eR++1AA==",
433
433
+
"bin": true
434
434
+
},
435
435
+
"toidentifier@1.0.1": {
436
436
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
437
437
+
},
438
438
+
"tslib@2.8.1": {
439
439
+
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="
440
440
+
},
441
441
+
"type-is@2.0.1": {
442
442
+
"integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
443
443
+
"dependencies": [
444
444
+
"content-type",
445
445
+
"media-typer",
446
446
+
"mime-types"
447
447
+
]
448
448
+
},
449
449
+
"uint8arrays@3.0.0": {
450
450
+
"integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==",
451
451
+
"dependencies": [
452
452
+
"multiformats"
453
453
+
]
454
454
+
},
455
455
+
"unicode-segmenter@0.14.5": {
456
456
+
"integrity": "sha512-jHGmj2LUuqDcX3hqY12Ql+uhUTn8huuxNZGq7GvtF6bSybzH3aFgedYu/KTzQStEgt1Ra2F3HxadNXsNjb3m3g=="
457
457
+
},
458
458
+
"unpipe@1.0.0": {
459
459
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="
460
460
+
},
461
461
+
"vary@1.1.2": {
462
462
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
463
463
+
},
464
464
+
"wrappy@1.0.2": {
465
465
+
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
466
466
+
},
467
467
+
"zod@3.25.76": {
468
468
+
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="
469
469
+
}
470
470
+
},
471
471
+
"workspace": {
472
472
+
"dependencies": [
473
473
+
"npm:@atproto/api@~0.18.18",
474
474
+
"npm:express@^5.2.1"
475
475
+
]
476
476
+
}
477
477
+
}
+90
main.ts
reviewed
···
1
1
+
import { AtpAgent, RichText } from "@atproto/api";
2
2
+
import express from "express";
3
3
+
import { timingSafeEqual } from "node:crypto";
4
4
+
import { Buffer } from "node:buffer";
5
5
+
6
6
+
const usermap: Record<string, string> = JSON.parse(
7
7
+
await Deno.readTextFile(new URL("./usermap.json", import.meta.url)),
8
8
+
);
9
9
+
10
10
+
const WEBHOOK_SECRET = Deno.env.get("WEBHOOK_SECRET")!;
11
11
+
12
12
+
const agent = new AtpAgent({
13
13
+
service: Deno.env.get("PDS")!,
14
14
+
});
15
15
+
const app = express();
16
16
+
17
17
+
await agent.login({
18
18
+
identifier: Deno.env.get("IDENTIFIER")!,
19
19
+
password: Deno.env.get("PASSWORD")!,
20
20
+
});
21
21
+
22
22
+
async function verifySignature(
23
23
+
payload: string,
24
24
+
signature: string,
25
25
+
): Promise<boolean> {
26
26
+
const key = await crypto.subtle.importKey(
27
27
+
"raw",
28
28
+
new TextEncoder().encode(WEBHOOK_SECRET),
29
29
+
{ name: "HMAC", hash: "SHA-256" },
30
30
+
false,
31
31
+
["sign"],
32
32
+
);
33
33
+
const sig = await crypto.subtle.sign(
34
34
+
"HMAC",
35
35
+
key,
36
36
+
new TextEncoder().encode(payload),
37
37
+
);
38
38
+
const expected = `sha256=${Array.from(new Uint8Array(sig))
39
39
+
.map((b) => b.toString(16).padStart(2, "0"))
40
40
+
.join("")}`;
41
41
+
try {
42
42
+
return timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
43
43
+
} catch {
44
44
+
return false;
45
45
+
}
46
46
+
}
47
47
+
48
48
+
app.post(
49
49
+
"/webhook",
50
50
+
express.text({ type: "application/json" }),
51
51
+
async (req: any, res: any) => {
52
52
+
const signature = req.headers["x-hub-signature-256"];
53
53
+
if (!signature || !(await verifySignature(req.body, signature))) {
54
54
+
return res.status(401).send("Unauthorized");
55
55
+
}
56
56
+
57
57
+
const payload = JSON.parse(req.body);
58
58
+
res.status(202).send("Accepted");
59
59
+
60
60
+
const githubEvent = req.headers["x-github-event"];
61
61
+
62
62
+
if (githubEvent === "push") {
63
63
+
const commits = payload.commits;
64
64
+
65
65
+
for (const commit of commits) {
66
66
+
if (
67
67
+
commit.author.name === "github-actions[bot]" ||
68
68
+
commit.author.name === "github-actions"
69
69
+
) {
70
70
+
continue;
71
71
+
}
72
72
+
const bskyHandle = usermap[commit.author.username.toLowerCase()];
73
73
+
const author = bskyHandle ? `@${bskyHandle}` : commit.author.name;
74
74
+
const title = commit.message.split("\n")[0];
75
75
+
const message = `${author} - ${title}\n${commit.url}`;
76
76
+
const rt = new RichText({ text: message });
77
77
+
await rt.detectFacets(agent);
78
78
+
await agent.post({
79
79
+
text: rt.text,
80
80
+
facets: rt.facets,
81
81
+
});
82
82
+
}
83
83
+
}
84
84
+
},
85
85
+
);
86
86
+
87
87
+
const PORT = Deno.env.get("PORT") || 3000;
88
88
+
app.listen(PORT, () => {
89
89
+
console.log(`Server is running on port ${PORT}`);
90
90
+
});
+6
usermap.json
reviewed
···
1
1
+
{
2
2
+
"clay": "clay.rip",
3
3
+
"claytontdm": "clay.rip",
4
4
+
"roblnet13": "robinet13.pvzm.net",
5
5
+
"robinet13": "robinet13.pvzm.net"
6
6
+
}