(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:curlhdr) op: Equal rhs: {(DQ ('Accept: application/vnd.travis-ci.2+json'))} ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:endpoint) op: Equal rhs: {(DQ ('https://api.travis-ci.org/repos/') ($ VSub_DollarName '$TRAVIS_REPO_SLUG'))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$TRAVIS_PULL_REQUEST'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (false))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:newestbuildforthisPR) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(curl)} {(-H)} {(DQ ($ VSub_DollarName '$curlhdr'))} {($ VSub_DollarName '$endpoint') (/builds) (Lit_Other '?') (Lit_VarLike 'event_type=') (pull_request) } ) (C {(jq)} { (DQ ('.builds | map(select(.pull_request_number == ') ($ VSub_DollarName '$TRAVIS_PULL_REQUEST') ('))[0].number') ) } ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$newestbuildforthisPR')} {(KW_Bang '!') (Lit_Other '=')} {(null)} {(-a)} {($ VSub_DollarName '$newestbuildforthisPR')} {(KW_Bang '!') (Lit_Other '=')} {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_DollarName '$TRAVIS_BUILD_NUMBER') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('There are newer queued builds for this pull request, failing early.'))} ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] ) ] ) ] ) ] else_action: [ (command.Case to_match: {($ VSub_DollarName '$TRAVIS_BRANCH')} arms: [ (case_arm pat_list:[{(master)} {(release) (Lit_Other '*')}]) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_DollarName '$TRAVIS_BUILD_NUMBER') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) } {(KW_Bang '!') (Lit_Other '=')} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(curl)} {(-H)} {(DQ ($ VSub_DollarName '$curlhdr'))} {($ VSub_DollarName '$endpoint') (/branches/) ($ VSub_DollarName '$TRAVIS_BRANCH') } ) (C {(jq)} {(DQ (.branch.number))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('There are newer queued builds for this branch, failing early.'))} ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] ) ] ) ] ) ] ) ] ) ] )