Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
72a09e9
Append info on author activity to Slack notification
MisRob Nov 10, 2025
4696bc7
Improve naming + lint
MisRob Nov 10, 2025
afd99f5
Do not send support-dev notification
MisRob Nov 10, 2025
2c2fc3c
Prevent bot replies on issues reported by the same user
MisRob Nov 10, 2025
1964588
Add workflow documentation
MisRob Nov 10, 2025
d1a411a
Account for multiple assignees
MisRob Nov 10, 2025
e3c92b5
Escape less and greater than characters
MisRob Nov 10, 2025
f7d1d34
Run workflow only on open issues
MisRob Nov 10, 2025
616ad43
Re-organize logic that detects contributors
MisRob Nov 10, 2025
cf687ff
Use is-close-contributor
MisRob Nov 10, 2025
f2928aa
Add defensive check
MisRob Nov 10, 2025
a445d67
Update sheet workflow to follow conventions
MisRob Nov 10, 2025
81dcea2
Fix sheet not being updated when..
MisRob Nov 10, 2025
2e8de12
Add holiday message and PR reply workflows
MisRob Nov 10, 2025
9f11d18
Simplification and fixes of how Slack channel is determined
MisRob Nov 10, 2025
1abd76e
Optimize notifications for assigned issue
MisRob Nov 10, 2025
1f33613
Simplify and fix conditions
MisRob Nov 10, 2025
0618db8
Fix missing Slack notification about bot
MisRob Nov 10, 2025
ef571f1
Finalize PR message
MisRob Nov 10, 2025
f3b6493
Install lint,prettier,precommit
MisRob Nov 10, 2025
899ae78
Disable detection of close contributors based on gh teams
MisRob Nov 10, 2025
8df6973
Remove shellcheck installation
MisRob Dec 3, 2025
02f6b6f
Run linters
MisRob Dec 3, 2025
18a9ee5
Update message
MisRob Dec 4, 2025
ba8dd22
Remove holiday message date restriction
MisRob Dec 4, 2025
70393f0
Temporarily change branch reference for testing
MisRob Dec 4, 2025
c20b4eb
Fix missing parameters
MisRob Dec 4, 2025
0fefeef
Fix condition
MisRob Dec 4, 2025
784d98e
Fix variable mismatch
MisRob Dec 4, 2025
437211d
Revert "Temporarily change branch reference for testing"
MisRob Dec 4, 2025
57288e4
Add GSoC note
MisRob Dec 4, 2025
f069c30
Reapply "Temporarily change branch reference for testing"
MisRob Dec 4, 2025
23ec661
Bold format
MisRob Dec 4, 2025
39479e5
Fix format
MisRob Dec 4, 2025
9b8579a
Revert "Temporarily change branch reference for testing"
MisRob Dec 4, 2025
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
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
var ERROR = 2;

module.exports = {
env: {
es6: true,
browser: true,
node: true,
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
ecmaFeatures: {
impliedStrict: true,
},
},
extends: ['eslint:recommended'],
rules: {
'comma-style': ERROR,
'no-console': ERROR,
'max-len': [
ERROR,
100,
{
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreUrls: true,
ignoreTrailingComments: true,
},
],
},
};
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/epic_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: ''

_[General guidance: When drafting a feature project, the goal is to create a reference for project scope and context. Write for our core product team. The issue should not be overly technical, and should be be comprehensible and a useful reference to devs, designers, and QA team, to build a shared source of understanding. Anyone at LE should be able to read this and more or less understand the project. If there is relevant information or context that is for the internal team only, please add that in a notion page and link it, rather than adding directly to these issues.]_

## Overview
## Overview

_[First, the project and purpose in one sentence, i.e.: Allow coaches and admins to customize quiz questions in Koilbri]_

Expand All @@ -18,23 +18,23 @@ _[Then, more detail]_
- Why are we doing this now?
- What feedback, requests, insights and/or concerns are shaping this feature? Include specific comments from partners, clearinghouse, or teammates as relevant.

### Contributors
_[Fill this out as people are assigned]_
### Contributors
_[Fill this out as people are assigned]_
- Technical lead: [github handle]
- Individual contributors: [list all github handles]
- Designer: [if a specific designer is leading]
- Individual contributors: [list all github handles]
- Designer: [if a specific designer is leading]
- Other relevant LE team members: [optional, i.e. imps point person]

### Goals
- Who is this feature for? Outline user stories below, but also mention if there is a specific partner and/or deployment
- How do we know this feature is successful?

