Skip to content

Script to delete old docs#353

Merged
coyotte508 merged 3 commits into
mainfrom
cron-delete-old
Mar 3, 2023
Merged

Script to delete old docs#353
coyotte508 merged 3 commits into
mainfrom
cron-delete-old

Conversation

@coyotte508

@coyotte508 coyotte508 commented Mar 2, 2023

Copy link
Copy Markdown
Member

Use @huggingface/hub to delete old docs, docs older than 1 month. I wanted to do three months but we're going to periodically squash the repo, and docs can be regenrated anyway.

Use Deno to run the script without the need for a package.json.

The Github Action will run every day.

@coyotte508 coyotte508 requested review from Pierrci and mishig25 March 2, 2023 00:16
@coyotte508 coyotte508 merged commit 64775a6 into main Mar 3, 2023
@coyotte508 coyotte508 deleted the cron-delete-old branch March 3, 2023 08:44

@Pierrci Pierrci left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

Comment thread scripts/delete-old-prs.ts
@@ -0,0 +1,43 @@
#!/usr/bin/env -S deno run --allow-env --allow-net --allow-run --allow-read
// To format: npx prettier --write .
import { commit, listFiles } from "npm:@huggingface/hub@0.1.3";

@Pierrci Pierrci Mar 3, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is that the main reason for picking deno? No need for package.json or npm i? :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(ok I should have read the description lol)

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.

2 participants