Skip to content

Commit

Permalink
Fix pluralisation of runner-ups. Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
zozs committed Jan 25, 2024
1 parent e288583 commit 1fc6216
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ A wild BUTTON appears is licensed under GNU AGPL v3 or later, see the `LICENSE`

```
a-wild-button-appears - a slack bot for posting random buttons
Copyright (c) 2018, 2019, 2020, 2021, 2022, Linus Karlsson
Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023, 2024, Linus Karlsson
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down
2 changes: 1 addition & 1 deletion __tests__/click.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ describe('click handler to', () => {
expect(slack.sendReplacingResponse.mock.calls[1][0]).toBe(clickMockResponseUrl)
expect(JSON.stringify(slack.sendReplacingResponse.mock.calls[1][1])).toMatch(/<@UA8RXUSPL> won \(4.113 s\)/)
expect(JSON.stringify(slack.sendReplacingResponse.mock.calls[1][1])).toMatch(/<@otheruser> \(4.114 s\)/)
expect(JSON.stringify(slack.sendReplacingResponse.mock.calls[1][1])).toMatch(/<@otheruser> \(4.12 s\) was close/)
expect(JSON.stringify(slack.sendReplacingResponse.mock.calls[1][1])).toMatch(/<@otheruser> \(4.12 s\) were close/)
expect(JSON.stringify(slack.sendReplacingResponse.mock.calls[1][1])).toMatch(/4\.113 s/)
expect(JSON.stringify(slack.sendReplacingResponse.mock.calls[1][1])).toMatch(/4\.114 s/)
expect(JSON.stringify(slack.sendReplacingResponse.mock.calls[1][1])).toMatch(/4\.12 s/)
Expand Down
3 changes: 2 additions & 1 deletion click.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ function wonMessageFormatter (uuid, clickData) {
]

if (runnersUp.length > 0) {
const verb = runnersUp.length === 1 ? 'was' : 'were'
blocks.push({
type: 'context',
elements: [
{
type: 'mrkdwn',
text: runnersUpTexts.join(', ') + ' was close!'
text: runnersUpTexts.join(', ') + ` ${verb} close!`
}
]
})
Expand Down
56 changes: 26 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@sentry/tracing": "^7.7.0",
"@slack/events-api": "^3.0.1",
"@slack/web-api": "^6.5.1",
"@slack/webhook": "^6.0.0",
"@slack/webhook": "^7.0.2",
"countries-and-timezones": "^3.3.0",
"dotenv": "^16.0.1",
"express": "^4.17.1",
Expand Down

0 comments on commit 1fc6216

Please sign in to comment.