Hacker News new | ask | show | jobs
by throwaway286 2213 days ago
How do you use org-mode to automate pull-requests? Do you make the pull request inside emacs? Are you using it to compile a note from all of the commits in a certain branch? Or something else?
1 comments

Preface: I like very detailed pull-requests. For me this includes JIRA information and implementation notes. Most of my recent work has been backend API stuff, and org-babel/restclient [0] lets me do fast test-driven-development in the same file. These inputs / outputs are included in the PR render so it's easy to see what the API is doing.

> How do you use org-mode to automate pull-requests?

I have a script called 'new_jira $JIRA_NUMBER' which pulls relevant JIRA information from the REST API and generates an org-mode file. I do my work and list implementation details, gotchas, and generally narrate work done. Details are light for easy tickets, and heavy on complex ones. Finally, render it as markdown and copy/paste in the GitHub PR field.

I also include tips / tricks if it's not appropriate to comment directly in the code base. I come back and search for these later (knowledge base).

> Do you make the pull request inside emacs?

I've usually faced admin issues trying to get the necessary tokens to make PRs in emacs. Just render, copy & paste in the PR title/description field.

> Are you using it to compile a note from all of the commits in a certain branch?

That's right. All work relevant to a particular ticket is captured in a single org-mode file. I keep my git history clean and well documented so it's not necessary to use these files to understand commit history though.

> Or something else?

For work unrelated to the JIRA flow (e.g. security bug hunting) I use org-mode to track the entire narrative and use org-babel to inline code necessary for the exploit. This makes security reporting easy as I just render as PDF and shoot it off to the security people.

[0] https://github.com/pashky/restclient.el