Open PeterJohnson opened 2 years ago
We could add a {file_url}
tag to licenseupdate.py. Finding the right URL would be difficult since the origin remote isn't always upstream.
Or we could support something like the following in licenseupdate.py:
https://github.com/wpilibsuite/allwpilib/blob/main/{filename}
where {filename}
expands to the file's path relative to the repo root.
I think the latter might be better, as I'm not sure how it will know where to point the base URL in file_url to?
Yep.
I wonder if we still should have _url in there somewhere, because theoretically we might need to escape spaces (spaces are a terrible idea for other reasons though, of course, so maybe this is a non-issue).
For team discoverability of GitHub source code, it might be helpful to automatically add a link in the header to the file on GitHub, similar to what RTD does. E.g.
One problem with this is the link is almost certainly longer than the allowed line length, which may cause other formatters/style checkers (PMD, Checkstyle) to complain?