Skip to content

Commit 9f189ae

Browse files
committed
feat: bot name is now @all-contributors
1 parent c0338fc commit 9f189ae

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# The name that the app will respond to (change this for development). e.g. @AllContributorsBot
1+
# The name that the app will respond to (change this for development). e.g. @all-contributors
22
BOT_NAME=AllContributorsDev
33
# The ID of your GitHub App
44
APP_ID=

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ A bot for automatically adding all-contributors. 🤖
1818
## Usage
1919

2020
### Adding contributions
21-
1. Comment on Issue/PR etc with text: `@AllContributorBot please add jakebolam for infrastructure, testing and code` (Can also use the short terms, full key coming soon)
21+
1. Comment on Issue/PR etc with text: `@all-contributors please add jakebolam for infrastructure, testing and code` (Can also use the short terms, full key coming soon)
2222
2. Bot will look for `.all-contributorsrc` if not found, comments on pr to run setup
2323
3. If user exists, add new contribution, if not add user and add contribution
2424

privacy-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ When installing the the app you grant it access to the following three scopes
1616

1717
2. **Read & write access to [issues](https://developer.github.com/v3/apps/permissions/#permission-on-issues)**
1818

19-
The app responds to comments on issues/pull-reuqests when a user types `@AllContributorsBot` the write perimission is required for this behaviour.
19+
The app responds to comments on issues/pull-reuqests when a user types `@all-contributors` the write perimission is required for this behaviour.
2020

2121
3. **Read & write access to [contents](https://developer.github.com/v3/apps/permissions/#permission-on-contents)**
2222

serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ custom:
1111
prod: '23186'
1212
botName:
1313
dev: 'AllContributorsDevBot'
14-
prod: 'AllContributorsBot'
14+
prod: 'all-contributors'
1515
logLevel:
1616
dev: debug
1717
prod: info

src/utils/isMessageForBot.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
const { GIHUB_BOT_NAME } = require('./settings')
22

33
function isMessageForBot(message) {
4-
const isMessageForBot = message.includes(`@${GIHUB_BOT_NAME}`)
4+
const isMessageForBot =
5+
message.includes(`@${GIHUB_BOT_NAME}`) ||
6+
message.includes(`@allcontributors[bot]`) ||
7+
message.includes(`@AllContributorsBot`) // TODO: phase this one out
58
return isMessageForBot
69
}
710

test/utils/isMessageForBot.test.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@ describe('isMessageForBot', () => {
1212

1313
expect(
1414
isMessageForBot(
15-
`@AllContributorsBotTest please add jakebolam for doc, infra and code`,
15+
`@allcontributors[bot] please add jakebolam for doc, infra and code`,
1616
),
1717
).toBe(true)
18+
19+
// TODO: Legacy phase this one out
20+
expect(
21+
isMessageForBot(
22+
`@AllContributorsBot please add jakebolam for doc, infra and code`,
23+
),
24+
).toBe(true)
25+
1826
})
1927

2028
test('Not for us', () => {

0 commit comments

Comments
 (0)