Skip to content

Commit 7407756

Browse files
committed
fix formatting
1 parent 8ab5d84 commit 7407756

18 files changed

Lines changed: 46 additions & 45 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
SLACK_BOT_TOKEN=xoxb-
22
SLACK_APP_TOKEN=xapp-
33
GITHUB_TOKEN=github_pat_
4-
DATABASE_URL=postgres://user:password@localhost/releases_db
4+
DATABASE_URL=postgres://user:password@localhost/releases_db

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Drizzle internal state never hand-edited
1+
# Drizzle internal state - never hand-edited
22
drizzle/meta/*.json linguist-generated=true

.githooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
set -e
44
set -o pipefail
55

6-
bun run lint
6+
bun run lint

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ jobs:
5858
tag-name: v${{ steps.version.outputs.version }}
5959
- uses: aboutbits/github-actions-base/github-create-release@v2
6060
with:
61-
tag-name: v${{ steps.version.outputs.version }}
61+
tag-name: v${{ steps.version.outputs.version }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ COPY drizzle/ ./drizzle/
1313
# Non root user
1414
USER bun
1515

16-
CMD ["bun", "run", "src/index.ts"]
16+
CMD ["bun", "run", "src/index.ts"]

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default defineConfig([
1313
rules: {
1414
// Ignore Bun built-in module specifiers (bun:test, bun:sqlite, etc.)
1515
'import/no-unresolved': ['error', { ignore: ['^bun:'] }],
16-
// Backend app console logging is intentional
16+
// Backend app - console logging is intentional
1717
'no-console': 'off',
1818
},
1919
},

installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ This guide covers self-hosting the Release Monitor Slack app. The app runs as a
1515

1616
You need to create a Slack app in your workspace:
1717

18-
1. Go to [api.slack.com/apps](https://api.slack.com/apps) and click **Create New App From an app manifest**.
18+
1. Go to [api.slack.com/apps](https://api.slack.com/apps) and click **Create New App -> From an app manifest**.
1919
2. Paste the contents of [`manifest.json`](./manifest.json) from this repository.
2020
3. Install the app to your workspace.
2121
4. Under **OAuth & Permissions**, copy the **Bot User OAuth Token** (`xoxb-…`).
22-
5. Under **Basic Information App-Level Tokens**, create a token with the `connections:write` scope and copy it (`xapp-…`).
22+
5. Under **Basic Information -> App-Level Tokens**, create a token with the `connections:write` scope and copy it (`xapp-…`).
2323

2424
### Forges
2525

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
A Slack bot that monitors repositories for new releases and posts updates to your channels.
44

5-
- **Daily digest** one message per channel per day, grouped by repo
6-
- **Immediate notifications** get notified right away for every new stable release
7-
- **Instant security alerts** security releases are posted immediately to all subscribers regardless of their notification mode
8-
- **Per-channel subscriptions** each channel manages its own list independently
5+
- **Daily digest** - one message per channel per day, grouped by repo
6+
- **Immediate notifications** - get notified right away for every new stable release
7+
- **Instant security alerts** - security releases are posted immediately to all subscribers regardless of their notification mode
8+
- **Per-channel subscriptions** - each channel manages its own list independently
99

1010
## Commands
1111

src/classify/security.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function release(overrides: Partial<Release> = {}): Release {
1313
}
1414
}
1515

16-
describe('checkSecurityRelease definitive identifiers', () => {
16+
describe('checkSecurityRelease - definitive identifiers', () => {
1717
test.each([
1818
{
1919
body: 'Fixes CVE-2024-12345.',
@@ -28,7 +28,7 @@ describe('checkSecurityRelease — definitive identifiers', () => {
2828
expectedReason: 'Contains OSV identifier',
2929
},
3030
])(
31-
'$expectedReason in body high confidence',
31+
'$expectedReason in body -> high confidence',
3232
({ body, expectedReason }) => {
3333
const result = checkSecurityRelease(release({ body }))
3434
expect(result.isSecurity).toBe(true)
@@ -54,7 +54,7 @@ describe('checkSecurityRelease — definitive identifiers', () => {
5454
})
5555
})
5656

57-
describe('checkSecurityRelease strong phrase signals', () => {
57+
describe('checkSecurityRelease - strong phrase signals', () => {
5858
test.each([
5959
{
6060
body: 'security advisory released',
@@ -105,14 +105,14 @@ describe('checkSecurityRelease — strong phrase signals', () => {
105105
{ body: 'exploitable buffer', expectedReason: 'Mentions exploit' },
106106
{ body: 'exploited in the wild', expectedReason: 'Mentions exploit' },
107107
{ body: 'CVSS score 9.8', expectedReason: 'Mentions CVSS score' },
108-
])('$expectedReason isSecurity', ({ body, expectedReason }) => {
108+
])('$expectedReason -> isSecurity', ({ body, expectedReason }) => {
109109
const result = checkSecurityRelease(release({ body }))
110110
expect(result.isSecurity).toBe(true)
111111
expect(result.reasons).toContain(expectedReason)
112112
})
113113
})
114114

115-
describe('checkSecurityRelease medium phrase signals', () => {
115+
describe('checkSecurityRelease - medium phrase signals', () => {
116116
test.each([
117117
{
118118
body: 'security fix included',
@@ -186,14 +186,14 @@ describe('checkSecurityRelease — medium phrase signals', () => {
186186
body: 'improper authorization logic',
187187
expectedReason: 'Mentions improper validation/auth',
188188
},
189-
])('$expectedReason isSecurity', ({ body, expectedReason }) => {
189+
])('$expectedReason -> isSecurity', ({ body, expectedReason }) => {
190190
const result = checkSecurityRelease(release({ body }))
191191
expect(result.isSecurity).toBe(true)
192192
expect(result.reasons).toContain(expectedReason)
193193
})
194194
})
195195

196-
describe('checkSecurityRelease markdown section headers', () => {
196+
describe('checkSecurityRelease - markdown section headers', () => {
197197
test.each([
198198
{
199199
body: '## Security\nFixed an issue.',
@@ -211,14 +211,14 @@ describe('checkSecurityRelease — markdown section headers', () => {
211211
body: '## Vulnerabilities\nSee below.',
212212
expectedReason: 'Has Vulnerabilities section header',
213213
},
214-
])('$expectedReason isSecurity', ({ body, expectedReason }) => {
214+
])('$expectedReason -> isSecurity', ({ body, expectedReason }) => {
215215
const result = checkSecurityRelease(release({ body }))
216216
expect(result.isSecurity).toBe(true)
217217
expect(result.reasons).toContain(expectedReason)
218218
})
219219
})
220220

221-
describe('checkSecurityRelease corroboration rule (weak signals only)', () => {
221+
describe('checkSecurityRelease - corroboration rule (weak signals only)', () => {
222222
test.each([
223223
{
224224
label: 'single weak signal below threshold',
@@ -231,7 +231,7 @@ describe('checkSecurityRelease — corroboration rule (weak signals only)', () =
231231
body: 'This is critical. A malicious attacker could abuse this. Urgent.',
232232
},
233233
// "critical" (2) + "malicious" (2) + "attacker" (2) + "urgent" (1) = 7,
234-
// but all requiresCorroboration hasNonWeakMatch stays false
234+
// but all requiresCorroboration -> hasNonWeakMatch stays false
235235
},
236236
{
237237
label: 'weak signals split across title and body',
@@ -240,15 +240,15 @@ describe('checkSecurityRelease — corroboration rule (weak signals only)', () =
240240
body: 'Improved security hardening across the board.',
241241
},
242242
// "critical" in title (2 × 1.5 = 3) + "security" in body (2) = 5 ≥ threshold,
243-
// but both requiresCorroboration hasNonWeakMatch stays false
243+
// but both requiresCorroboration -> hasNonWeakMatch stays false
244244
},
245-
])('$label not flagged as security', ({ overrides }) => {
245+
])('$label -> not flagged as security', ({ overrides }) => {
246246
const result = checkSecurityRelease(release(overrides))
247247
expect(result.isSecurity).toBe(false)
248248
})
249249
})
250250

251-
describe('checkSecurityRelease non-security releases', () => {
251+
describe('checkSecurityRelease - non-security releases', () => {
252252
test.each([
253253
{ body: '', label: 'empty body' },
254254
{
@@ -259,7 +259,7 @@ describe('checkSecurityRelease — non-security releases', () => {
259259
body: 'Bug fixes and stability improvements.',
260260
label: 'generic bug fix',
261261
},
262-
])('$label not security', ({ body }) => {
262+
])('$label -> not security', ({ body }) => {
263263
const result = checkSecurityRelease(release({ body }))
264264
expect(result.isSecurity).toBe(false)
265265
})
@@ -272,7 +272,7 @@ describe('checkSecurityRelease — non-security releases', () => {
272272
})
273273
})
274274

275-
describe('checkSecurityRelease confidence levels', () => {
275+
describe('checkSecurityRelease - confidence levels', () => {
276276
test.each([
277277
{
278278
body: 'CVE-2024-00001 patched.',
@@ -290,15 +290,15 @@ describe('checkSecurityRelease — confidence levels', () => {
290290
label: 'score ≥ 5 and < 7',
291291
},
292292
] as const)(
293-
'$label $expectedConfidence confidence',
293+
'$label -> $expectedConfidence confidence',
294294
({ body, expectedConfidence }) => {
295295
const result = checkSecurityRelease(release({ body }))
296296
expect(result.confidence).toBe(expectedConfidence)
297297
},
298298
)
299299
})
300300

301-
describe('checkSecurityRelease deduplication of reasons', () => {
301+
describe('checkSecurityRelease - deduplication of reasons', () => {
302302
test('same signal in title and body appears only once in reasons', () => {
303303
const result = checkSecurityRelease(
304304
release({

src/classify/security.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const SECURITY_SIGNALS: Signal[] = [
2727
reason: 'Contains OSV identifier',
2828
},
2929

30-
// Markdown section header very strong signal, maintainers don't add this casually.
30+
// Markdown section header - very strong signal, maintainers don't add this casually.
3131
{
3232
pattern: /^#+\s*security(\s+(fixes?|updates?|advisor))?/im,
3333
weight: 9,

0 commit comments

Comments
 (0)