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):
40004000 )
40014001
40024002 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 = {}
40034007 ret = dict (self .model )
40044008
40054009 if "organization_installation_id" not in ret :
Original file line number Diff line number Diff line change 3535 exit 2
3636fi
3737
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+
3853if [ -z " ${DTFROM} " ]
3954then
40- export DTFROM=" $( date -d ' 3 days ago' +%s ) 000 "
55+ export DTFROM=" $( to_epoch_ms ' 3 days ago' ) "
4156else
42- if [[ ! " $DTFROM " =~ ^[0-9]+$ ]]
43- then
44- export DTFROM=" $( date -d " ${DTFROM} " +%s) 000"
45- fi
57+ export DTFROM=" $( to_epoch_ms " ${DTFROM} " ) "
4658fi
4759
60+ # DTTO
4861if [ -z " ${DTTO} " ]
4962then
50- export DTTO=" $( date +%s ) 000 "
63+ export DTTO=" $( to_epoch_ms ' now ' ) "
5164else
52- if [[ ! " $DTTO " =~ ^[0-9]+$ ]]
53- then
54- export DTTO=" $( date -d " ${DTTO} " +%s) 000"
55- fi
65+ export DTTO=" $( to_epoch_ms " ${DTTO} " ) "
5666fi
5767
5868if [ ! -z " ${DEBUG} " ]
You can’t perform that action at this time.
0 commit comments