@@ -57,108 +57,45 @@ jobs:
57
57
58
58
- name : " Check Whether Code PR Can Be Merged"
59
59
run : |
60
- PR=$(gh pr view "${{ steps.determine-branch-names.outputs.CODE_BRANCH_NAME }}" --repo "${{ github.repository }}" --json number,reviewDecision,mergeable,statusCheckRollup )
60
+ PR=$(gh pr view "${{ steps.determine-branch-names.outputs.CODE_BRANCH_NAME }}" --repo "${{ github.repository }}" --json number,reviewDecision)
61
61
NUMBER=$(echo "$PR" | jq -r '.number')
62
62
DECISION=$(echo "$PR" | jq -r '.reviewDecision')
63
- MERGEABLE=$(echo "$PR" | jq -r '.mergeable')
64
-
65
- if [[ "$MERGEABLE" != "MERGEABLE" ]]; then
66
- echo "Code PR (#$NUMBER) is not mergeable."
67
- exit 1
68
- fi
69
63
70
64
if [[ "$DECISION" != "APPROVED" ]]; then
71
65
echo "Code PR (#$NUMBER) is not approved."
72
66
exit 1
73
67
fi
74
68
75
- STATUS_CHECKS=$(echo "$PR" | jq -r '.statusCheckRollup')
76
- FAILED_CHECK_RUNS=$(echo $STATUS_CHECKS | jq -r '.[] | select(.__typename == "CheckRun" and .workflowName != "Perform Release" and .conclusion != "SUCCESS" and .conclusion != "NEUTRAL")')
77
- if [[ -n "$FAILED_CHECK_RUNS" ]]; then
78
- echo "Code PR (#$NUMBER) has failed check runs:"
79
- echo "$FAILED_CHECK_RUNS"
80
- exit 1
81
- fi
82
-
83
- FAILED_STATUS_CONTEXTS=$(echo $STATUS_CHECKS | jq -r '.[] | select(.__typename == "StatusContext" and .state != "SUCCESS")')
84
- if [[ -n "$FAILED_STATUS_CONTEXTS" ]]; then
85
- echo "Code PR (#$NUMBER) has failed status contexts:"
86
- echo "$FAILED_STATUS_CONTEXTS"
87
- exit 1
88
- fi
89
-
90
69
echo "[DEBUG] Code PR (#$NUMBER) can be merged."
91
70
env :
92
71
GH_TOKEN : ${{ github.token }}
93
72
94
73
- name : " Check Whether Docs PR Can Be Merged"
95
74
run : |
96
- PR=$(gh pr view "${{ steps.determine-branch-names.outputs.DOCS_BRANCH_NAME }}" --repo ${{ env.DOCS_REPO }} --json number,reviewDecision,mergeable,statusCheckRollup )
75
+ PR=$(gh pr view "${{ steps.determine-branch-names.outputs.DOCS_BRANCH_NAME }}" --repo ${{ env.DOCS_REPO }} --json number,reviewDecision)
97
76
NUMBER=$(echo "$PR" | jq -r '.number')
98
77
DECISION=$(echo "$PR" | jq -r '.reviewDecision')
99
- MERGEABLE=$(echo "$PR" | jq -r '.mergeable')
100
-
101
- if [[ "$MERGEABLE" != "MERGEABLE" ]]; then
102
- echo "Docs PR (#$NUMBER) is not mergeable."
103
- exit 1
104
- fi
105
78
106
79
if [[ "$DECISION" != "APPROVED" ]]; then
107
80
echo "Docs PR (#$NUMBER) is not approved."
108
81
exit 1
109
82
fi
110
83
111
- STATUS_CHECKS=$(echo "$PR" | jq -r '.statusCheckRollup')
112
- FAILED_CHECK_RUNS=$(echo $STATUS_CHECKS | jq -r '.[] | select(.__typename == "CheckRun" and .conclusion != "SUCCESS" and .conclusion != "NEUTRAL")')
113
- if [[ -n "$FAILED_CHECK_RUNS" ]]; then
114
- echo "Docs PR (#$NUMBER) has failed check runs:"
115
- echo "$FAILED_CHECK_RUNS"
116
- exit 1
117
- fi
118
-
119
- FAILED_STATUS_CONTEXTS=$(echo $STATUS_CHECKS | jq -r '.[] | select(.__typename == "StatusContext" and .state != "SUCCESS")')
120
- if [[ -n "$FAILED_STATUS_CONTEXTS" ]]; then
121
- echo "Docs PR (#$NUMBER) has failed status contexts:"
122
- echo "$FAILED_STATUS_CONTEXTS"
123
- exit 1
124
- fi
125
-
126
84
echo "[DEBUG] Docs PR (#$NUMBER) can be merged."
127
85
env :
128
86
GH_TOKEN : ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }}
129
87
130
88
- name : " Check Whether Release Notes PR Can Be Merged"
131
89
run : |
132
- PR=$(gh pr view "${{ steps.determine-branch-names.outputs.RELEASE_NOTES_BRANCH_NAME }}" --repo ${{ env.DOCS_REPO }} --json number,reviewDecision,mergeable,statusCheckRollup )
90
+ PR=$(gh pr view "${{ steps.determine-branch-names.outputs.RELEASE_NOTES_BRANCH_NAME }}" --repo ${{ env.DOCS_REPO }} --json number,reviewDecision)
133
91
NUMBER=$(echo "$PR" | jq -r '.number')
134
92
DECISION=$(echo "$PR" | jq -r '.reviewDecision')
135
- MERGEABLE=$(echo "$PR" | jq -r '.mergeable')
136
-
137
- if [[ "$MERGEABLE" != "MERGEABLE" ]]; then
138
- echo "Release Notes PR (#$NUMBER) is not mergeable."
139
- exit 1
140
- fi
141
93
142
94
if [[ "$DECISION" != "APPROVED" ]]; then
143
95
echo "Release Notes PR (#$NUMBER) is not approved."
144
96
exit 1
145
97
fi
146
98
147
- STATUS_CHECKS=$(echo "$PR" | jq -r '.statusCheckRollup')
148
- FAILED_CHECK_RUNS=$(echo $STATUS_CHECKS | jq -r '.[] | select(.__typename == "CheckRun" and .conclusion != "SUCCESS" and .conclusion != "NEUTRAL")')
149
- if [[ -n "$FAILED_CHECK_RUNS" ]]; then
150
- echo "Release Notes PR (#$NUMBER) has failed check runs:"
151
- echo "$FAILED_CHECK_RUNS"
152
- exit 1
153
- fi
154
-
155
- FAILED_STATUS_CONTEXTS=$(echo $STATUS_CHECKS | jq -r '.[] | select(.__typename == "StatusContext" and .state != "SUCCESS")')
156
- if [[ -n "$FAILED_STATUS_CONTEXTS" ]]; then
157
- echo "Release Notes PR (#$NUMBER) has failed status contexts:"
158
- echo "$FAILED_STATUS_CONTEXTS"
159
- exit 1
160
- fi
161
-
162
99
echo "[DEBUG] Release Notes PR (#$NUMBER) can be merged."
163
100
env :
164
101
GH_TOKEN : ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }}
0 commit comments