phase 2 ✦ continuous portfolio quality

Your portfolio, under CI

Code gets tests; portfolios rot silently. This workflow re-scores your GitHub profile every week and fails loudly when quality drops — a stale demo link, a deleted README, six months without a commit. It runs on the public score API, so there is nothing to install and nothing to pay.

01

Add the workflow to your profile repo

Create this file in any repo you own (your username/username profile repo is the natural home):

.github/workflows/repolens.yml
# .github/workflows/repolens.yml
name: RepoLens portfolio check
on:
  schedule:
    - cron: "0 9 * * 1"   # every Monday 09:00 UTC
  workflow_dispatch: {}     # run it manually from the Actions tab

jobs:
  score:
    runs-on: ubuntu-latest
    steps:
      - name: Check portfolio score
        env:
          MIN_SCORE: 50   # fail below this
        run: |
          RESULT=$(curl -sf "https://repolens.rianfernando.com/api/score/${{ github.repository_owner }}")
          SCORE=$(echo "$RESULT" | jq .score)
          PCT=$(echo "$RESULT" | jq .percentileEstimate)
          echo "RepoLens score: $SCORE/100 (~top $((100-PCT))% estimated)"
          echo "$RESULT" | jq -r '.openGaps[] | "gap: \(.)"'
          if [ "$SCORE" -lt "$MIN_SCORE" ]; then
            echo "::error::Portfolio score $SCORE fell below threshold $MIN_SCORE — see https://repolens.rianfernando.com/u/${{ github.repository_owner }}"
            exit 1
          fi
02

Pick your threshold

MIN_SCORE: 50 is a sensible floor — it means solid READMEs on your top repos and at least a few coverage areas hit. Raise it as your score climbs; the roadmap on your report shows exactly which fix buys which points.

03

Put the badge where recruiters look

Add the live score badge to your profile README — it links back to your full report:

README.md
[![RepoLens score](https://repolens.rianfernando.com/api/badge/YOUR_USERNAME)](https://repolens.rianfernando.com/u/YOUR_USERNAME)

The API behind it

GET /api/score/<username> returns { score, percentileEstimate, parts, openGaps }, cached at the edge for six hours. Percentiles are currently estimated from a calibrated curve — real percentiles against the population of analyzed profiles land when the score database ships.