packit / packit-service

Packit provided as a service
https://packit.dev
MIT License
34 stars 48 forks source link

Allow editing %changelog in PR #2211

Open xsuchy opened 11 months ago

xsuchy commented 11 months ago

Description

I was using pull-from-upstream and I fighted with %changelog. First I had

What I would find convenient is to put comment in PR with:

/packit change changelog
- feat: bump min supported version of python to 3.8
- build: bump dependencies to avoid vulnerabilities

and Packit then edited the PR for me. Resulting with:

+* Wed Oct 04 2023 Packit <hello@packit.dev> - 3.17.0-1
+- feat: bump min supported version of python to 3.8
+- build: bump dependencies to avoid vulnerabilities

Benefit

Mirek will be happy. Other users will be happy too.

Importance

No response

What is the impacted category (job)?

Fedora release automation

Workaround

Participation

lachmanfrantisek commented 11 months ago

@xsuchy Actually, the default behaviour taken from the upstream is just a really simple git format you can easily reuse in the action.

https://github.com/packit/packit/blob/24cc5c977450c114dd8c11efa1c8a51644c1123d/packit/upstream.py#L419

        cmd = [
            "git",
            "log",
            "--no-merges",
            "--pretty=format:- %s (%an)",
            commits_range,
            "--",
        ]

But that's probably not what you want if I understand your ask -- you want to edit the changelog interactively, don't you? (You don't know beforehand what edits are needed.)

If that's the case, then the ideal solution will be to let you push to the PR what is discussed in https://github.com/packit/packit/issues/2078 (Sadly, Pagure does not support edits by maintainers directly.)

I agree the comment might be more convenient but am a bit worried if more people will use this and also about the formatting.

lachmanfrantisek commented 11 months ago

One more thing about formatting is that originally, we wanted to mimic the CLI UX when providing the comment commands which this doesn't fulfil. On the other hand, requiring some escaping is a pain.

lachmanfrantisek commented 11 months ago

I was also thinking about something like GitHub/GitLab suggestions in file comments, but this looks more and more like functionality that should be covered by the git forge (i.e. Pagure) and not by us.