#### User Stories or Requirements
_[Break down the main workflows thematically, but still at a high level. How are the goals of the project realized in the UI? If there isn't a UI portion of this project, what are the key outcomes or improvements? There should probably only be a few of these per project]_
_[Break down the main workflows thematically, but still at a high level. How are the goals of the project realized in the UI? If there isn't a UI portion of this project, what are the key outcomes or improvements? There should probably only be a few of these per project]_

### Target Quarter and Due date
- What is the timeline of this project?
- If there is a specific due date, especially for a contractual deliverable, include it. Otherwise, include an estimated delivery date, and what quarter(s) this will be worked on

### Product Issues
### Product Issues
_[Issues should be linked here as they are created. There will probably be 1-2 per User Story]_
2 changes: 0 additions & 2 deletions .github/workflows/call-contributor-issue-comment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Handle contributor comment on GitHub issue

on:
issue_comment:
types: [created]

jobs:
call-workflow:
uses: learningequality/.github/.github/workflows/contributor-issue-comment.yml@main
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/call-contributor-pr-reply.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Send reply on a new contributor pull request
on:
pull_request_target:
types: [opened]
jobs:
call-workflow:
name: Call shared workflow
uses: learningequality/.github/.github/workflows/contributor-pr-reply.yml@main
secrets:
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL: ${{ secrets.SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL }}
14 changes: 14 additions & 0 deletions .github/workflows/call-holiday-message.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Post holiday message on pull request or issue comment
on:
pull_request_target:
types: [opened]
issue_comment:
types: [created]
jobs:
call-workflow:
name: Call shared workflow
uses: learningequality/.github/.github/workflows/holiday-message.yml@main
secrets:
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL: ${{ secrets.SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL }}
6 changes: 2 additions & 4 deletions .github/workflows/call-manage-issue-header.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Manage issue header

on:
issues:
types: [opened, reopened, labeled, unlabeled]

jobs:
call-workflow:
name: Call shared workflow
uses: learningequality/.github/.github/workflows/manage-issue-header.yml@main
secrets:
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
14 changes: 14 additions & 0 deletions .github/workflows/call-update-pr-spreadsheet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Update community pull requests spreadsheet
on:
pull_request_target:
types: [assigned, unassigned, opened, closed, reopened, edited, review_requested, review_request_removed]
jobs:
call-workflow:
name: Call shared workflow
uses: learningequality/.github/.github/workflows/update-pr-spreadsheet.yml@main
secrets:
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
CONTRIBUTIONS_SPREADSHEET_ID: ${{ secrets.CONTRIBUTIONS_SPREADSHEET_ID }}
CONTRIBUTIONS_SHEET_NAME: ${{ secrets.CONTRIBUTIONS_SHEET_NAME }}
GH_UPLOADER_GCP_SA_CREDENTIALS: ${{ secrets.GH_UPLOADER_GCP_SA_CREDENTIALS }}
40 changes: 17 additions & 23 deletions .github/workflows/community-contribution-label.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,43 @@
name: Community Contribution Label

on:
workflow_call:
secrets:
LE_BOT_APP_ID:
description: "GitHub App ID for authentication"
required: true
LE_BOT_PRIVATE_KEY:
description: "GitHub App Private Key for authentication"
required: true
workflow_call:
secrets:
LE_BOT_APP_ID:
description: 'GitHub App ID for authentication'
required: true
LE_BOT_PRIVATE_KEY:
description: 'GitHub App Private Key for authentication'
required: true
jobs:
reusable-job:
runs-on: ubuntu-latest

steps:
- name: Check event context
run: |
if [[ "${{ github.event_name }}" != "issues" ]] || [[ "${{ github.event.action }}" != "assigned" && "${{ github.event.action }}" != "unassigned" ]]; then
echo "This workflow should only run on issue assigned/unassigned events"
exit 1
fi
if [[ "${{ github.event_name }}" != "issues" ]] || [[ "${{ github.event.action }}" != "assigned" && "${{ github.event.action }}" != "unassigned" ]]; then
echo "This workflow should only run on issue assigned/unassigned events"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: learningequality/.github
path: .github-repo

repository: learningequality/.github
path: .github-repo
- name: Generate App Token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.LE_BOT_APP_ID }}
private_key: ${{ secrets.LE_BOT_PRIVATE_KEY }}

