Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nedbat/dinghy
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.3.1
Choose a base ref
...
head repository: nedbat/dinghy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 10 commits
  • 10 files changed
  • 4 contributors

Commits on Sep 21, 2023

  1. fix: override default since param only if explicitly provided by cli #36

    
    
    952b5db introduced a regression, ignoring the `since` parameter defined
    via YAML config in favor of the default defined by the cli option.
    ltvolks authored and nedbat committed Sep 21, 2023
    Copy the full SHA
    9b9ea6d View commit details
  2. build: version 1.3.2

    ltvolks authored and nedbat committed Sep 21, 2023
    Copy the full SHA
    f8cf77c View commit details
  3. Copy the full SHA
    abdf8bb View commit details

Commits on Jan 27, 2024

  1. Copy the full SHA
    ad0884f View commit details
  2. Copy the full SHA
    9d81369 View commit details

Commits on Nov 9, 2024

  1. Copy the full SHA
    85441b0 View commit details
  2. build: version 1.3.3

    nedbat committed Nov 9, 2024
    Copy the full SHA
    ab13e15 View commit details

Commits on Dec 21, 2024

  1. Copy the full SHA
    bb443bd View commit details

Commits on Jan 21, 2025

  1. build: scope fromisoformat backport to python<3.11

    The backports-datetime-fromisoformat package has no effect on Python
    versions >= 3.11.
    tjni authored and nedbat committed Jan 21, 2025
    Copy the full SHA
    9e3ecfb View commit details

Commits on Jan 24, 2025

  1. docs: add email digest tool

    iloveitaly authored and nedbat committed Jan 24, 2025
    Copy the full SHA
    0013fdf View commit details
Showing with 76 additions and 10 deletions.
  1. +14 −0 .ignore
  2. +27 −0 CHANGELOG.rst
  3. +1 −0 MANIFEST.in
  4. +1 −1 Makefile
  5. +16 −0 README.rst
  6. +3 −1 pyproject.toml
  7. +4 −0 scriv.d/20250105_214759_3806110+tjni_scope_backports.rst
  8. +1 −1 src/dinghy/__init__.py
  9. +1 −2 src/dinghy/cli.py
  10. +8 −5 src/dinghy/digest.py
14 changes: 14 additions & 0 deletions .ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# .ignore to control what gets searched.
build
dist
htmlcov
.tox*
.coverage*
_build
_spell
*.egg
*.egg-info
.mypy_cache
.pytest_cache
tmp
out_*.json
27 changes: 27 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -22,6 +22,32 @@ See the fragment files in the `scriv.d directory`_.

.. scriv-insert-here
.. _changelog-1.3.3:

1.3.3 — 2024-11-09
------------------

Added
.....

- Declared support for Python 3.12 and 3.13.

.. _changelog-1.3.2:

1.3.2 — 2023-09-21
------------------

Fixed
.....

- The 1.3.1 fix for the ignore ``--since`` option accidentally ignored
``since`` settings in configuration files. This is now fixed, closing `issue
36`_. Thanks, `Lucas Taylor <pull 37_>`_.

.. _issue 36: https://github.com/nedbat/dinghy/issues/36
.. _pull 37: https://github.com/nedbat/dinghy/issues/37


.. _changelog-1.3.1:

1.3.1 — 2023-09-17
@@ -35,6 +61,7 @@ Fixed

.. _issue 35: https://github.com/nedbat/dinghy/issues/35


.. _changelog-1.3.0:

1.3.0 — 2023-07-31
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include .editorconfig
include .ignore
include dev-requirements.txt
include Makefile
include *.rst
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ pypi: ## upload the built distributions to PyPI.
python -m twine upload --verbose dist/*

tag: ## make a git tag with the version number
git tag -a -m "Version $(VERSION)" $(VERSION)
git tag -s -m "Version $(VERSION)" $(VERSION)
git push --all

gh_release: ## make a GitHub release
16 changes: 16 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -184,10 +184,26 @@ The `sample digest <sample_>`_ is published daily using a GitHub Action from
its own repo: `nedbat/dinghy_sample <sample_repo_>`_. You can use it as a
starting point for your own publishing.

There's also a `separate project <email_project>`_ which sends a daily email of GitHub activity.


.. _sample: https://nedbat.github.io/dinghy_sample/3day.html
.. _sample_repo: https://github.com/nedbat/dinghy_sample
.. _email_project: https://github.com/iloveitaly/github-digest


Contributors
============

Thanks to all who have helped:

- Ned Batchelder
- Bill Mill
- Doug Hellmann
- Henry Gessau
- Lucas Taylor
- Quentin Pradet
- Simon de Vlieger


.. |pypi-badge| image:: https://img.shields.io/pypi/v/dinghy.svg
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -17,14 +17,16 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

requires-python = ">= 3.8"

dependencies = [
"aiofiles>=0.8",
"aiohttp>3",
"backports-datetime-fromisoformat",
"backports-datetime-fromisoformat; python_version<'3.11'",
"click>8",
"click-log>0.3",
"emoji",
4 changes: 4 additions & 0 deletions scriv.d/20250105_214759_3806110+tjni_scope_backports.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Changed
.......

- Install backports-datetime-fromisoformat only on Python < 3.11
2 changes: 1 addition & 1 deletion src/dinghy/__init__.py
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@
Dinghy daily digest tool.
"""

__version__ = "1.3.1"
__version__ = "1.3.3"
3 changes: 1 addition & 2 deletions src/dinghy/cli.py
Original file line number Diff line number Diff line change
@@ -45,8 +45,7 @@ def main_run(coro):
@click.option(
"--since",
metavar="DELTA-OR-DATE",
help="Specify a since date [default: 1 week].",
default="1 week",
help="Specify a since date. [default: 1 week]",
)
@click.argument("_input", metavar="[INPUT]", default="dinghy.yaml")
@click.argument("digests", metavar="[DIGEST ...]", nargs=-1)
13 changes: 8 additions & 5 deletions src/dinghy/digest.py
Original file line number Diff line number Diff line change
@@ -401,9 +401,10 @@ async def _process_pull_request(self, pull):
com0 = thread["comments"]["nodes"][0]
com0[DD_children] = thread["comments"]["nodes"][1:]
com0["isResolved"] = thread["isResolved"]
rev_id = com0["pullRequestReview"]["id"]
review_comments = reviews[rev_id].setdefault(DD_children, [])
review_comments.append(com0)
if com0["pullRequestReview"]:
rev_id = com0["pullRequestReview"]["id"]
review_comments = reviews[rev_id].setdefault(DD_children, [])
review_comments.append(com0)

# For each review, show it if it has a body, or if it has children, or
# if it's not just "COMMENTED".
@@ -496,16 +497,18 @@ def coro_from_item(digester, item):
return coro


async def make_digest(items, since="1 week", digest="digest.html", **options):
async def make_digest(items, since=None, digest="digest.html", **options):
"""
Make a single digest.
Args:
since (str): a duration spec ("2 day", "3d6h", etc).
since (optional str): a duration spec ("2 day", "3d6h", etc). Default: 1 week.
items (list[str|dict]): a list of YAML objects or GitHub URLs to collect entries from.
digest (str): the HTML file name to write.
"""
if since is None:
since = "1 week"
show_date = since != "forever"
since_date = parse_since(since)
digester = Digester(since=since_date, options=options)