-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Implement archive script #1
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
Conversation
.then(() => true) | ||
.catch(error => { | ||
// error.message: Repository was archived so is read-only | ||
if (error.status === 403 && error.message.includes("archived")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than comparing the entire message
(which may change in the future), the conditional checks for a substring. If there is a better way of doing this check, please let me know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so
This is great! We can move it to @octoherd if you prefer, but as long as you add the I would love to build our own octoherd website that would list all "official" and community @octoherd script. But yeah, one day maybe :D |
I invited you as a collaborator, but afterwards I realized this doesn't make you admin meaning you can't move the repo. I can't move the repo either because I don't have permissions to create a repo in the octoherd org. Maybe best if you just re-create this repo yourself. |
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sure! Let's add @stefanbuck to the team! 👏🏽 |
Thank you for this valuable contribution @stefanbuck ! |
The current base is an exact copy of octoherd/script-delete-repository. This pull request implements the option to
archive
repositories using PATCH /repos/{owner}/{repo}. If a repository is already archived, the script logs a warning.