Repository navigation
Releases: 3rdflr/github-mobile-reader
Releases · 3rdflr/github-mobile-reader
Release list
0.1.17
v0.1.16
v0.1.4
What's New
This release redesigns the output format for mobile readability and fixes GitHub Actions workflow issues that blocked use with branch-protected repos.
✨ Features
Symbol-level summary (replaces verbose code blocks)
- Added/removed functions and components are listed by name instead of showing raw code
- Supports:
function foo(),const useStore = create<T>(,export default function Component(),useCallback, etc.
JSX Structure section (## 🎨 JSX Structure)
- Parses JSX/TSX diffs into a compact component tree
- Shows structural changes: which components were added, removed, or nested differently
Style Changes section (## 💅 Style Changes)
- Detects
className=changes and extracts Tailwind class diffs per component - Shows only net-added / net-removed classes, skipping unchanged ones
Output example:
src/components/Sidebar.tsx
Changed: SidebarLayout NavItem useAuthStore
🎨 JSX Structure
nav
└─ ul
└─ NavItem(onClick)
💅 Style Changes
nav
dark:bg-gray-900 dark:border-gray-700 NavItem
text-gray-500
dark:text-gray-300
🐛 Bug Fixes
- Workflow:
Unrecognized named-value: 'secrets'— Removed${{ }}expressions from insidegithub-scriptblocks; replaced withcontext.payload.pull_request.number - Workflow: branch protection compatibility — Switched from git push to PR comment approach; works with repos that have push-protected
main/devbranches - Parser: ALL_CAPS false positives — Constants like
JS_TS_EXTno longer detected as component names - Parser:
unknowncomponent noise —classNamelines without a detectable tag are now silently skipped
🔧 GitHub Actions Usage
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate Reader Markdown
run: npx github-mobile-reader@latest --repo ${{ github.repository }} --pr ${{ github.event.pull_request.number }} --out ./reader-output
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Post PR Comment
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const prNumber = context.payload.pull_request.number;
const path = `./reader-output/pr-${prNumber}.md`;
if (!fs.existsSync(path)) return;
const body = fs.readFileSync(path, 'utf8');
const comments = await github.rest.issues.listComments({ owner: context.repo.owner, repo: context.repo.repo, issue_number: prNumber });
const prev = comments.data.find(c => c.user.login === 'github-actions[bot]' && c.body.startsWith('# 📖 PR #'));
if (prev) await github.rest.issues.deleteComment({ owner: context.repo.owner, repo: context.repo.repo, comment_id: prev.id });
await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: prNumber, body });
Required permission: pull-requests: write only — no contents: write needed.
Full Changelog: https://github.com/3rdflr/github-mobile-reader/commits/main