Giter Club home page Giter Club logo

github-trending-email's Introduction

github-trending-email

A Nodejs script to get Github trending repos by language or dateRange.

You can use this action to get Github trending Repos and send it to your email every day. Example

Usage

name: Send Github Trending Repos via Gmail

on:
  schedule:
    # 每天 UTC 时间 11:00,如果你在东八区,这相当于晚上 7:00
    - cron: '0 1,12 * * *'

jobs:
  send-email:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Get Trending repos
        uses: talljack/github-trending-email@main
        id: trending-repos
        env:
          token: ${{secrets.GITHUB_TOKEN}} # 使用存储在仓库 Secrets 中的 GitHub 令牌
        with:
          languages: '["", "typescript", "rust", "go", "swift", "python", "vue"]'

      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.x' # Specify the Python version
      - name: Install dependencies
        run: pip install yagmail
        # Maybe you want to send Email
      - name: Send email
        run: |
          python ./.github/actions/send_email.py "${{ secrets.GMAIL_USERNAME }}" "${{ secrets.GMAIL_PASSWORD }}" "[email protected]" "Github Trending Repos" ${{ steps.trending-repos.outputs.githubTrendingRepos }}

Inputs

  • token - Your GITHUB_TOKEN. This is required. Why do we need a token? Read more here: About the GITHUB_TOKEN secret. Default: ${{ github.token }}
  • languages - What languages do you want to query, It's an array, and you can use it to get any language Github trending Repos. Example: ["python", "go", "typescript"].
  • dateRange - What time do you want to query, It has three values "daily""weekly" and "monthly", The default value is "daily", you can choose what time you want to get it.

Outputs

  • githubTrendingRepos - The GitHub Trending Repos JSON String with **base64 encode, you just need to base64 decode and use it.

License

Licensed under the MIT License.

github-trending-email's People

Contributors

talljack avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.