8 Replies
stormy-gold•16mo ago
We don't call them snapshots, but you can create a branch without a compute to act as a snapshot
IIRC we have a feature request for snapshots open
correct-apricot•16mo ago
Thanks @ShinyPokemon , are we able to set a "TTL" for branches? Otherwise we'd hit our 500 limit pretty quickly
stormy-gold•16mo ago
Not at present. Perhaps a GitHub Action (or similar cron job) could be run daily to clean up branches older than a certain date.
This is something we could include when we have a backup/snapshot feature though
correct-apricot•16mo ago
are there any github actions to fetch all branches? I only see actions for creating and deleting branches
stormy-gold•16mo ago
Not at present, no. You can get all branches by setting
NEON_API_KEY
as an environment vaiable and running
I'm trying to think about how a list branches action would work. I think using that command above, and passing it as an output matrix. Similar to this: https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.ymlGitHub
test-github-action/.github/workflows/reusable-config.yml at main · ...
Contribute to ch007m/test-github-action development by creating an account on GitHub.
correct-apricot•16mo ago
yes that makes sense, thanks! I was trying to be consistent with the methods used in our github actions (i.e. using GH actions vs in-line commands"
stormy-gold•16mo ago
I can see if I find the time to work on an action! It would probably be helpful for this kind of thing.
If implemented it should probably return all the JSON, since developers might need to filter on certain fields. Like the date, as in your case.
correct-apricot•16mo ago
yes exactly, that would be amazing. Thank you so much @ShinyPokemon !!