canmod / macpan2

Rebuilding https://github.com/mac-theobio/McMasterPandemic/
https://canmod.github.io/macpan2/
GNU General Public License v3.0
2 stars 0 forks source link

referring to GH issues in NEWS #227

Open jaganmn opened 4 days ago

jaganmn commented 4 days ago

I mentioned in the call yesterday: FWIW, if you ever decide to change to inst/NEWS.Rd from NEWS.md, then you can use something like

\newcommand{\GH}{\href{https://github.com/canmod/macpan2/issues/#1}{GH##1}}
\section{Changes in version 1.10.0 (2024-10-18)}{
  \subsection{New Features}{
    \item Change log moved from \file{NEWS.md} to \file{inst/NEWS.Rd}, fixing \GH{227}.
  }
}

to refer to GitHub issues when listing new features and bug fixes. I don't know if Markdown supports something similar. Well, however you do it, linking the change log to the bug tracker is generally very helpful for maintainers and users alike.

I can create a pull request if you decide that you are open to using Rd markup for the change log.

bbolker commented 4 days ago

Markdown doesn't support macros (in general; there may be some dialects/flavours that do). You could of course spell out the references as GH1 (i.e. [GH1](https://github.com/canmod/macpan2/issues/#1), although obviously the \GH{} macro is easier to compose and read.

jaganmn commented 4 days ago

I think issues/<number> will redirect to pull/<number> if <number> actually refers to a pull request (and vice versa). I don't remember if R CMD check complains about redirects. If it does, then you could always define a second macro (named, e.g., \PR) for pull requests.

stevencarlislewalker commented 4 days ago

Thanks @jaganmn. I'll consider switching to Rd. I feel that the root cause of the issue is more about my thinking speed than typing speed. I should first get better at isolating feature requests and bug fixes, and then stuff like the above will feel more important.