Skip to content

Conversation

@giordano
Copy link
Member

No description provided.

@giordano giordano merged commit 8623343 into EnzymeAD:main Jan 26, 2025
3 of 6 checks passed
@giordano giordano deleted the mg/docs-cleanup branch January 26, 2025 17:19
@giordano
Copy link
Member Author

For future reference, I manually cleaned up all old previews with the following script:

using GitHub: GitHub

auth = GitHub.authenticate(ENV["GITHUB_TOKEN"])
repo = GitHub.repo("EnzymeAD/Reactant.jl"; auth)
pull_requests = GitHub.pull_requests(repo; auth)
pr_numbers = [pr.number for pr in pull_requests[1]]

previews_dir = joinpath(Base.DEPOT_PATH[1], "dev", "Reactant", "previews")

if !isdir(previews_dir)
    error("$(previews_dir) does not exist, fix the location of the previews directory")
end

for preview in readdir(previews_dir)
    preview_number = parse(Int, replace(preview, "PR" => ""))
    if preview_number  pr_numbers
        run(`git -C $(previews_dir) rm -rf PR$(preview_number)`)
    end
end

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.

1 participant