You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The ability to retrieve a repo's archived timestamp. #9746
Describe the feature or problem you’d like to solve
Our technical oversight committee (TOC) would like to better identify, notify and make requests to our user community when one of our third party artifacts has been archived by its maintainer. An artifact is tied to a repo. Knowing that an artifact has been archived is insufficient since it does not mean the artifact is useless The user community should know when it was archived so they can make their own decision if some other person wants to start maintaining the artifact for the general community, stop using the artifact or make their own fork for the artifact. The TOC also want to display and sort by the archive timestamp when displaying the various artifacts on web pages.
As an artifact ages, the TOC can make requests to the community if they believe the artifact should continue being maintained or even dropped.
The GH command has most of of the information we need to automate this process, but it was missing the archived timestamp.
Proposed solution
When you go to the home page of an archived repo, the date is displayed when the repo was archived. We would like to retrieve that same date through the GH command. The same useful information displayed on the repo's main page would also be available through the GH command.
Currently we can retrieve the archive status using the json variable isArchived.
gh repo view --json isArchived <repo>
The proposed solution would be to add a new variable for the archive timestamp.
Given I have an archived repo When I run gh repo view --json archivedAt <repo> Then I see the archived date of the repo in the json response is populated
Given I have an unarchived repo When I run gh repo view --json archivedAt <repo> Then I see the archived date of the repo is null
Given I have archived and unarchived repos When I run gh repo list --json name,archivedAt <repo> Then I see the archived dates of the repos populated or null as expected
Activity
williammartin commentedon Oct 11, 2024
@andyfeller just FYI I already semi-triaged this here: #9744 (comment)
Update README.md
andyfeller commentedon Oct 16, 2024
Thanks, @williammartin! 🙇
@norman-abramovitz : If this is something you might be interested doing, it should be primarily:
ArchivedAtfield to theRepositoryArchivedAtfield to the list of fields exportedcli/api/queries_repo.go
Lines 27 to 133 in 7aef6ec
cli/api/query_builder.go
Lines 384 to 426 in 7aef6ec
norman-abramovitz commentedon Oct 16, 2024
Sure, I will have to give @williammartin most of the credit though.
Testcases
tsukasaI commentedon Oct 18, 2024
Hi there.
Can I take this issue?
williammartin commentedon Oct 18, 2024
Sure thing, thanks! We don't officially assign issues to OSS contributors but please go ahead and open a PR.
tsukasaI commentedon Oct 19, 2024
Hi.
I've opened the PR.
#9790
I would like to make sure especially which test file I should update.
Have a look when you have time, thanks.
williammartin commentedon Oct 22, 2024
Acceptance Criteria
Given I have an archived repo
When I run
gh repo view --json archivedAt <repo>Then I see the archived date of the repo in the json response is populated
Given I have an unarchived repo
When I run
gh repo view --json archivedAt <repo>Then I see the archived date of the repo is
nullGiven I have archived and unarchived repos
When I run
gh repo list --json name,archivedAt <repo>Then I see the archived dates of the repos populated or
nullas expectedwilliammartin commentedon Oct 22, 2024
Delivered in #9790, should make it out in a release this week.