Skip to content

Commit 5a391b2

Browse files
authored
Merge pull request #3423 from instructure/release/teacher-2.3.0-85
Release Teacher 2.3.0 (85)
2 parents e1c9574 + caaede8 commit 5a391b2

File tree

528 files changed

+33244
-2867
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

528 files changed

+33244
-2867
lines changed

.github/workflows/build-app.yml

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
name: Build App
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
app-type:
7+
description: 'App type (Parent, Student, or Teacher)'
8+
required: true
9+
type: string
10+
app-type-lower:
11+
description: 'App type in lowercase (parent, student, or teacher)'
12+
required: true
13+
type: string
14+
firebase-app-id-secret:
15+
description: 'Name of the Firebase App ID secret'
16+
required: true
17+
type: string
18+
secrets:
19+
ACCESS_TOKEN:
20+
required: true
21+
ANDROID_RELEASE_KEYSTORE_B64:
22+
required: true
23+
FIREBASE_SERVICE_ACCOUNT_KEY:
24+
required: true
25+
FIREBASE_APP_ID:
26+
required: true
27+
28+
jobs:
29+
build:
30+
name: ${{ inputs.app-type-lower }}-build
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
with:
36+
submodules: 'recursive'
37+
fetch-depth: 1
38+
token: ${{ secrets.ACCESS_TOKEN }}
39+
40+
- name: Set up JDK 17
41+
uses: actions/setup-java@v4
42+
with:
43+
java-version: '17'
44+
distribution: 'temurin'
45+
46+
- name: Cache Gradle packages
47+
uses: actions/cache@v4
48+
with:
49+
path: |
50+
~/.gradle/caches
51+
~/.gradle/wrapper
52+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }}
53+
restore-keys: |
54+
${{ runner.os }}-gradle-
55+
56+
- name: Cache Gradle Build Cache
57+
uses: actions/cache@v4
58+
with:
59+
path: |
60+
~/.gradle/caches/build-cache-*
61+
.gradle
62+
key: ${{ runner.os }}-gradle-build-cache-${{ github.sha }}
63+
restore-keys: |
64+
${{ runner.os }}-gradle-build-cache-
65+
66+
- name: Decode Release Keystore
67+
run: |
68+
echo "${{ secrets.ANDROID_RELEASE_KEYSTORE_B64 }}" | base64 --decode > release.jks
69+
chmod 600 release.jks
70+
71+
- name: Setup Service account
72+
env:
73+
FIREBASE_SERVICE_ACCOUNT_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}
74+
run: |
75+
if [ -z "${FIREBASE_SERVICE_ACCOUNT_KEY}" ]; then
76+
echo "Error: Firebase service account key is not configured"
77+
exit 1
78+
fi
79+
echo "${FIREBASE_SERVICE_ACCOUNT_KEY}" > service-account-key.json
80+
chmod 600 service-account-key.json
81+
82+
- name: Build Release Notes
83+
id: get_release_notes
84+
run: |
85+
echo "RELEASE_NOTES<<EOF" >> $GITHUB_OUTPUT
86+
echo "${{ github.event.pull_request.title }}" >> $GITHUB_OUTPUT
87+
echo "EOF" >> $GITHUB_OUTPUT
88+
89+
- name: Install Firebase CLI
90+
run: npm install -g firebase-tools
91+
92+
- name: Setup Firebase App Id
93+
run: |
94+
if [ -z "${{ secrets.FIREBASE_APP_ID }}" ]; then
95+
echo "Error: Firebase App ID is not configured"
96+
exit 1
97+
fi
98+
echo "${{ secrets.FIREBASE_APP_ID }}" > firebase_app_id.txt
99+
100+
- name: Build debug and test APKs
101+
run: |
102+
./gradle/gradlew -p apps :${{ inputs.app-type-lower }}:assembleQaDebug \
103+
:${{ inputs.app-type-lower }}:assembleQaDebugAndroidTest \
104+
:${{ inputs.app-type-lower }}:assembleDevDebugMinify \
105+
--build-cache \
106+
--parallel \
107+
--max-workers=4 \
108+
--no-daemon \
109+
-Dorg.gradle.jvmargs="-Xmx6g -XX:+HeapDumpOnOutOfMemoryError" \
110+
-Dkotlin.compiler.execution.strategy=in-process \
111+
-Pandroid.injected.signing.store.file=$(pwd)/release.jks
112+
113+
- name: Upload QA debug APK
114+
uses: actions/upload-artifact@v4
115+
with:
116+
name: ${{ inputs.app-type-lower }}-qa-debug.apk
117+
path: apps/${{ inputs.app-type-lower }}/build/outputs/apk/qa/debug/${{ inputs.app-type-lower }}-qa-debug.apk
118+
119+
- name: Upload QA test APK
120+
uses: actions/upload-artifact@v4
121+
with:
122+
name: ${{ inputs.app-type-lower }}-qa-debug-androidTest.apk
123+
path: apps/${{ inputs.app-type-lower }}/build/outputs/apk/androidTest/qa/debug/${{ inputs.app-type-lower }}-qa-debug-androidTest.apk
124+
125+
- name: Upload Dev debug APK
126+
uses: actions/upload-artifact@v4
127+
with:
128+
name: ${{ inputs.app-type-lower }}-dev-debugMinify.apk
129+
path: apps/${{ inputs.app-type-lower }}/build/outputs/apk/dev/debugMinify/${{ inputs.app-type-lower }}-dev-debugMinify.apk
130+
131+
- name: Distribute app to Firebase App Distribution
132+
env:
133+
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/service-account-key.json
134+
run: |
135+
firebase --version
136+
FIREBASE_APP_ID="$(cat firebase_app_id.txt)"
137+
138+
if ! firebase appdistribution:distribute "apps/${{ inputs.app-type-lower }}/build/outputs/apk/dev/debugMinify/${{ inputs.app-type-lower }}-dev-debugMinify.apk" \
139+
--app "$FIREBASE_APP_ID" \
140+
--release-notes "${{ steps.get_release_notes.outputs.RELEASE_NOTES }}" \
141+
--groups "Testers" > result.txt 2>&1; then
142+
echo "Firebase distribution failed:"
143+
cat result.txt
144+
exit 1
145+
fi
146+
cat result.txt
147+
148+
- name: Prepare Comment Body
149+
id: prepare_comment
150+
run: |
151+
INSTALL_URL=$(grep -o 'https://appdistribution\.firebase[^[:space:]]*' result.txt | head -1)
152+
153+
if [ -z "$INSTALL_URL" ]; then
154+
echo "Error: Could not extract install URL from Firebase output"
155+
cat result.txt
156+
exit 1
157+
fi
158+
159+
INSTALL_URL_ESCAPED=$(printf '%s' "$INSTALL_URL" | sed 's/:/%3A/g; s/\//%2F/g; s/?/%3F/g; s/=/%3D/g; s/&/%26/g')
160+
{
161+
echo "body<<EOF"
162+
echo "<!-- qr-code-${{ inputs.app-type }} -->"
163+
echo "<p>${{ inputs.app-type }} Install Page</p><img src=\"https://api.qrserver.com/v1/create-qr-code/?data=${INSTALL_URL_ESCAPED}\" width=\"200\">"
164+
echo "EOF"
165+
} >> $GITHUB_OUTPUT
166+
167+
- name: Find Previous Comment
168+
id: find_comment
169+
uses: peter-evans/find-comment@v2
170+
with:
171+
issue-number: ${{ github.event.pull_request.number }}
172+
comment-author: 'github-actions[bot]'
173+
body-includes: '<!-- qr-code-${{ inputs.app-type }} -->'
174+
175+
- name: Create or Update Comment
176+
uses: peter-evans/create-or-update-comment@v4
177+
with:
178+
comment-id: ${{ steps.find_comment.outputs.comment-id }}
179+
issue-number: ${{ github.event.pull_request.number }}
180+
body: ${{ steps.prepare_comment.outputs.body }}
181+
edit-mode: replace
182+
183+
- name: Cleanup sensitive files
184+
if: always()
185+
run: |
186+
rm -f release.jks
187+
rm -f service-account-key.json
188+
rm -f firebase_app_id.txt
189+
rm -f result.txt

