Commit 29918e6 1 parent 1b28056 commit 29918e6 Copy full SHA for 29918e6
File tree 2 files changed +43
-1
lines changed
2 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ function mark_commit_status_all_prs () {
22
22
if [ $( echo $CMSSW_QUEUE | grep ' _X' | wc -l) -gt 0 ] ; then
23
23
CMSSW_FLAVOR=$( echo $CMSSW_QUEUE | cut -d_ -f4)
24
24
fi
25
- if [ " ${CMSSW_FLAVOR} " != " X" ] ; then CONTEXT=" ${CMSSW_FLAVOR} /${CONTEXT} " ; fi
25
+ if [ " ${CMSSW_FLAVOR} " != " X" ] ; then CMSSW_FLAVOR=" default" ; fi
26
+ CONTEXT=" ${CMSSW_FLAVOR} /${CONTEXT} "
26
27
if [ " $1 " != " " ] ; then CONTEXT=" ${CONTEXT} /$1 " ; fi
27
28
else
28
29
CONTEXT=" ${COMMIT_STATUS_CONTEXT} "
Original file line number Diff line number Diff line change
1
+ import github_utils
2
+ import argparse
3
+
4
+
5
+ def main ():
6
+ parser = argparse .ArgumentParser ()
7
+ parser .add_argument ("--repository" , "-r" )
8
+ parser .add_argument ("--commit" , "-c" )
9
+ parser .add_argument ("--architecture" , "-a" )
10
+ parser .add_argument ("--queue" , "-u" , required = False )
11
+ parser .add_argument ("--prefix" , "-p" )
12
+ args = parser .parse_args ()
13
+
14
+ status_suffix = args .architecture
15
+ if args .queue :
16
+ flavor = args .queue .split ("_" )[3 ]
17
+ if flavor != "X" :
18
+ status_suffix = flavor + "/" + status_suffix
19
+
20
+ all_statuses = github_utils .get_combined_statuses (args .commit , args .repository ).get (
21
+ "statuses" , []
22
+ )
23
+ index = 0
24
+
25
+ for status in all_statuses :
26
+ if (
27
+ status ["context" ].startswith (args .prefix + "/" + status_suffix )
28
+ and status ["state" ] == "pending"
29
+ ):
30
+ with open ("update-pr-status-{0}.prop" .format (index ), "w" ) as f :
31
+ f .write ("REPOSITORY=${0}\n " .format (args .repository ))
32
+ f .write ("PULL_REQUEST=${0}\n " .format (args .commit ))
33
+ f .write ("CONTEXT={0}\n " .format (status ["context" ]))
34
+ f .write ("STATUS=error\n " )
35
+ f .write ("STATUS_MESSAGE=Stuck due to all nodes being offline\n " )
36
+
37
+ index = index + 1
38
+
39
+
40
+ if __name__ == "__main__" :
41
+ main ()
You can’t perform that action at this time.
0 commit comments