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

Link to license and changelog in overview #564

Merged
merged 5 commits into from
Sep 9, 2022
Merged

Link to license and changelog in overview #564

merged 5 commits into from
Sep 9, 2022

Conversation

cuihtlauac
Copy link
Collaborator

@cuihtlauac cuihtlauac commented Sep 2, 2022

Fix #36

Display links to changelog and license in overview, if available.

@cuihtlauac cuihtlauac changed the title Link to license, changelog and readme in overview Link to license, changelog in overview Sep 2, 2022
@cuihtlauac cuihtlauac changed the title Link to license, changelog in overview Link to license and changelog in overview Sep 2, 2022
Copy link
Collaborator

@tmattio tmattio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the PR @cuihtlauac!

The approach looks great overall, I left a few comments with suggestions.

src/ocamlorg_frontend/pages/package_overview.eml Outdated Show resolved Hide resolved
src/ocamlorg_package/lib/ocamlorg_package.ml Outdated Show resolved Hide resolved
src/ocamlorg_package/lib/ocamlorg_package.ml Outdated Show resolved Hide resolved
src/ocamlorg_package/lib/ocamlorg_package.mli Outdated Show resolved Hide resolved
src/ocamlorg_web/lib/handler.ml Outdated Show resolved Hide resolved
cuihtlauac and others added 5 commits September 7, 2022 15:42
Fix #36

Display links to change log, readme, license in overview.
Also displays licence name.
Skip changelog section if CHANGES.md file is missing
Some packages store their changelog in a file named CHANGES
instead of CHANGES.md. This allows to handle both cases.
Both changelog and license file name candidates are searched:

* as plain text file (i.e. without extension)
* as markdown file (i.e. with .md extension).

Searched base name candidates are:

* License: LICENSE
* Changelog: CHANGES and CHANGELOG

In case other base names are missing, just add them to the list.

If either changelog or license is missing, no link will be
inserted in the overview.
@tmattio
Copy link
Collaborator

tmattio commented Sep 8, 2022

Thanks @cuihtlauac! I took the liberty to push 67eb6e9 with some cosmetic changes, essentially to rename the *_file functions to *_filename. Let me know if that looks ok to you and this is ready to merge!

@cuihtlauac
Copy link
Collaborator Author

Excellent, maybe_files is indeed much better your way, many thanks. Let's go for this

@tmattio tmattio merged commit 90cea07 into ocaml:main Sep 9, 2022
@cuihtlauac cuihtlauac deleted the fix_36 branch October 18, 2022 06:24
@cuihtlauac cuihtlauac mentioned this pull request Oct 20, 2022
sabine pushed a commit that referenced this pull request Oct 21, 2022
Display links to change log, readme, license in package overview.
Also displays licence name.

Co-authored-by: Cuihtlauac ALVARADO <cuihtmlauac@tarides.com>
Co-authored-by: Thibaut Mattio <thibaut.mattio@gmail.com>
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.

Link to license and changelog in overview
2 participants