Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script to mail regular issue summaries to typing-sig #929

Merged
merged 7 commits into from Dec 22, 2021

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Nov 9, 2021

Example output (with cheated "since" date, since last week I touched all issues):

From: Typing Bot <noreply@python.org>
To: typing-sig@python.org
Subject: Opened and changed typing issues week 2021-W44

The following is an overview of all issues and pull requests in the
typing repository on GitHub with the label 'topic: feature'
that were opened or updated last week, exluding closed issues.

---------------------------------------------------

The following issues and pull requests were opened last week: 

#928   Add a `import type` feature (like typescript)
       opened by @KotlinIsland
       https://api.github.com/repos/python/typing/issues/928

---------------------------------------------------

The following issues and pull requests were updated last week: 

#802   Wrapper/Proxy Generic Type
       opened by @hatal175
       https://api.github.com/repos/python/typing/issues/802
#926   Change PEP 647 to allow for narrowing in the negative case
       opened by @Zomatree
       https://api.github.com/repos/python/typing/issues/926

---------------------------------------------------

All issues and pull requests with the label 'topic: feature'
can be viewed under the following URL:

https://github.com/python/typing/issues?q=label%3A%22topic%3A+feature%22

This script would be run once a week as a cron job. Unfortunately it seems that we can't mail directly from GitHub Actions (at least not without a mail server configured for it), but I can set up a cron job on a company server.

One possible caveat: It's possible the Python mail server will reject the mail with a python.org-From from a remote web server, in which case we need to change the From to something else.

@gvanrossum Would this weekly report be okay for typing-sig?

Cc @shannonzhu

@Gobot1234
Copy link
Contributor

@Gobot1234 Gobot1234 commented Nov 12, 2021

Apart from a couple of things LGTM:

  • would it not be good to reform the issue urls so that they don't take you to json
  • should this not include a github actions script to automate sending of this

scripts/typing-summary.py Outdated Show resolved Hide resolved
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
@srittau
Copy link
Collaborator Author

@srittau srittau commented Nov 12, 2021

  • should this not include a github actions script to automate sending of this

See my comment above:

Unfortunately it seems that we can't mail directly from GitHub Actions (at least not without a mail server configured for it), but I can set up a cron job on a company server.

@srittau
Copy link
Collaborator Author

@srittau srittau commented Nov 14, 2021

I've now set up a cron job that executes this script every Monday morning. Let's see whether this get through tomorrow.

@srittau srittau added the topic: maintenance label Nov 14, 2021
Use a constant for the label
s += "The following issues and pull requests were opened last week: \n\n"
s += "".join(generate_issue_text(issue) for issue in new)
s += "\n---------------------------------------------------\n\n"
if len(changed) >= 0:
Copy link

@Akuli Akuli Nov 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe these should be >, so that they don't run every time.

Copy link
Collaborator Author

@srittau srittau Nov 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@srittau
Copy link
Collaborator Author

@srittau srittau commented Dec 22, 2021

Ping. This has now been officially used for a few weeks. I think we should merge it.

@JelleZijlstra JelleZijlstra merged commit 4589570 into python:master Dec 22, 2021
7 checks passed
@srittau srittau deleted the issue-summary branch Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA signed topic: maintenance
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants