Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/git-glimpse-ack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: GitGlimpse Acknowledge

on:
issue_comment:
types: [created]

jobs:
ack:
if: >-
github.event.issue.pull_request != null &&
contains(github.event.comment.body, '/glimpse')
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: React with eyes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/$GITHUB_REPOSITORY/issues/comments/${{ github.event.comment.id }}/reactions \
--method POST --field content=eyes || true
59 changes: 59 additions & 0 deletions .github/workflows/git-glimpse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: GitGlimpse

on:
pull_request:
types: [opened, synchronize]
issue_comment:
types: [created]

jobs:
demo:
runs-on: ubuntu-latest
if: >-
github.event_name == 'pull_request' ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request != null &&
contains(github.event.comment.body, '/glimpse'))
permissions:
pull-requests: write
contents: write
issues: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || '' }}

- uses: actions/setup-node@v4
with:
node-version: '20'

- run: npm ci

- name: Install FFmpeg
run: sudo apt-get install -y ffmpeg

- name: Install Playwright Chromium
run: npx playwright install chromium --with-deps

- uses: DeDuckProject/git-glimpse@v1
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: React with hooray on success
if: github.event_name == 'issue_comment' && success()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/$GITHUB_REPOSITORY/issues/comments/${{ github.event.comment.id }}/reactions \
--method POST --field content=hooray || true

- name: React with confused on failure
if: github.event_name == 'issue_comment' && failure()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/$GITHUB_REPOSITORY/issues/comments/${{ github.event.comment.id }}/reactions \
--method POST --field content=confused || true
13 changes: 13 additions & 0 deletions git-glimpse.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { GitGlimpseConfig } from '@git-glimpse/core';

export default {
app: {
startCommand: 'npm run dev',
readyWhen: { url: 'http://localhost:5173/epp-demo/' },
},
recording: {
format: 'gif',
maxDuration: 30,
viewport: { width: 1280, height: 720 },
},
} satisfies GitGlimpseConfig;
Loading