File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 18
18
from readthedocs .builds .constants import (
19
19
EXTERNAL_VERSION_STATE_CLOSED ,
20
20
EXTERNAL_VERSION_STATE_OPEN ,
21
+ LATEST ,
21
22
)
22
23
from readthedocs .core .signals import webhook_bitbucket , webhook_github , webhook_gitlab
23
24
from readthedocs .core .views .hooks import (
@@ -505,7 +506,7 @@ def handle_webhook(self):
505
506
return None
506
507
507
508
def _normalize_ref (self , ref ):
508
- "Remove `ref/(heads|tags)/` from the reference to match a Version on the db."
509
+ """ Remove `ref/(heads|tags)/` from the reference to match a Version on the db."" "
509
510
pattern = re .compile (r'^refs/(heads|tags)/' )
510
511
return pattern .sub ('' , ref )
511
512
Original file line number Diff line number Diff line change @@ -195,8 +195,9 @@ def clone(self):
195
195
try :
196
196
code , stdout , stderr = self .run (* cmd )
197
197
198
- # TODO: for those VCS providers that don't tell us the `default_branch` of the repository
199
- # in the incoming webhook, we need to get it from the cloned repository itself.
198
+ # TODO: for those VCS providers that don't tell us the `default_branch`
199
+ # of the repository in the incoming webhook,
200
+ # we need to get it from the cloned repository itself.
200
201
#
201
202
# cmd = ['git', 'symbolic-ref', 'refs/remotes/origin/HEAD']
202
203
# _, default_branch, _ = self.run(*cmd)
You can’t perform that action at this time.
0 commit comments