File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,17 @@ def is_deletable_mathlib(sha, creation_time):
21
21
and sha not in mathlib_master_commits \
22
22
and current_time - creation_time > DURATION
23
23
24
- # archives from e.g. lean-liquid are only saved if they come from recent master commits
24
+ # archives from e.g. lean-liquid follow the same logic as mathlib
25
25
def is_deletable_external (repo , sha , creation_time ):
26
26
if repo not in external_repo_info :
27
27
new_cloned_repo = git .Repo .clone_from (f'https://{ github_token } @github.com/leanprover-community/{ repo } .git' ,repo )
28
28
external_repo_info [repo ] = {
29
29
'branch_heads' : set (r .commit .hexsha for r in new_cloned_repo .refs ),
30
30
'master_commits' : set (c .hexsha for c in new_cloned_repo .iter_commits ('master' )),
31
- 'master_head' : new_cloned_repo .rev_parse ('origin/master' ),
32
31
}
33
- return sha not in external_repo_info [repo ]['master_commits' ] or \
34
- (current_time - creation_time > DURATION and sha != external_repo_info [repo ]['master_head' ])
32
+ return sha not in external_repo_info [repo ]['branch_heads' ] \
33
+ and sha not in external_repo_info [repo ]['master_commits' ] \
34
+ and current_time - creation_time > DURATION
35
35
36
36
def is_deletable (path , creation_time ):
37
37
if '/' not in path : # this archive came from mathlib
You can’t perform that action at this time.
0 commit comments