Git Product home page Git Product logo

contripy's Introduction

Collecting Contributions

This is a set of python scripts that collect contributions by author and generates a report with asciidoctor.

Requirements

For contripy script:

  • envyaml (Python)
  • python-dotenv (Python)

Additionally when using the Git parser:

  • git

Additionally when using the GitHub parser:

  • python-graphql-client (Python)
  • requests (Python)

Additionally when using the report script:

  • asciidoctor
  • ruby-asciidoctor-pdf
  • python3-dateutil (Python)

Config Format

The config is in YAML format.

The config contains a list of projects and a list of authors.

projects:
  <PROJECT-NAME#0>:
    url: <PROJECT-URL>
    giturl: <PROJECT-GIT-URL>
    gitweburl: <PROJECT-GIT-WEB-URL>
  :
  :
  <PROJECT-NAME#n>:
    url: <PROJECT-URL>
    giturl: <PROJECT-GIT-URL>
    gitweburl: <PROJECT-GIT-WEB-URL>

authors:
  <AUTHOR-NAME#0>:
    emails:
	  - <EMAIL#0>
	  :
	  - <EMAIL#n>
  :
  <AUTHOR-NAME#n>:
    emails:
	  - <EMAIL#0>
	  :
	  - <EMAIL#n>

Parsers

The following contribution parsers are available.

Git Parser

The Git parser is the default and uses the local git CLI to clone the repository and extract all the contributions by running git log. It can be explicitly selected by using parser: git in the project config.

GitHub Parser

The GitHub parser uses the GitHub GraphQL API to collect contributions for a project without the need to do a full clone. Please note that it can only fetch "authored" contributions and not "other" contributions.

Further the GitHub parser can be used to update the project description from the description that is used in the GitHub project. This happens automatically if the config doesn't specify a value for description.

The parser requires a GitHub API token in the config. Instead of adding the token to the config it can be passed via environment variable or .env file.

config.yml

parser:
  github:
    token: ${GITHUB_APITOKEN}

.env

GITHUB_APITOKEN=<token>

contripy's People

Contributors

fschrempf avatar hthiery avatar smpj avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

smpj fschrempf

contripy's Issues

No Docker image published on GitHub

Hi Heiko,

thanks for merging my PR. The GitHub action seems to work (https://github.com/hthiery/contripy/actions/runs/8477965378) and the docker image gets pushed to the package registry (ghcr.io). The problem is that no package is shown on the project page and I can't pull with docker pull ghcr.io/hthiery/contripy.

Could you please take a look and try to get the image published? Maybe this helps: https://stackoverflow.com/questions/73485013/github-package-successfully-published-but-not-showing-up-in-packages-section.

Thanks!
Frieder

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.