Skip to content
Open
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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions src/clis/github/issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
site: github
name: issues
description: List issues for a GitHub repository
domain: github.com
strategy: public
browser: false

args:
owner:
type: string
required: true
description: Repository owner
name:
type: string
required: true
description: Repository name
state:
type: string
default: open
description: "Issue state: open, closed, all"
limit:
type: int
default: 10
description: Number of issues

pipeline:
- fetch:
url: "https://api.github.com/repos/${{ args.owner }}/${{ args.name }}/issues?state=${{ args.state }}&per_page=${{ args.limit }}"
headers:
Accept: application/vnd.github.v3+json
User-Agent: opencli

- filter: "!item.pull_request"

- map:
number: "#${{ item.number }}"
title: "${{ (item.title || '').substring(0, 60) }}"
author: "${{ item.user.login }}"
labels: "${{ (item.labels || []).map(l => l.name).join(', ') }}"
comments: ${{ item.comments }}
created: "${{ item.created_at?.substring(0, 10) }}"

- limit: ${{ args.limit }}

columns: [number, title, author, labels, comments, created]
36 changes: 36 additions & 0 deletions src/clis/github/repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
site: github
name: repo
description: GitHub repository details
domain: github.com
strategy: public
browser: false

args:
owner:
type: string
required: true
description: Repository owner
name:
type: string
required: true
description: Repository name

pipeline:
- fetch:
url: "https://api.github.com/repos/${{ args.owner }}/${{ args.name }}"
headers:
Accept: application/vnd.github.v3+json
User-Agent: opencli

- map:
name: "${{ item.full_name }}"
stars: ${{ item.stargazers_count }}
forks: ${{ item.forks_count }}
issues: ${{ item.open_issues_count }}
language: "${{ item.language || '-' }}"
license: "${{ item.license?.spdx_id || '-' }}"
created: "${{ item.created_at?.substring(0, 10) }}"
updated: "${{ item.pushed_at?.substring(0, 10) }}"
description: "${{ (item.description || '').substring(0, 80) }}"

columns: [name, stars, forks, issues, language, license, description]
41 changes: 41 additions & 0 deletions src/clis/github/search.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
site: github
name: search
description: Search GitHub repositories
domain: github.com
strategy: public
browser: false

args:
query:
type: string
required: true
description: Search query
sort:
type: string
default: stars
description: "Sort by: stars, forks, updated"
limit:
type: int
default: 10
description: Number of results

pipeline:
- fetch:
url: "https://api.github.com/search/repositories?q=${{ encodeURIComponent(args.query) }}&sort=${{ args.sort }}&per_page=${{ args.limit }}"
headers:
Accept: application/vnd.github.v3+json
User-Agent: opencli

- select: items

- map:
rank: ${{ index + 1 }}
name: "${{ item.full_name }}"
stars: ${{ item.stargazers_count }}
forks: ${{ item.forks_count }}
language: "${{ item.language || '-' }}"
description: "${{ (item.description || '').substring(0, 60) }}"

- limit: ${{ args.limit }}

columns: [rank, name, stars, forks, language, description]
41 changes: 41 additions & 0 deletions src/clis/github/trending.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
site: github
name: trending
description: GitHub trending repositories (by recent stars)
domain: github.com
strategy: public
browser: false

args:
language:
type: string
default: ""
description: "Filter by language (e.g. typescript, python, rust)"
since:
type: string
default: daily
description: "Time range: daily (7 days), weekly (30 days), monthly (90 days)"
limit:
type: int
default: 10
description: Number of repositories

pipeline:
- fetch:
url: "https://api.github.com/search/repositories?q=stars%3A%3E50+created%3A%3E${{ (function(){ const d=new Date(); const days={daily:7,weekly:30,monthly:90}[args.since]||7; d.setDate(d.getDate()-days); return d.toISOString().substring(0,10) })() }}${{ args.language ? '+language%3A'+args.language : '' }}&sort=stars&order=desc&per_page=${{ args.limit }}"
headers:
Accept: application/vnd.github.v3+json
User-Agent: opencli

- select: items

- map:
rank: ${{ index + 1 }}
name: "${{ item.full_name }}"
stars: ${{ item.stargazers_count }}
forks: ${{ item.forks_count }}
language: "${{ item.language || '-' }}"
description: "${{ (item.description || '').substring(0, 60) }}"

- limit: ${{ args.limit }}

columns: [rank, name, stars, forks, language, description]
32 changes: 32 additions & 0 deletions src/clis/github/user.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
site: github
name: user
description: GitHub user profile
domain: github.com
strategy: public
browser: false

args:
username:
type: string
required: true
description: GitHub username

pipeline:
- fetch:
url: "https://api.github.com/users/${{ args.username }}"
headers:
Accept: application/vnd.github.v3+json
User-Agent: opencli

- map:
login: "${{ item.login }}"
name: "${{ item.name || '-' }}"
bio: "${{ (item.bio || '').substring(0, 60) }}"
repos: ${{ item.public_repos }}
followers: ${{ item.followers }}
following: ${{ item.following }}
company: "${{ item.company || '-' }}"
location: "${{ item.location || '-' }}"
created: "${{ item.created_at?.substring(0, 10) }}"

columns: [login, name, repos, followers, following, location]