.github/workflows/claude-code-review.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
prompt: |
4040
REPO: ${{ github.repository }}
4141
PR NUMBER: ${{ github.event.pull_request.number }}
42+
EVENT ACTION: ${{ github.event.action }}
4243
4344
Please review this pull request and provide inline feedback using the GitHub review system.
4445
@@ -52,11 +53,39 @@ jobs:
5253
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
5354
5455
Instructions:
56+
${{ github.event.action == 'synchronize' && '
57+
## SYNCHRONIZE EVENT - UPDATE EXISTING REVIEW
58+
This is an update to an existing PR. You must:
59+
1. Use the GitHub MCP tools to fetch your previous reviews on this PR
60+
2. Fetch the latest PR diff and identify what has changed since your last review
61+
3. Find your previous review summary comment (the one that starts with "## PR Review Summary" or similar)
62+
4. Post a NEW PR comment (not a review) with an update status that includes:
63+
- Reference to your previous review
64+
- Progress update using checkboxes:
65+
- [x] Previously identified issues that have been resolved
66+
- [ ] Previously identified issues still present
67+
- [ ] New issues found in this update
68+
- Brief summary of what changed
69+
- Any new concerns or positive feedback
70+
5. For inline review comments:
71+
- Resolve threads where the issue has been fixed
72+
- Update existing review comment threads if partially addressed
73+
- Add new inline review comments ONLY for new issues that require changes
74+
- Do NOT add inline comments for positive feedback
75+
6. DO NOT create a new review summary - only post a progress update comment
76+
77+
Use mcp__github__create_or_update_issue_comment to post the update.' || '
78+
## NEW REVIEW EVENT
79+
This is a new PR or initial review. You must:
5580
1. Use the GitHub MCP tools to fetch the PR diff
56-
2. Add inline comments using the appropriate MCP tools for each specific piece of feedback on particular lines
57-
3. Submit the review with event type 'COMMENT' (not 'REQUEST_CHANGES') to publish as non-blocking feedback
81+
2. Create a review summary with checkboxes for any issues found:
82+
- [ ] Issue description and location
83+
3. Add inline comments ONLY for specific code that needs changes
84+
4. DO NOT add inline comments for positive feedback - include positive feedback in the summary section only
85+
5. Submit the review with event type COMMENT (not REQUEST_CHANGES) to publish as non-blocking feedback
86+
' }}
5887
5988
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
6089
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
61-
claude_args: '--allowedTools "mcp__github__create_pending_pull_request_review,mcp__github__add_comment_to_pending_review,mcp__github__submit_pending_pull_request_review,mcp__github__get_pull_request_diff"'
90+
claude_args: '--allowedTools "mcp__github__create_pending_pull_request_review,mcp__github__add_comment_to_pending_review,mcp__github__submit_pending_pull_request_review,mcp__github__get_pull_request_diff,mcp__github__list_reviews,mcp__github__get_review,mcp__github__list_review_comments,mcp__github__update_review_comment,mcp__github__create_or_update_pull_request_review_comment,mcp__github__create_or_update_issue_comment,mcp__github__list_issue_comments,mcp__github__resolve_review_thread"'
6291

0 commit comments

Comments
 (0)