Skip to content

Add uploaded_at field in package api #1080

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged

Conversation

Kleidukos
Copy link
Member

@Kleidukos Kleidukos commented May 22, 2022

At present time, the information returned by the Package JSON API amounts to:

{
    "author": "Hécate Moonlight",
    "copyright": "",
    "description": "The 'Display' typeclass provides a solution for user-facing output that does not have to abide by the rules of the Show typeclass.",
    "homepage": "https://github.com/haskell-text/text-display#readme",
    "license": "MIT",
    "metadata_revision": 0,
    "synopsis": "A typeclass for user-facing output"
}

This PR aims to implement support for the package upload timestamp in this payload.

The final result is this:

{
    "author": "Hécate Moonlight",
    "copyright": "",
    "description": "The 'Display' typeclass provides a solution for user-facing output that does not have to abide by the rules of the Show typeclass.",
    "homepage": "https://github.com/haskell-text/text-display#readme",
    "license": "MIT",
    "metadata_revision": 0,
    "synopsis": "A typeclass for user-facing output",
    "uploaded_at": "2022-05-22T22:24:48.997120639Z"
}

@Kleidukos Kleidukos changed the title Add uploaded at field in package api Add uploaded_at field in package api May 22, 2022
@Kleidukos Kleidukos force-pushed the add-uploaded-at-field-in-package-api branch from 05a7a53 to 47eff7a Compare May 22, 2022 22:26
@Kleidukos Kleidukos marked this pull request as ready for review May 22, 2022 22:27
@Kleidukos
Copy link
Member Author

@gbaz I tried to make the changes as less invasive as possible. Is there something that should be improved?

Copy link
Member

@andreasabel andreasabel left a comment

Choose a reason for hiding this comment

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

Looks reasonable!, just cosmetical changes requested.

@Kleidukos
Copy link
Member Author

Annex question: I'm not super clear on how information is stored, and especially the download numbers. I'd like to expose that kind of information in a subsequent PR.

@Kleidukos Kleidukos requested a review from andreasabel May 23, 2022 07:37
Copy link
Member

@andreasabel andreasabel left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@Kleidukos
Copy link
Member Author

@gbaz soft-ping

@andreasabel andreasabel merged commit c995284 into haskell:master Jun 7, 2022
@andreasabel
Copy link
Member

This PR looks reasonable and I do not expect it to break something, so I dared to merge it. @gbaz, please revert if you disagree.

@Kleidukos Kleidukos deleted the add-uploaded-at-field-in-package-api branch June 7, 2022 16:38
gbaz added a commit that referenced this pull request Jan 5, 2023
* delete unused GitHub Action; fix CI badge

* Fix #1076: separate validators from UI and doctest them (#1077)

* Cachix caching for nix-shell GitHub Action (#1081)

* Add uploaded_at field in package api (#1080)

* package page: Include virtual-modules in module tree (#1085)

* Allow hashable-1.4 and text-2.0 (#1089)

* Divide sitemap into parts

* Add sitemap link for subdirectories

* Fix `non-canonical-return` warnings

* Bump CI to GHC 9.2.3 and restrict to master branch

* Check authorisation (#1111)

* Dynamically add css piece

* Fix #1105: change order of markdown parsers to allow pipes in lists

* Fix #1128, fix #1130 by adding bounds to Cabal-syntax and haddock-library

* Bump CI to 9.2.4 and some deps

* Force .txt and .text to have UTF-8 MIME charset (#1133)

* Upgrade to haddock-library-1.11.0 (#1126)

* attempt to speed up GitHub Action for Nix Shell

* work with cabal 3.8

* Updated accepted licenses (#1092)

* Add dependabot for github workflows

* Bump cachix/cachix-action from 10 to 12

* Bump actions/checkout from 2.4.0 to 3.1.0
* Bump cachix/install-nix-action from 17 to 18

* Build with Cabal-3.8 and GHC 9.4 (#1141)

* Haskell CI: bump to Ubuntu-22.04, GHC 9.2.5 and 9.4.4

* Allow mtl-2.3 and transformers-0.6 (#1150)

* Disable test (#1124)

* allow disable tests on client side

* add deprecated version warning (#1123)

* List maintainers on package page (#1098)

* List maintainers on package page

* Vendor snowball package (#1116)

* Add searchbox metadata (#1115)

* Add captcha for user registration (#1099)

* remove filtering 00-index for cabal version < 2.0 hack (#1152)

* Add lastVersion in listings (#749) (#1140)

* rm icu dep instructions, add libgd

* Add test log display (#1100)

* Add test log

* Reverse Dependencies indexed on PackageName (#1082)

* Rebased Reverse Dependencies

* Add "Quick Jump" to candidate package page (#1122)

* Solves #1029 - Adds paging to recent packages and recent revisions (#1055)

* support for `prefers-color-scheme` (#1008)

* 2x brightness for captions and links in dark color scheme

* table dark color scheme

* prefers-color-scheme for links, footer, and table-of-contents

* paginator css for `prefers-color-scheme`

* Maintainer notifications

* cleanup partial functions for revdeps, elim use of MonadThrow, MonadCatch

* fix tests enablement link

Co-authored-by: Peter Becich <peterbecich@gmail.com>
Co-authored-by: Andreas Abel <andreas.abel@ifi.lmu.de>
Co-authored-by: Hécate Moonlight <Kleidukos@users.noreply.github.com>
Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
Co-authored-by: ˌbodʲɪˈɡrʲim <andrew.lelechenko@gmail.com>
Co-authored-by: Alias Qli <2576814881@qq.com>
Co-authored-by: Ondřej Kubánek <71923533+kubaneko@users.noreply.github.com>
Co-authored-by: Gautier DI FOLCO <gautier.difolco@gmail.com>
Co-authored-by: Janus Troelsen <ysangkok@gmail.com>
Co-authored-by: Levi Butcher <31522433+LeviButcher@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants