Skip to content

Conversation

stefanbuck
Copy link
Member

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.

.then(() => true)
.catch(error => {
// error.message: Repository was archived so is read-only
if (error.status === 403 && error.message.includes("archived")) {
Copy link
Member Author

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

Copy link
Member

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

@stefanbuck
Copy link
Member Author

@gr2m is this script something you would be interested in? I'm more than happy to move the repo into the @octoherd org.

@gr2m
Copy link
Member

gr2m commented Mar 23, 2022

This is great! We can move it to @octoherd if you prefer, but as long as you add the octoherd-script repository topic, it should be discoverable at https://github.com/topics/octoherd-script

I would love to build our own octoherd website that would list all "official" and community @octoherd script. But yeah, one day maybe :D

@stefanbuck stefanbuck merged commit 834caf9 into main Mar 24, 2022
@stefanbuck stefanbuck deleted the script-archive-repository branch March 24, 2022 23:22
@stefanbuck
Copy link
Member Author

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.

@gr2m
Copy link
Member

gr2m commented Mar 25, 2022

I can invite you to @octoherd and you move it then? I can revoke your access if you don't want to co-maintain, but I'm sure @oscard0m would be as happy as me to have you

@github-actions
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@oscard0m
Copy link
Member

I can invite you to @octoherd and you move it then? I can revoke your access if you don't want to co-maintain, but I'm sure @oscard0m would be as happy as me to have you

Sure! Let's add @stefanbuck to the team! 👏🏽

@oscard0m
Copy link
Member

Thank you for this valuable contribution @stefanbuck !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants