Using AI for CI & Automation in iOS Projects

Nov 11 2026 · Swift 5, iOS 27, Xcode 27

Lesson 01: Integrating Agentic Code Review into an iOS CI Pipeline

Demo

Episode complete

Play next episode

Next

Written by the author, AI-editedAI-generated, author-verified How this module was made

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In this demonstration we will add an agentic code-review step that runs automatically whenever a pull request is opened or updated. You may begin from the sample iOS repository that has been used throughout the program, or from module materials https://github.com/kodecocodes/m3-aici-materials. This repository already contains a basic CI workflow that builds and tests the app; we will extend it with a dedicated review job. I will be using files from 01-integrating-agentic-review-into-ci/Starter. If you are using your own repo, copy the .github folder to start — it already contains workflows/ci.yml and the shared helpers under .github/scripts/. We will add two markdown files at the repository root, CODE_REVIEW.md and CI_GUIDANCE.md, plus the new review workflow.

name: AI Code Review
on:
  pull_request:
env:
  CI_GUIDANCE: CI_GUIDANCE.md
jobs:
  review:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Checkout repository
        uses: actions/checkout@v7
        with:
          fetch-depth: 0
name: AI Code Review
on:
  pull_request:
env:
  CI_GUIDANCE: CI_GUIDANCE.md
jobs:
  review:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Checkout repository
        uses: actions/checkout@v7
        with:
          fetch-depth: 0
      - name: Set up Node.js
        uses: actions/setup-node@v7
        with:
          node-version: '24'
      - name: Install GitHub Copilot CLI
        run: npm install -g @github/copilot
      - name: Run Copilot review
        env:
          COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COPILOT_OTEL_ENABLED: true
          COPILOT_OTEL_EXPORTER_TYPE: file
        run: |
          ./.github/scripts/ai-code-review.sh "${{ github.base_ref }}" \
            --review-file review.md \
            --otel-file "${{ runner.temp }}/copilot-otel.jsonl" \
            --guidance "${{ env.CI_GUIDANCE }}"
      - name: Upload token log
        uses: actions/upload-artifact@v7
        if: always()
        with:
          name: copilot-token-log
          path: ${{ runner.temp }}/copilot-otel.jsonl
          if-no-files-found: ignore
      - name: Post review comment
        if: success()
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PR_NUMBER: ${{ github.event.pull_request.number }}
See forum comments
Cinema mode Download course materials from Github
Previous: Instruction Next: Conclusion