Skip to main content

Dinghy daily digest tool

Project description

Dinghy, a GitHub activity digest tool.

PyPI Supported Python versions License

Dinghy uses the GitHub GraphQL API to find recent activity on issues and pull requests, and writes a compact HTML digest. The simplest way to run dinghy is with a GitHub repo URL:

$ pip install dinghy
$ python -m dinghy https://github.com/Me/MyProject
Wrote digest: digest.html

You will have a digest of the last week’s activity in digest.html. It will look something like this.

You can also write a YAML configuration file to digest multiple sources, or with different time periods.

Configuration

Dinghy configuration is read from a YAML file (dinghy.yaml by default). Here’s an example:

digests:
  - digest: lastweek.html
    since: 1 week
    items:
      - https://github.com/orgs/myorg/projects/17
      - https://github.com/orgs/anotherorg/projects/8
      - https://github.com/myorg/myrepo/pulls

  - digest: hotnews.html
    since: 1 day
    items:
      - url: https://github.com/orgs/anotherorg/projects/8
        home_repo: anotherorg/wg
      - https://github.com/myorg/churnchurn/issues

  - digest: all_prs.html
    since: 1 day
    items:
      - pull_requests: org:myorg

defaults:
  ignore_users:
    - app-user
    - fake-bot

The digests clause is a list of digests to produce. The defaults clause sets defaults for the digest options in the rest of the file. Each digests clause specifies what to digest:

  • The digest setting is the HTML digest file to write.

  • The since setting indicates how far back to look for activity. It can use units of weeks, days, hours, minutes and seconds, and can also be abbreviated, like 1d6h.

  • The items setting is a list of things to report on, specified in a few different ways:

    • The url setting is a GitHub URL, in a number of forms:

      • An organization project URL will report on the issues and pull requests in the project.

      • A URL to a repo will report on the issues and pull requests in the repo.

      • A URL to a repo’s issues will report on the issues in the repo.

      • A URL to a repo’s pull requests will report on the pull requests in the repo.

    • The pull_requests setting can specify an organization to search for pull requests.

    • If an item only needs to specify a GitHub URL, then it can simply be the URL string.

Items can have additional options:

  • No activity is reported for bot users. Some applications act as real users, but should be ignored anyway. You can list those user names that should be ignored in the ignore_users setting.

  • Options for organization projects include:

    • home_repo is the owner/repo of the repo in which most issues will be created. Issues in other repos will have the repo indicated in the digest.

Changelog

Unreleased

See the fragment files in the scriv.d directory.

0.7.0 — 2022-03-12

Added

  • The command line now accepts a GitHub URL to quickly get a week’s digest of activity from a repo (or issues, pull requests, etc).

  • The logging level can now be specified with the -v/--verbosity command-line option.

Fixed

  • Dependencies now have minimum pins, fixing issue 1.

0.6.0 — 2022-03-10

Added

  • GitHub’s @ghost user shows up in GraphQL results as an “author” of None. Properly handle that case.

Fixed

  • Fixes to the color of labels.

  • Correct handling of HTML in bodies.

0.5.2 — 2022-03-08

Changed

  • More HTML tweaks to indentation and information.

0.5.1 — 2022-03-07

Changed

  • Indentation tweaks to make thread structure clearer.

0.5.0 — 2022-03-03

Changed

  • Pull request reviews are displayed more compactly.

0.4.0 — 2022-02-28

Added

  • A repo URL will report on both pull requests and issues in the repo.

0.3.0 — 2022-02-27

Added

  • The configuration file can be specified as the argument on the command line.

  • GitHub icons decorate pull requests, issues, and comments to distinguish them and indicate their status.

Changed

  • The configuration file syntax changed. Now there is a top-level digests clause and an optional defaults clause.

  • The bots setting is now called ignore_users.

  • Pull request review threads are presented hierarchically.

0.2.0 — 2022-02-21

Added

  • Items can have options. Organization projects have a home_repo option so that issues from other repos will get an indication of the other repo.

  • Organizatons can be searched for pull requests.

  • If dinghy hits a GraphQL API rate limit, it will sleep until the limit is reset.

  • Don’t report on activity by bot users. The bot setting can be used to list user accounts that should be considered bots.

0.1.0 — 2022-02-19

  • First release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dinghy-0.7.0.tar.gz (24.4 kB view hashes)

Uploaded Source

Built Distribution

dinghy-0.7.0-py2.py3-none-any.whl (24.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page