Skip to content

Add chango For Changelog Management Tool #4672

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

Merged
merged 12 commits into from
Mar 1, 2025
Merged

Add chango For Changelog Management Tool #4672

merged 12 commits into from
Mar 1, 2025

Conversation

Bibo-Joshi
Copy link
Member

When merged, closes #4321.
This is an initial setup. There are probably things to improve both in how PTB uses chango and in the feature set of chango itself.
But it can already generate the changelogs, so that's mature enough to get started :)

Should be merged directly after we make a release, so that we have a clean start

Let's hope that I got all the CI config right and this doesn't become an embarrassment xD

@Bibo-Joshi Bibo-Joshi added ⚙️ documentation affected functionality: documentation 📋 do-not-merge-yet work status: do-not-merge-yet ⚙️ ci-cid affected functionality: ci-cid labels Feb 6, 2025
@Bibo-Joshi Bibo-Joshi added the ℹ️ needs-wiki-update information: needs-wiki-update label Feb 7, 2025
Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

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

Nice! Looking forward to see how much easier changelog generation becomes

Copy link
Member

@Poolitzer Poolitzer left a comment

Choose a reason for hiding this comment

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

LGTM this is exciting

@Bibo-Joshi
Copy link
Member Author

🥳
If I have time before the next release, I'll update this PR to change the content of the GitHub release. At least for the start, I'll just point to the changelog on docs.ptb.org - that also gives us a single source of thruth. Possibly I'll also include a step that sends a similar message to the channel.

@Bibo-Joshi
Copy link
Member Author

I'll update this PR to change the content of the GitHub release. At least for the start, I'll just point to the changelog on docs.ptb.org - that also gives us a single source of thruth. Possibly I'll also include a step that sends a similar message to the channel.

Done that. I've tested locally that the sed-ing and sending message via curl works. That should suffice hopefully. In the worst case the creating of github release or tg channel post fail on the first release after merging this. But the pypi release won't be affected and GH release & Channel post can be created manually if needed. The sigstore artifacts are uploaded to the workflow attchments, so even those won't get lost.

@harshil21 harshil21 requested a review from Copilot February 26, 2025 18:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Bibo-Joshi and others added 2 commits February 26, 2025 20:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

codecov bot commented Feb 26, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
6520 1 6519 788
View the top 1 failed test(s) by shortest run time
tests.test_bot.TestBotWithRequest::test_send_close_date_default_tz[UTC-ZoneInfo]
Stack Traces | 5.28s run time
self = <tests.test_bot.TestBotWithRequest object at 0x000001B68E37A7C0>
tz_bot = PytestExtBot[token=671468886:AAGPGfciRIBUNFe824uIVdq7Je3_YnATNGw]
super_group_id = '-1001446022522'

    async def test_send_close_date_default_tz(self, tz_bot, super_group_id):
        question = "Is this a test?"
        answers = ["Yes", "No", "Maybe"]
        reply_markup = InlineKeyboardMarkup.from_button(
            InlineKeyboardButton(text="text", callback_data="data")
        )
    
        aware_close_date = dtm.datetime.now(tz=tz_bot.defaults.tzinfo) + dtm.timedelta(seconds=5)
        close_date = aware_close_date.replace(tzinfo=None)
    
        msg = await tz_bot.send_poll(  # The timezone returned from this is always converted to UTC
            chat_id=super_group_id,
            question=question,
            options=answers,
            close_date=close_date,
            read_timeout=60,
        )
        msg.poll._unfreeze()
        # Sometimes there can be a few seconds delay, so don't let the test fail due to that-
>       msg.poll.close_date = msg.poll.close_date.astimezone(aware_close_date.tzinfo)
E       AttributeError: 'NoneType' object has no attribute 'astimezone'

tests\test_bot.py:2843: AttributeError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@Bibo-Joshi Bibo-Joshi merged commit 76d8eaf into master Mar 1, 2025
27 checks passed
@Bibo-Joshi Bibo-Joshi deleted the chango branch March 1, 2025 17:35
@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚙️ ci-cid affected functionality: ci-cid 📋 do-not-merge-yet work status: do-not-merge-yet ⚙️ documentation affected functionality: documentation ℹ️ needs-wiki-update information: needs-wiki-update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New way to manage & structure release notes
3 participants