Compare commits
5
Commits
7689433376
...
3cd159a63e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cd159a63e | ||
|
|
0688075542 | ||
|
|
7edf179ec9 | ||
|
|
c0aa7fa8f5 | ||
|
|
a77f72f5d6 |
@@ -27,7 +27,10 @@ jobs:
|
||||
- name: Run checks
|
||||
env:
|
||||
API_BASE: ${{ github.server_url }}/api/v1
|
||||
# github.server_url is the internal runner host, so the commit link needs the public one.
|
||||
WEB_BASE: https://git.ruv.wtf
|
||||
REPO: ${{ github.repository }}
|
||||
SHA: ${{ github.sha }}
|
||||
# Prefer a PAT with issue write scope (secret: GITEA_TOKEN).
|
||||
# Default GITHUB_TOKEN is usually scoped to this repo only.
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
@@ -6,6 +6,8 @@ set -u
|
||||
API_BASE="${API_BASE:?API_BASE is required}"
|
||||
REPO="${REPO:?REPO is required}"
|
||||
TOKEN="${TOKEN:?TOKEN is required}"
|
||||
SHA="${SHA:-}"
|
||||
BASE="${WEB_BASE:-${API_BASE%/api/v1}}"
|
||||
LABEL="ci-checks"
|
||||
SHOW="${SHOW:-50}"
|
||||
|
||||
@@ -20,10 +22,11 @@ npx eslint src --format json > "$WORK/eslint.json" || true
|
||||
jq -r --arg root "$PWD" '.[] | .filePath as $f | .messages[] | select(.ruleId) | "eslint/" + .ruleId + "\t" + (($f | ltrimstr($root + "/")) + ":" + (.line | tostring))' "$WORK/eslint.json" >> "$FINDINGS"
|
||||
|
||||
npx prettier --check . > "$WORK/prettier.log" 2>&1 || true
|
||||
sed -nE 's/^\[warn\] (.*)$/prettier\t\1/p' "$WORK/prettier.log" >> "$FINDINGS"
|
||||
# Prettier forces colour in CI, so strip the ANSI codes before matching.
|
||||
sed -E 's/\x1b\[[0-9;]*m//g' "$WORK/prettier.log" | sed -nE 's/^\[warn\] (.*)$/prettier\t\1/p' >> "$FINDINGS"
|
||||
|
||||
npx tsc --noEmit > "$WORK/tsc.log" 2>&1 || true
|
||||
sed -nE 's/^(.*)\(([0-9]+),([0-9]+)\): error (TS[0-9]+):.*/tsc\/\4\t\1(\2,\3)/p' "$WORK/tsc.log" >> "$FINDINGS"
|
||||
sed -E 's/\x1b\[[0-9;]*m//g' "$WORK/tsc.log" | sed -nE 's/^(.*)\(([0-9]+),([0-9]+)\): error (TS[0-9]+):.*/tsc\/\4\t\1(\2,\3)/p' >> "$FINDINGS"
|
||||
|
||||
api() { # api METHOD PATH [JSON] -> response body on stdout, non-zero on HTTP failure
|
||||
local method=$1 path=$2 data=${3-} code
|
||||
@@ -77,6 +80,9 @@ jq -r '[((.body // "") | capture("<!-- ci-check: (?<k>[^ ]+) -->").k), .number]
|
||||
|
||||
while IFS=$'\t' read -r key number; do
|
||||
if ! grep -qF -- "$key"$'\t' "$FINDINGS"; then
|
||||
if [ -n "$SHA" ]; then
|
||||
api POST "/issues/$number/comments" "$(jq -n --arg b "Fixed in [$(printf '%s' "$SHA" | cut -c1-7)]($BASE/commit/$SHA)." '{body: $b}')" > /dev/null
|
||||
fi
|
||||
api PATCH "/issues/$number" '{"state": "closed"}' > /dev/null
|
||||
fi
|
||||
done < "$WORK/keys.tsv"
|
||||
|
||||
@@ -453,9 +453,7 @@ function MessageNotifications() {
|
||||
function BackgroundSyncSetup() {
|
||||
const mx = useMatrixClient();
|
||||
// Try to make a simple fetch to verify component is rendering
|
||||
try {
|
||||
fetch('/_matrix/client/v3/sync', { method: 'HEAD' }).catch(() => {});
|
||||
} catch {}
|
||||
fetch('/_matrix/client/v3/sync', { method: 'HEAD' }).catch(() => {});
|
||||
|
||||
useEffect(() => {
|
||||
console.log('BackgroundSyncSetup: Starting background sync for', mx.getUserId());
|
||||
@@ -554,7 +552,7 @@ function AndroidShareIntentHandler() {
|
||||
const originalFile = await materializeSharedFile(sharedFile, share.receivedAt);
|
||||
|
||||
let fileToUpload = originalFile;
|
||||
let encInfo: any = undefined;
|
||||
let encInfo: any;
|
||||
|
||||
if (room.hasEncryptionStateEvent()) {
|
||||
const encrypted = await encryptFile(originalFile);
|
||||
|
||||
Reference in New Issue
Block a user