You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 405925f
Browse filesBrowse the repository at this point in the historyBrowse files
Write-Error "WINGET_TOKEN is not set. It needs a PAT with public_repo scope so wingetcreate can fork microsoft/winget-pkgs and open the manifest PR."
197
+
Write-Error "WINGET_PR_TOKEN is not set. It needs a PAT with public_repo scope so wingetcreate can fork microsoft/winget-pkgs and open the manifest PR."
Write-Error "WINGET_TOKEN is not set. It needs a PAT with public_repo scope so wingetcreate can fork microsoft/winget-pkgs and open the manifest PR."
231
+
Write-Error "WINGET_PR_TOKEN is not set. It needs a PAT with public_repo scope so wingetcreate can fork microsoft/winget-pkgs and open the manifest PR."
171
232
}
172
233
173
234
$tag = "${{ steps.release.outputs.tag }}"
@@ -198,58 +259,47 @@ jobs:
198
259
Write-Warning "Could not find the PR URL in wingetcreate output; skipping issue linking."
199
260
}
200
261
201
-
# wingetcreate has no --prbody flag, so it always opens the PR with the
202
-
# winget-pkgs template: an empty Description and an unticked
203
-
# "Linked to an issue" box next to a "Resolves #[Issue Number]"
204
-
# placeholder. We used to tick that box and fill in the issue number by
205
-
#hand after every release. This step does it instead.
262
+
# wingetcreate has no --prbody flag (only --prtitle), so it always opens
263
+
#the PR with the winget-pkgs template: an empty Description and an
264
+
#unticked "Linked to an issue" box next to a "Resolves #[Issue Number]"
265
+
# placeholder. The issue already exists (filed first, above), so this
266
+
#step just rewrites the body to point the PR at it with "Resolves #N".
206
267
#
207
-
# On a first submission it also files the Package Request issue the
208
-
# linkable number comes from. Updates to an existing package don't need
209
-
# one (the checkbox is "if applicable"), so there we just fill the
210
-
# Description.
211
-
- name: Link the winget PR to a Package Request issue
268
+
# This must run as the PR author (WINGET_PR_TOKEN) — the account that
269
+
# opened the PR via wingetcreate — since only the author (or a repo
270
+
# maintainer) can edit it.
271
+
- name: Set the winget PR body and link the issue
212
272
id: link
213
273
if: >-
214
274
(steps.submit_new.outputs.pr_number != '') ||
215
275
(steps.submit_update.outputs.pr_number != '')
216
276
shell: bash
217
277
env:
218
-
# The PR and the issue both live in microsoft/winget-pkgs, which the
219
-
# default GITHUB_TOKEN can't write to. Reuse the wingetcreate PAT,
--body "Request to add ${PACKAGE_IDENTIFIER} version ${VERSION} to the Windows Package Manager Community Repository. Installers come from ${TAG} of ${REPO}.")
236
-
echo "Opened issue ${ISSUE_URL}"
237
-
ISSUE_NUMBER="${ISSUE_URL##*/}"
238
-
fi
239
-
240
-
# Rewrite the template body: fill the Description, tick the issue
241
-
# box when we have an issue, and drop in the real number (or remove
242
-
# the placeholder line on updates that aren't linked to anything).
243
287
if [ -n "$ISSUE_NUMBER" ]; then
244
288
CHECKBOX="- [x] Linked to an issue (if applicable)"
245
289
RESOLVES="- Resolves #${ISSUE_NUMBER}"
246
-
DESC="Adds ${PACKAGE_IDENTIFIER} version ${VERSION} from ${TAG}."
247
290
else
248
291
CHECKBOX="- [ ] Linked to an issue (if applicable)"
249
292
RESOLVES=""
293
+
fi
294
+
295
+
if [ "${{ steps.exists.outputs.found }}" = "false" ]; then
296
+
DESC="Adds ${PACKAGE_IDENTIFIER} version ${VERSION} from ${TAG}."
297
+
else
250
298
DESC="Updates ${PACKAGE_IDENTIFIER} to version ${VERSION} from ${TAG}."
251
299
fi
252
300
301
+
# Mirrors the current .github/PULL_REQUEST_TEMPLATE.md; keep the
302
+
# checklist items in sync with it (e.g. the 1.12 schema line).
253
303
BODY=$(cat <<EOF
254
304
## 📖 Description
255
305
${DESC}
@@ -260,8 +310,9 @@ jobs:
260
310
## 📦 Manifest Checklist
261
311
- [x] Checked that there aren't other open [pull requests](https://github.com/microsoft/winget-pkgs/pulls) for the same manifest update/change
262
312
- [x] This PR only modifies one (1) manifest
263
-
- [x] Validated manifest locally with \`winget validate\`
264
-
- [x] Tested manifest locally with \`winget install\`
313
+
- [x] Validated manifest locally with \`winget validate --manifest <directory>\`
314
+
- [x] Tested manifest locally with \`winget install --manifest <directory>\`
315
+
- [x] Manifest conforms to the [1.12 schema](https://github.com/microsoft/winget-pkgs/tree/master/doc/manifest/schema/1.12.0)
0 commit comments