app_id: ${{ secrets.LE_BOT_APP_ID }}
private_key: ${{ secrets.LE_BOT_PRIVATE_KEY }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests

- name: Add/Remove Community Contribution Label
run: python .github-repo/scripts/community-contribution-label.py
env:
token: ${{ steps.generate-token.outputs.token }}
token: ${{ steps.generate-token.outputs.token }}
86 changes: 32 additions & 54 deletions .github/workflows/contributor-issue-comment.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,33 @@
name: Handle contributor comment on GitHub issue

on:
workflow_call:
secrets:
LE_BOT_APP_ID:
description: "GitHub App ID for authentication"
required: true
description: 'GitHub App ID for authentication'
required: true
LE_BOT_PRIVATE_KEY:
description: "GitHub App Private Key for authentication"
required: true
description: 'GitHub App Private Key for authentication'
required: true
SLACK_WEBHOOK_URL:
required: true
description: "Webhook URL for Slack #support-dev channel"
description: 'Webhook URL for Slack #support-dev channel'
SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL:
required: true
description: "Webhook URL for Slack #support-dev-notifications channel"


description: 'Webhook URL for Slack #support-dev-notifications channel'
jobs:
check-if-close-contributor:
name: Check if user is a close contributor
uses: learningequality/.github/.github/workflows/is-close-contributor.yml@main
check-if-contributor:
name: Check if author is contributor
uses: learningequality/.github/.github/workflows/is-contributor.yml@main
secrets:
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
with:
username: ${{ github.event.comment.user.login }}


author_association: ${{ github.event.comment.author_association }}
process-issue-comment:
name: Process issue comment
needs: [check-if-close-contributor]
if: >-
${{
!github.event.issue.pull_request &&
github.event.comment.author_association != 'OWNER' &&
github.event.comment.user.login != 'sentry-io[bot]' &&
github.event.comment.user.login != 'learning-equality-bot[bot]' &&
(github.event.comment.author_association != 'MEMBER' || needs.check-if-close-contributor.outputs.is_close_contributor == 'true')
}}

needs: [check-if-contributor]
if: ${{ !github.event.issue.pull_request && github.event.issue.state == 'open' && needs.check-if-contributor.outputs.is_contributor == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Generate App Token
Expand All @@ -48,63 +36,53 @@ jobs:
with:
app_id: ${{ secrets.LE_BOT_APP_ID }}
private_key: ${{ secrets.LE_BOT_PRIVATE_KEY }}

- name: Checkout .github repository
uses: actions/checkout@v4
with:
repository: learningequality/.github
ref: main
token: ${{ steps.generate-token.outputs.token }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run script
id: script
uses: actions/github-script@v7
uses: actions/github-script@v7
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
const script = require('./scripts/contributor-issue-comment.js');
return await script({github, context, core});
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL: ${{ secrets.SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL }}
IS_CLOSE_CONTRIBUTOR: ${{ needs.check-if-close-contributor.outputs.is_close_contributor }}

- name: Send Slack notification about GitHub comment
const script = require('./scripts/contributor-issue-comment.js');
return await script({ github, context, core });
- name: Send Slack notification to support-dev channel
if: ${{ steps.script.outputs.support_dev_message }}
uses: slackapi/slack-github-action@v2.1.0
with:
webhook-type: incoming-webhook
webhook: ${{ steps.script.outputs.webhook_url }}
payload: >
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
payload: |
{
"text": "${{ steps.script.outputs.slack_notification_comment }}"
"text": "${{ steps.script.outputs.support_dev_message }}"
}

- name: Send Slack notification about GitHub bot reply
if: ${{ steps.script.outputs.bot_replied }}
- name: Send Slack notification to support-dev-notifications channel about comment
if: ${{ steps.script.outputs.support_dev_notifications_message }}
uses: slackapi/slack-github-action@v2.1.0
with:
webhook-type: incoming-webhook
webhook: ${{ steps.script.outputs.webhook_url }}
payload: >
webhook: ${{ secrets.SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL }}
payload: |
{
"text": "${{ steps.script.outputs.slack_notification_bot_comment }}"
"text": "${{ steps.script.outputs.support_dev_notifications_message }}"
}

- name: Send Slack notification about skipped GitHub bot reply
if: ${{ steps.script.outputs.bot_reply_skipped }}
- name: Send Slack notification to support-dev-notifications channel about bot action
if: ${{ steps.script.outputs.support_dev_notifications_bot }}
uses: slackapi/slack-github-action@v2.1.0
with:
webhook-type: incoming-webhook
webhook: ${{ steps.script.outputs.webhook_url }}
payload: >
webhook: ${{ secrets.SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL }}
payload: |
{
"text": "${{ steps.script.outputs.slack_notification_bot_skipped }}"
"text": "${{ steps.script.outputs.support_dev_notifications_bot }}"
}
Loading