Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions docs/community-automations.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ Manages GitHub issue comments. Sends Slack notifications and GitHub bot replies.
| Contributor type | Issue type | Comment type | #support-dev | #support-dev-notifications | GitHub bot | GitHub bot message |
|------------------|------------|--------------|--------------|---------------------------|------------|-------------------|
| **Core team** | Any | Any | No | No | No | - |
| **Close contributor** | Any | regular, [assign keyword](https://github.com/learningequality/.github/blob/main/scripts/constants.js#L44) | **Yes** | No | No | - |
| **Issue creator** | `help-wanted` | regular, [assign keyword](https://github.com/learningequality/.github/blob/main/scripts/constants.js#L44) | **Yes** | No | No | - |
| **Issue creator** | Private | regular, [assign keyword](https://github.com/learningequality/.github/blob/main/scripts/constants.js#L44) | No | Yes | No | - |
| **Close contributor** | Any | regular, [assign keyword][assign-keywords] | **Yes** | No | No | - |
| **Issue creator** | `help-wanted` | regular, [assign keyword][assign-keywords] | **Yes** | No | No | - |
| **Issue creator** | Private | regular, [assign keyword][assign-keywords] | No | Yes | No | - |
| **Other** | Private | regular | No | Yes | No | - |
| **Other** | Private | [assign keyword](https://github.com/learningequality/.github/blob/main/scripts/constants.js#L44) | No | Yes | Yes`*` | `BOT_MESSAGE_ISSUE_NOT_OPEN` |
| **Other** | Unassigned `help-wanted` (not good first issue) | regular, [assign keyword](https://github.com/learningequality/.github/blob/main/scripts/constants.js#L44) | **Yes** | No | No | - |
| **Other** | Private | [assign keyword][assign-keywords] | No | Yes | Yes`*` | `BOT_MESSAGE_ISSUE_NOT_OPEN` |
| **Other** | Unassigned `help-wanted` (not good first issue) | regular, [assign keyword][assign-keywords] | **Yes** | No | No | - |
| **Other** | Unassigned `help-wanted` + good first issue | regular | **Yes** | No | No | - |
| **Other** | Unassigned `help-wanted` + good first issue | [assign keyword](https://github.com/learningequality/.github/blob/main/scripts/constants.js#L44) | **Yes** | No | Yes`*` | `BOT_MESSAGE_KEYWORD_GOOD_FIRST_ISSUE` |
| **Other** | `help-wanted` assigned to commenter | regular, [assign keyword](https://github.com/learningequality/.github/blob/main/scripts/constants.js#L44) | **Yes** | No | No | - |
| **Other** | Unassigned `help-wanted` + good first issue | [assign keyword][assign-keywords] | **Yes** | No | Yes`*` | `BOT_MESSAGE_KEYWORD_GOOD_FIRST_ISSUE` |
| **Other** | `help-wanted` assigned to commenter | regular, [assign keyword][assign-keywords] | **Yes** | No | No | - |
| **Other** | `help-wanted` assigned to someone else | regular | No | Yes | No | - |
| **Other** | `help-wanted` assigned to someone else | [assign keyword](https://github.com/learningequality/.github/blob/main/scripts/constants.js#L44) | No | Yes | Yes`*` | `BOT_MESSAGE_ALREADY_ASSIGNED` |
| **Other** | `help-wanted` assigned to someone else | [assign keyword][assign-keywords] | No | Yes | Yes`*` | `BOT_MESSAGE_ALREADY_ASSIGNED` |
| **Close contributor** | Private | `/assign` command | No | Yes | Yes | `BOT_MESSAGE_ISSUE_NOT_OPEN` |
| **Close contributor** | `help-wanted` assigned to commenter | `/assign` command | No | No | No | - (silent no-op) |
| **Close contributor** | `help-wanted` assigned to someone else | `/assign` command | No | Yes | Yes | `BOT_MESSAGE_ALREADY_ASSIGNED` |
Expand Down Expand Up @@ -48,6 +48,8 @@ In `scripts/constants.js` set:
- `BOT_MESSAGE_ASSIGN_NOT_GOOD_FIRST_ISSUE`: Decline message for non-good-first-issue issues
- `BOT_MESSAGE_KEYWORD_GOOD_FIRST_ISSUE`: Keyword reply with `/assign` guidance

[assign-keywords]: https://github.com/learningequality/.github/blob/main/scripts/constants.js#L51

# `good-first-issue-comment`

Posts a guidance comment when the `good first issue` or `help wanted` label is applied to an issue. Explains the `/assign` command, issue limits, cooldown, and links to contributing guidelines.
Expand Down
7 changes: 6 additions & 1 deletion scripts/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ const BOT_USERNAMES = [
RTIBBLESBOT_USERNAME,
];

const MAINTAINER_TEAMS = ['le-admins-team', 'read-only-coding-agents', 'triaging-coding-agents'];
const MAINTAINER_TEAMS = [
'le-admins-team',
'read-only-coding-agents',
'triaging-coding-agents',
'learning-equality-code-reviewers',
];

// close contributors are treated a bit special in some workflows,
// for example, we receive a high priority notification about their
Expand Down
10 changes: 10 additions & 0 deletions scripts/is-contributor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ test('an org member outside the maintainer teams is a contributor', async () =>
assert.equal(core.outputs.is_contributor, true);
});

test('a code reviewer is not a contributor whatever the event reports', async () => {
for (const association of ['MEMBER', 'CONTRIBUTOR', 'NONE']) {
const core = await run('reviewer', association, {
teams: { 'learning-equality-code-reviewers': ['reviewer'] },
});

assert.equal(core.outputs.is_contributor, false, association);
}
});

test('a failed membership check fails rather than guessing', async () => {
const github = {
rest: {
Expand Down
Loading