Glanceway Glanceway
All sources

GitHub Trending

Developer v1.0.0

Trending repositories on GitHub

@codytseng #github #trending #programming

Install and configure this source

  1. Install Glanceway and open it on your Mac before using the install link above.
  2. Choose Install in Glanceway. If the browser cannot open the app, download the .gwsrc file and import it through source management.
  3. Complete the required fields below, save, and choose a refresh interval. Check the source after its first successful fetch.

Configuration checklist

  • LANGUAGE — Optional. Filter by programming language (e.g., javascript, python). Leave empty for all languages.

If items are missing

  • Verify the field names, list entries, and credentials against the current version’s configuration table. Sample values below are examples, not active credentials.
  • Check network access and upstream service availability. Authentication failures and rate limits can prevent a refresh; use a slower interval when the provider limits requests.
  • An empty result can also mean there are no matching items. Fetched content and update timing depend on the provider and source implementation.

Configuration

Name Key Type Required Default Description
Language LANGUAGE string No — Filter by programming language (e.g., javascript, python). Leave empty for all languages.

Source Code

id: codytseng/github-trending
version: 1.0.0
name: GitHub Trending
description: Trending repositories on GitHub
author: codytseng
author_url: https://github.com/codytseng
category: Developer
tags:
  - github
  - trending
  - programming

config:
  - key: LANGUAGE
    name: Language
    type: string
    required: false
    description: Filter by programming language (e.g., javascript, python). Leave empty for all languages.
module.exports = async (api) => {
  const language = api.config.get("LANGUAGE");

  async function fetchData() {
    const since = new Date();
    since.setDate(since.getDate() - 7);
    const sinceStr = since.toISOString().split("T")[0];

    let query = `created:>${sinceStr} stars:>5`;
    if (language) {
      query += ` language:${language}`;
    }

    const response = await api.fetch(
      `https://api.github.com/search/repositories?q=${encodeURIComponent(query)}&sort=stars&order=desc&per_page=100`,
    );

    if (!response.ok || !response.json) {
      throw new Error(`Failed to fetch GitHub trending repositories (HTTP ${response.status})`);
    }

    api.emit(
      response.json.items.map((repo) => {
        return {
          id: repo.id.toString(),
          title: repo.full_name,
          subtitle: repo.description || `${repo.language ?? "Unknown"} · ${repo.stargazers_count} stars`,
          url: repo.html_url,
        };
      }),
    );
  }

  await fetchData();

  return {
    refresh: fetchData,
  };
};

Related Sources