# Changelogs/fragments chicken-and-egg naming problem

**URL:** <https://forum.ansible.com/t/changelogs-fragments-chicken-and-egg-naming-problem/4282>\
**Category:** Get Help\
**Tags:** dev, collections\
**Created:** [March 9, 2024, 2:57am UTC](https://forum.ansible.com/t/changelogs-fragments-chicken-and-egg-naming-problem/4282 "2024-03-09T02:57:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [March 9, 2024, 2:57am UTC](https://forum.ansible.com/t/changelogs-fragments-chicken-and-egg-naming-problem/4282/1 "2024-03-09T02:57:54Z")

</div>

I’m working on a pull request with a minor change to the `community.general.ini_file` module. According to [Creating a changelog fragment](https://docs.ansible.com/ansible/devel/community/development_process.html#creating-a-changelog-fragment),

> The file name should include the PR number and a description of the change.

The description of the change is no problem, but how can I create a file with the pull request number in the name before submitting the pull request? I won’t know the PR number until I create the PR.

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [March 9, 2024, 7:40am UTC](https://forum.ansible.com/t/changelogs-fragments-chicken-and-egg-naming-problem/4282/2 "2024-03-09T07:40:30Z")

</div>

Implement your changes, create a PR and then add the changelog fragment in a second commit.

I’m not sure about this requirement. I always thought it’s mainly there to ensure uniq file names. Sometimes, you also see changelog fragments using the issue number that the PR fixes / implements. But I don’t know how the maintainers of `community.general` work and if they would accept this.

cc @felixfontein

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [March 9, 2024, 8:09am UTC](https://forum.ansible.com/t/changelogs-fragments-chicken-and-egg-naming-problem/4282/3 "2024-03-09T08:09:14Z")

</div>

Using another commit (for force-pushing to update if you want to have everything in one) is what most people do.

You can also guess the PR number by looking at the last issue/PR number used in [Issues · ansible-collections/community.general · GitHub](https://github.com/ansible-collections/community.general/issues/?q=), and incrementing that by one. In case nobody creates a new PR/issue between you looking at that page and creating your PR, that will be the number your PR gets 🙂 I’m using this approach when creating PRs for ansible/collection PRs and it mostly works fine (in the very few cases it does not I’ll have a bit more work to update the number).

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [March 9, 2024, 8:10am UTC](https://forum.ansible.com/t/changelogs-fragments-chicken-and-egg-naming-problem/4282/4 "2024-03-09T08:10:29Z")

</div>

In general it’s also OK if you don’t have the PR number in the filename, but the file itself still has to include the PR URL (and the issue URL if that exists).

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [March 9, 2024, 11:36am UTC](https://forum.ansible.com/t/changelogs-fragments-chicken-and-egg-naming-problem/4282/5 "2024-03-09T11:36:12Z")

</div>

> [@felixfontein](#):
>
> the file itself still has to include the PR URL (and the issue URL if that exists)

Yes, I think that is really important. Since the fragment turns up in the changelog, it’s easier for people to read up on what and why changed in detail if they wish to.

Although I usually include just the issue URL if one exists (the PR is just one click away since they’re linked) and the PR URL if I implement stuff without having an issue in `community.vmware`.

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [March 9, 2024, 12:53pm UTC](https://forum.ansible.com/t/changelogs-fragments-chicken-and-egg-naming-problem/4282/6 "2024-03-09T12:53:09Z")

</div>

I guessed right. 🙂[ini\_file - support optional spaces around section names by utoddl · Pull Request #8075 · ansible-collections/community.general · GitHub](https://github.com/ansible-collections/community.general/pull/8075) has been submitted.  
Thanks, folks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [April 8, 2024, 12:53pm UTC](https://forum.ansible.com/t/changelogs-fragments-chicken-and-egg-naming-problem/4282/7 "2024-04-08T12:53:56Z")

</div>

Closed on April 8, 2024, 12:53pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
