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

Get the release notes from the pull request description automatically using a bot #14942

Merged
merged 1 commit into from Jul 23, 2018

Conversation

asmeurer
Copy link
Member

@asmeurer asmeurer commented Jul 19, 2018

The bot (https://github.com/sympy/sympy-bot) automatically checks every pull
request to make sure there is a valid release notes entry in the description.
The release notes entry should placed between the <!-- BEGIN RELEASE NOTES --> lines and be formatted like

* solvers
  * improved logarithmic solving

In other words, each release note entry should have a heading with the
submodule that was changed, or other, and have a bulleted list of the
changes.

I have written a guide on how to write release notes at
https://github.com/sympy/sympy/wiki/Writing-Release-Notes.

Whenever a new pull request is made, or the description is edited, the bot
will automatically check the release notes to see if they are formatted
correctly.

When the pull request is merged, the bot will automatically take the parsed
release notes and add them to the release notes on the wiki.

Any suggestions on the wording here or in the bot are welcome.

References to other Issues or PRs

Closes #13584
Closes #10942

Brief description of what is fixed or changed

This pull request just updates the PULL_REQUEST_TEMPLATE.md

Other comments

I will set up the bot and configure it to only run on this pull request (I will make it run everywhere once this is merged). Please feel free to play around with it by editing the text below:

Release Notes

  • other
    • the release notes are now automatically collected from pull request descriptions using a bot.

… using a bot

The bot (https://github.com/sympy/sympy-bot) automatically checks every pull
request to make sure there is a valid release notes entry in the description.
The release notes entry should placed between the `<!-- BEGIN RELEASE NOTES
-->` lines and be formatted like

```
* solvers
  * improved logarithmic solving
```

In other words, each release note entry should have a heading with the
submodule that was changed, or `other`, and have a bulleted list of the
changes.

I have written a guide on how to write release notes at
https://github.com/sympy/sympy/wiki/Writing-Release-Notes.

Whenever a new pull request is made, or the description is edited, the bot
will automatically check the release notes to see if they are formatted
correctly.

When the pull request is merged, the bot will automatically take the parsed
release notes and add them to the release notes on the wiki.

Any suggestions on the wording here or in the bot are welcome.
asmeurer added a commit to sympy/sympy-bot that referenced this pull request Jul 19, 2018
@sympy-bot
Copy link

sympy-bot commented Jul 19, 2018

Hi, I am the SymPy bot (v108). I'm here to make sure this pull
request has a release notes entry. Please read the guide on how to write
release notes
.

Click here to see the pull request description that was parsed.
The bot (https://github.com/sympy/sympy-bot) automatically checks every pull
request to make sure there is a valid release notes entry in the description.
The release notes entry should placed between the `<!-- BEGIN RELEASE NOTES
-->` lines and be formatted like

```
* solvers
  * improved logarithmic solving
```

In other words, each release note entry should have a heading with the
submodule that was changed, or `other`, and have a bulleted list of the
changes.

I have written a guide on how to write release notes at
https://github.com/sympy/sympy/wiki/Writing-Release-Notes.

Whenever a new pull request is made, or the description is edited, the bot
will automatically check the release notes to see if they are formatted
correctly.

When the pull request is merged, the bot will automatically take the parsed
release notes and add them to the release notes on the wiki.

Any suggestions on the wording here or in the bot are welcome.

<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234". See
https://github.com/blog/1506-closing-issues-via-pull-requests .-->

Closes #13584
Closes #10942 

#### Brief description of what is fixed or changed

This pull request just updates the PULL_REQUEST_TEMPLATE.md

#### Other comments

I will set up the bot and configure it to only run on this pull request (I will make it run everywhere once this is merged). Please feel free to play around with it by editing the text below:

#### Release Notes

<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. If there is no release notes entry for this PR,
write "NO ENTRY". The bot will check your release notes automatically to see
if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* other
  * the release notes are now automatically collected from pull request descriptions using a [bot](https://github.com/sympy/sympy-bot).
<!-- END RELEASE NOTES -->
<!-- EDIT 3 -->

Your release notes are in good order.
Here is what the release notes will look like:

  • other
    • the release notes are now automatically collected from pull request descriptions using a bot. (#14942 by @asmeurer)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.2.1.

Note: This comment will be updated with the latest check if you edit the pull
request. You need to reload the page to see it.

@isuruf
Copy link
Member

isuruf commented Jul 19, 2018

You could also use the github status API to add a status to the latest commit sha and make it required for merging pull requests.

@asmeurer
Copy link
Member Author

@isuruf yes, it is supposed to be doing that. But I just noticed that for whatever reason it isn't working on this pull request.

@asmeurer
Copy link
Member Author

Ah figured out the problem. The bot has to have push access to add a status (unfortunately), and I forgot to accept the invitation. You can see the status check now.

@asmeurer
Copy link
Member Author

@smichr @jksuom @Upabjojr you'd done the bulk of the pull request merging recently. I'd love to hear your thought on this before we deploy it.

@jksuom
Copy link
Member

jksuom commented Jul 21, 2018

This looks good to me. It should not be too hard to edit the notes section before merging if necessary.

asmeurer added a commit to sympy/sympy-bot that referenced this pull request Jul 23, 2018
@asmeurer
Copy link
Member Author

OK, let's try this out. If anyone has any more feedback, please open an issue at https://github.com/sympy/sympy-bot/issues

@asmeurer asmeurer merged commit c267a7c into sympy:master Jul 23, 2018
@asmeurer
Copy link
Member Author

It's working now https://github.com/sympy/sympy/wiki/Release-Notes-for-1.2.1

Reminder to everyone: if you edit the pull request description, you need to reload the page to see the updated comment (the bot generally runs instantly, but GitHub doesn't autoupdate edited comments).

@asmeurer
Copy link
Member Author

asmeurer commented Jul 23, 2018

I have set the bot as required to merge. To trigger the bot on an existing pull request, just edit the pull request description. Editing the description is better than closing and reopening the pull request, as that also causes Travis to rebuild.

@sidhantnagpal
Copy link
Member

I don't know if this is desired, but after this PR got merged, most PRs that were already merged now show pending status instead of passed status.

@asmeurer
Copy link
Member Author

Yes, that is because I set the bot to required. This is intentional because all PRs merged from now on should have release notes. You can trigger the bot on a PR by editing the description (even a trivial edit like adding a newline). That will change the status from pending to passed or failed.

@asmeurer
Copy link
Member Author

Actually I guess you need push access to do that. Otherwise you can only edit your own pull requests.

@moorepants
Copy link
Member

I just wanted to note how awesome this addition is! The release notes for 1.2.1 are so nice.

@asmeurer
Copy link
Member Author

Thanks Jason. Yes, it's already looking as good as the 1.2 notes, which took me a month to compile.

If you have any feedback on the bot please let me know over at https://github.com/sympy/sympy-bot

@moorepants
Copy link
Member

Will do. Thanks for putting this together!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Including Release Notes in sympy repo.
6 participants