File tree Expand file tree Collapse file tree 2 files changed +24
-10
lines changed Expand file tree Collapse file tree 2 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -4000,6 +4000,10 @@ def __str__(self):
4000
4000
)
4001
4001
4002
4002
def to_dict (self ):
4003
+ if getattr (self .model , 'skip_cla' , None ) is None :
4004
+ self .model .skip_cla = {}
4005
+ if getattr (self .model , 'enable_co_authors' , None ) is None :
4006
+ self .model .enable_co_authors = {}
4003
4007
ret = dict (self .model )
4004
4008
4005
4009
if "organization_installation_id" not in ret :
Original file line number Diff line number Diff line change 35
35
exit 2
36
36
fi
37
37
38
+ to_epoch_ms () {
39
+ local v=" $1 "
40
+ if [[ " $v " =~ ^[0-9]{13}$ ]]
41
+ then
42
+ echo " $v " ; return
43
+ fi
44
+ if [[ " $v " =~ ^[0-9]{10}$ ]]
45
+ then
46
+ echo " ${v} 000" ; return
47
+ fi
48
+ v=" ${v/ T/ } "
49
+ v=" ${v/ Z/ UTC} "
50
+ echo " $( date -d " $v " +%s) 000"
51
+ }
52
+
38
53
if [ -z " ${DTFROM} " ]
39
54
then
40
- export DTFROM=" $( date -d ' 3 days ago' +%s ) 000 "
55
+ export DTFROM=" $( to_epoch_ms ' 3 days ago' ) "
41
56
else
42
- if [[ ! " $DTFROM " =~ ^[0-9]+$ ]]
43
- then
44
- export DTFROM=" $( date -d " ${DTFROM} " +%s) 000"
45
- fi
57
+ export DTFROM=" $( to_epoch_ms " ${DTFROM} " ) "
46
58
fi
47
59
60
+ # DTTO
48
61
if [ -z " ${DTTO} " ]
49
62
then
50
- export DTTO=" $( date +%s ) 000 "
63
+ export DTTO=" $( to_epoch_ms ' now ' ) "
51
64
else
52
- if [[ ! " $DTTO " =~ ^[0-9]+$ ]]
53
- then
54
- export DTTO=" $( date -d " ${DTTO} " +%s) 000"
55
- fi
65
+ export DTTO=" $( to_epoch_ms " ${DTTO} " ) "
56
66
fi
57
67
58
68
if [ ! -z " ${DEBUG} " ]
You can’t perform that action at this time.
0 commit comments