@@ -109,24 +109,24 @@ jobs:
109
109
echo "No change in package.json, not regenerating third-party notices"
110
110
fi
111
111
112
- - name : Temporarily disable "required_pull_request_reviews" branch protection
113
- id : disable-branch-protection
114
- if : always()
115
- uses : actions/github-script@v1
116
- with :
117
- github-token : ${{ secrets.OPENSOURCE_BOT_TOKEN }}
118
- previews : luke-cage-preview
119
- script : |
120
- const result = await github.repos.updateBranchProtection({
121
- owner: context.repo.owner,
122
- repo: context.repo.repo,
123
- branch: 'main',
124
- required_status_checks: null,
125
- restrictions: null,
126
- enforce_admins: null,
127
- required_pull_request_reviews: null
128
- })
129
- console.log("Result:", result)
112
+ # - name: Temporarily disable "required_pull_request_reviews" branch protection
113
+ # id: disable-branch-protection
114
+ # if: always()
115
+ # uses: actions/github-script@v1
116
+ # with:
117
+ # github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
118
+ # previews: luke-cage-preview
119
+ # script: |
120
+ # const result = await github.repos.updateBranchProtection({
121
+ # owner: context.repo.owner,
122
+ # repo: context.repo.repo,
123
+ # branch: 'main',
124
+ # required_status_checks: null,
125
+ # restrictions: null,
126
+ # enforce_admins: null,
127
+ # required_pull_request_reviews: null
128
+ # })
129
+ # console.log("Result:", result)
130
130
131
131
- name : Push Commit
132
132
if : steps.generate-notices.outputs.commit == 'true'
@@ -135,26 +135,26 @@ jobs:
135
135
github_token : ${{ secrets.OPENSOURCE_BOT_TOKEN }}
136
136
branch : main
137
137
138
- - name : Re-enable "required_pull_request_reviews" branch protection
139
- id : enable-branch-protection
140
- if : always()
141
- uses : actions/github-script@v1
142
- with :
143
- github-token : ${{ secrets.OPENSOURCE_BOT_TOKEN }}
144
- previews : luke-cage-preview
145
- script : |
146
- const result = await github.repos.updateBranchProtection({
147
- owner: context.repo.owner,
148
- repo: context.repo.repo,
149
- branch: 'main',
150
- required_status_checks: null,
151
- restrictions: null,
152
- enforce_admins: null,
153
- required_pull_request_reviews: {
154
- required_approving_review_count: 1
155
- }
156
- })
157
- console.log("Result:", result)
138
+ # - name: Re-enable "required_pull_request_reviews" branch protection
139
+ # id: enable-branch-protection
140
+ # if: always()
141
+ # uses: actions/github-script@v1
142
+ # with:
143
+ # github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
144
+ # previews: luke-cage-preview
145
+ # script: |
146
+ # const result = await github.repos.updateBranchProtection({
147
+ # owner: context.repo.owner,
148
+ # repo: context.repo.repo,
149
+ # branch: 'main',
150
+ # required_status_checks: null,
151
+ # restrictions: null,
152
+ # enforce_admins: null,
153
+ # required_pull_request_reviews: {
154
+ # required_approving_review_count: 1
155
+ # }
156
+ # })
157
+ # console.log("Result:", result)
158
158
159
159
job-generate-release :
160
160
runs-on : ubuntu-latest
@@ -166,6 +166,7 @@ jobs:
166
166
uses : actions/checkout@v2
167
167
with :
168
168
ref : main
169
+ persist-credentials : false
169
170
170
171
- name : Setup Node.js
171
172
uses : actions/setup-node@v1
@@ -175,24 +176,24 @@ jobs:
175
176
- name : Install dependencies
176
177
run : npm ci
177
178
178
- - name : Temporarily disable "required_pull_request_reviews" branch protection
179
- id : disable-branch-protection
180
- if : always()
181
- uses : actions/github-script@v1
182
- with :
183
- github-token : ${{ secrets.OPENSOURCE_BOT_TOKEN }}
184
- previews : luke-cage-preview
185
- script : |
186
- const result = await github.repos.updateBranchProtection({
187
- owner: context.repo.owner,
188
- repo: context.repo.repo,
189
- branch: 'main',
190
- required_status_checks: null,
191
- restrictions: null,
192
- enforce_admins: null,
193
- required_pull_request_reviews: null
194
- })
195
- console.log("Result:", result)
179
+ # - name: Temporarily disable "required_pull_request_reviews" branch protection
180
+ # id: disable-branch-protection
181
+ # if: always()
182
+ # uses: actions/github-script@v1
183
+ # with:
184
+ # github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
185
+ # previews: luke-cage-preview
186
+ # script: |
187
+ # const result = await github.repos.updateBranchProtection({
188
+ # owner: context.repo.owner,
189
+ # repo: context.repo.repo,
190
+ # branch: 'main',
191
+ # required_status_checks: null,
192
+ # restrictions: null,
193
+ # enforce_admins: null,
194
+ # required_pull_request_reviews: null
195
+ # })
196
+ # console.log("Result:", result)
196
197
197
198
- name : Run semantic-release
198
199
env :
@@ -205,23 +206,23 @@ jobs:
205
206
GITHUB_TOKEN : ${{ secrets.OPENSOURCE_BOT_TOKEN }}
206
207
run : npx semantic-release@^18.0.0
207
208
208
- - name : Re-enable "required_pull_request_reviews" branch protection
209
- id : enable-branch-protection
210
- if : always()
211
- uses : actions/github-script@v1
212
- with :
213
- github-token : ${{ secrets.OPENSOURCE_BOT_TOKEN }}
214
- previews : luke-cage-preview
215
- script : |
216
- const result = await github.repos.updateBranchProtection({
217
- owner: context.repo.owner,
218
- repo: context.repo.repo,
219
- branch: 'main',
220
- required_status_checks: null,
221
- restrictions: null,
222
- enforce_admins: null,
223
- required_pull_request_reviews: {
224
- required_approving_review_count: 1
225
- }
226
- })
227
- console.log("Result:", result)
209
+ # - name: Re-enable "required_pull_request_reviews" branch protection
210
+ # id: enable-branch-protection
211
+ # if: always()
212
+ # uses: actions/github-script@v1
213
+ # with:
214
+ # github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
215
+ # previews: luke-cage-preview
216
+ # script: |
217
+ # const result = await github.repos.updateBranchProtection({
218
+ # owner: context.repo.owner,
219
+ # repo: context.repo.repo,
220
+ # branch: 'main',
221
+ # required_status_checks: null,
222
+ # restrictions: null,
223
+ # enforce_admins: null,
224
+ # required_pull_request_reviews: {
225
+ # required_approving_review_count: 1
226
+ # }
227
+ # })
228
+ # console.log("Result:", result)
0 commit comments