Compare commits
485
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f70cba7acb | ||
|
|
6825fa6c19 | ||
|
|
8590fe46e2 | ||
|
|
7905e8279f | ||
|
|
1e68388564 | ||
|
|
1301314362 | ||
|
|
be6c7af3e7 | ||
|
|
7e5b90c68f | ||
|
|
dbfe128a12 | ||
|
|
519c42cf90 | ||
|
|
12e3af696a | ||
|
|
35eeed0052 | ||
|
|
6af9b6ba90 | ||
|
|
4e52c3b4de | ||
|
|
fb903f6a1b | ||
|
|
bd97021284 | ||
|
|
ad8c3d8947 | ||
|
|
3d0ef7e6bf | ||
|
|
3fc041daf6 | ||
|
|
fb8688a7d7 | ||
|
|
cd8dbf8e44 | ||
|
|
845205407d | ||
|
|
ca78565dd0 | ||
|
|
266f2d7f88 | ||
|
|
8ca1c45fc8 | ||
|
|
07de41e937 | ||
|
|
50da8efb51 | ||
|
|
b815f8c8d7 | ||
|
|
87fbb56d6d | ||
|
|
a96375bf50 | ||
|
|
ef8a971814 | ||
|
|
d059b38253 | ||
|
|
a5018fbdb5 | ||
|
|
3c5e0f208e | ||
|
|
51e5328d24 | ||
|
|
58819c9d22 | ||
|
|
4645163b02 | ||
|
|
7e013ab0da | ||
|
|
ec85902bd4 | ||
|
|
f461208ffc | ||
|
|
56576c8bec | ||
|
|
42a9eba703 | ||
|
|
48c961aedc | ||
|
|
ff55c59e19 | ||
|
|
73c95bef48 | ||
|
|
fd57bfd074 | ||
|
|
4fc36fa25d | ||
|
|
35e5376235 | ||
|
|
4639ac6049 | ||
|
|
9eb37abe16 | ||
|
|
92a34d51b1 | ||
|
|
964bc5b6bd | ||
|
|
ab79eedf6f | ||
|
|
c21a214fc4 | ||
|
|
97ef1aa99d | ||
|
|
799d09f41f | ||
|
|
04bc6c8294 | ||
|
|
735d74175c | ||
|
|
ce67c4c146 | ||
|
|
7522617143 | ||
|
|
1b2285c7ed | ||
|
|
d03af2d389 | ||
|
|
a204903ff2 | ||
|
|
1709999bb7 | ||
|
|
44d32aa807 | ||
|
|
bcdd61859b | ||
|
|
4e6f2f8172 | ||
|
|
a71cbadb21 | ||
|
|
17f149d57d | ||
|
|
2ca08b061f | ||
|
|
6b8b999059 | ||
|
|
1b7efea691 | ||
|
|
3f9ca1577a | ||
|
|
c617c38829 | ||
|
|
b73353fc9e | ||
|
|
799f0b39c5 | ||
|
|
93d5c1fbcf | ||
|
|
7020960ec3 | ||
|
|
d515544750 | ||
|
|
569bf64378 | ||
|
|
5bd0f9be77 | ||
|
|
8b8e9451d7 | ||
|
|
3b92649ea7 | ||
|
|
acc2a84940 | ||
|
|
05fec365d2 | ||
|
|
31ada4a296 | ||
|
|
625ee33af0 | ||
|
|
2100587df1 | ||
|
|
e2f90ba353 | ||
|
|
00f0915b78 | ||
|
|
225143f1f1 | ||
|
|
bd805090d5 | ||
|
|
56968c5617 | ||
|
|
0681d82936 | ||
|
|
700432c7eb | ||
|
|
a807d5717b | ||
|
|
1c5e46bdc5 | ||
|
|
e43157f952 | ||
|
|
3ffd98fdbe | ||
|
|
3196778f63 | ||
|
|
301f9a6a9d | ||
|
|
4412f2083e | ||
|
|
fcda971f1b | ||
|
|
669e830649 | ||
|
|
53f3a144af | ||
|
|
6cc1bd787e | ||
|
|
72f68c01f2 | ||
|
|
3a837ecdea | ||
|
|
9afc2954f1 | ||
|
|
f7e2cafaad | ||
|
|
5697dcce61 | ||
|
|
5ebe93c628 | ||
|
|
db16246990 | ||
|
|
8cc85356ae | ||
|
|
db1cfda601 | ||
|
|
60c443418e | ||
|
|
1813c82eb4 | ||
|
|
a2b7383c97 | ||
|
|
388a81c19b | ||
|
|
9a9ac3aa51 | ||
|
|
879202e785 | ||
|
|
c6e635542c | ||
|
|
74aa385373 | ||
|
|
127166df23 | ||
|
|
7fbe9b160a | ||
|
|
907b225b47 | ||
|
|
a6e06dc921 | ||
|
|
72e28d9b67 | ||
|
|
44406cea7c | ||
|
|
20d1f424a6 | ||
|
|
69393c4567 | ||
|
|
1518d0ee6f | ||
|
|
db82927d27 | ||
|
|
59677cfad7 | ||
|
|
53412d70f7 | ||
|
|
0f8dd275a1 | ||
|
|
60e998b590 | ||
|
|
e1d824f6c1 | ||
|
|
ebce162542 | ||
|
|
94758afea0 | ||
|
|
e5e176b68b | ||
|
|
64c00a92f5 | ||
|
|
0a64b77ba0 | ||
|
|
c3f8d0c2cd | ||
|
|
e3bb8a778d | ||
|
|
99864b0fd7 | ||
|
|
77f30faf00 | ||
|
|
3614cab5ac | ||
|
|
d7f5c28c85 | ||
|
|
cdf1e6b4f2 | ||
|
|
1aa24fe51f | ||
|
|
1b82daf079 | ||
|
|
33a205bf19 | ||
|
|
ce0435b55a | ||
|
|
5d32121787 | ||
|
|
9e96d6383c | ||
|
|
31969c8df2 | ||
|
|
e4091ab3b5 | ||
|
|
c4d9f11386 | ||
|
|
6f9ddbf52a | ||
|
|
fed7a82d36 | ||
|
|
941aa608f4 | ||
|
|
205ae065f5 | ||
|
|
8e5bbf1320 | ||
|
|
200f0934bf | ||
|
|
4c6f319304 | ||
|
|
6e3e0748e0 | ||
|
|
d70d063698 | ||
|
|
fa0e1c0376 | ||
|
|
d2626e0ad8 | ||
|
|
42c6d99012 | ||
|
|
2bff033a27 | ||
|
|
0aaae1fabf | ||
|
|
a172a425ad | ||
|
|
5c684a87d0 | ||
|
|
b96d82a1a7 | ||
|
|
73f4442d27 | ||
|
|
b11f390d4a | ||
|
|
84b92dcae5 | ||
|
|
afb208dabb | ||
|
|
fbf81359df | ||
|
|
d7ee24158f | ||
|
|
ab7bebfd7c | ||
|
|
cd5aaaa489 | ||
|
|
d04d53e9a6 | ||
|
|
fa80d4477e | ||
|
|
ee71e1f82c | ||
|
|
05d43dc2f7 | ||
|
|
44b736e84a | ||
|
|
052bcffe37 | ||
|
|
74d691f431 | ||
|
|
9efde543c5 | ||
|
|
a6089eaa6c | ||
|
|
21a44d9be6 | ||
|
|
bfa3c7544e | ||
|
|
64e9106cb3 | ||
|
|
05fbc0eae7 | ||
|
|
9646722501 | ||
|
|
911c39d054 | ||
|
|
c9cae0b8c0 | ||
|
|
1b21b69422 | ||
|
|
390046ccf4 | ||
|
|
fcd0b0c25f | ||
|
|
dc8140199b | ||
|
|
1462b0dacb | ||
|
|
e45dbcec9b | ||
|
|
f51404d9db | ||
|
|
d56740e498 | ||
|
|
4138750b3b | ||
|
|
8cb1deff76 | ||
|
|
5416e79622 | ||
|
|
e58e96369f | ||
|
|
1f7f2f77ad | ||
|
|
a248d107da | ||
|
|
ddb7a5502d | ||
|
|
a61c55ca8c | ||
|
|
ad12ca63b0 | ||
|
|
456af8c7af | ||
|
|
4ed9e22ef2 | ||
|
|
401f91f3ab | ||
|
|
9df3a17b11 | ||
|
|
038a5ee5e7 | ||
|
|
a4998ed84a | ||
|
|
05c9176fb8 | ||
|
|
f09715ff6b | ||
|
|
c1de7373e6 | ||
|
|
292d84f55a | ||
|
|
c2badddf6f | ||
|
|
3324ea8c86 | ||
|
|
34f0dd673c | ||
|
|
23c9fb5a9f | ||
|
|
4b2dac32aa | ||
|
|
0364ab04ce | ||
|
|
911c04b96c | ||
|
|
4c0a9ea3be | ||
|
|
a5a748166b | ||
|
|
1ec1c9bb94 | ||
|
|
b70f1562c1 | ||
|
|
c65b11bfb5 | ||
|
|
24314254db | ||
|
|
5c588fba0c | ||
|
|
1e89750b0b | ||
|
|
4079b1e516 | ||
|
|
cc653f8685 | ||
|
|
b92dbb40c1 | ||
|
|
1f83dd7715 | ||
|
|
8d7668ea88 | ||
|
|
478765f1fc | ||
|
|
1f263c50b7 | ||
|
|
0efda4b1c2 | ||
|
|
ca12b97c37 | ||
|
|
e4ae0b7fdf | ||
|
|
458ef304e8 | ||
|
|
970f95bfea | ||
|
|
cd4ef2329f | ||
|
|
ccc07f5adb | ||
|
|
50e0f8685a | ||
|
|
fc5a084781 | ||
|
|
44671aa6b7 | ||
|
|
731cccd8e3 | ||
|
|
8718b9686b | ||
|
|
8111083f6a | ||
|
|
7006e18ea4 | ||
|
|
f077665994 | ||
|
|
93a20bc2de | ||
|
|
86b698b503 | ||
|
|
b7f76c507c | ||
|
|
fcdccd4dff | ||
|
|
f222a97849 | ||
|
|
1f426edd13 | ||
|
|
994e7b9201 | ||
|
|
3dc7067c30 | ||
|
|
49d987d747 | ||
|
|
c81120e7c4 | ||
|
|
e5ce40bfe1 | ||
|
|
d3cd4fcfd7 | ||
|
|
d8a6a98f4b | ||
|
|
326f7d93b9 | ||
|
|
fbfddd2158 | ||
|
|
d7bfae6ed1 | ||
|
|
66b934c6df | ||
|
|
7dcd5a48c0 | ||
|
|
a0f863c560 | ||
|
|
818f7c6899 | ||
|
|
cb50bb1b34 | ||
|
|
632454923c | ||
|
|
06ed83878c | ||
|
|
4a7fe28adc | ||
|
|
0ffdc003fa | ||
|
|
d2bd3e035c | ||
|
|
d4c46c725d | ||
|
|
631c522737 | ||
|
|
571f2d57ef | ||
|
|
5cec9b93b8 | ||
|
|
da2fcbc88c | ||
|
|
3cf9a99864 | ||
|
|
99af8d886e | ||
|
|
b768a5440a | ||
|
|
570862bf64 | ||
|
|
4e09135edc | ||
|
|
15c6bdd613 | ||
|
|
7078f4b0bd | ||
|
|
626bb6e388 | ||
|
|
01829f8b81 | ||
|
|
9f2e50b2ef | ||
|
|
6fc05290e6 | ||
|
|
c976dba2dd | ||
|
|
d5077a2575 | ||
|
|
3d01238ef9 | ||
|
|
0f7faae67f | ||
|
|
36dd0b874b | ||
|
|
14bd2e7f8e | ||
|
|
9d321ce412 | ||
|
|
7a1785d783 | ||
|
|
b5057a1d02 | ||
|
|
2d22b1493c | ||
|
|
3933174c29 | ||
|
|
0061da69af | ||
|
|
fced3fbd17 | ||
|
|
15c96e28da | ||
|
|
2327499cdb | ||
|
|
9061b79f2b | ||
|
|
cf35bbcd0e | ||
|
|
a096f06683 | ||
|
|
1cfd34ca23 | ||
|
|
923ecfa1cd | ||
|
|
db61a690be | ||
|
|
9a5f24fafb | ||
|
|
cf2ea08800 | ||
|
|
3182eed2ac | ||
|
|
054e826e2c | ||
|
|
b3af47fd03 | ||
|
|
fbea8eb211 | ||
|
|
79c4412287 | ||
|
|
7c24091cc8 | ||
|
|
efa93d8b59 | ||
|
|
a1baeac6f7 | ||
|
|
3b68eab6ca | ||
|
|
997a042ebf | ||
|
|
aacc06ed27 | ||
|
|
1ae5303cf0 | ||
|
|
7baeb52329 | ||
|
|
0e5ee3a4d4 | ||
|
|
21ef2e36d6 | ||
|
|
b955eeb013 | ||
|
|
3e6b99925b | ||
|
|
f06f689488 | ||
|
|
fec0d8854e | ||
|
|
4650cfeeb9 | ||
|
|
35cda7ebb0 | ||
|
|
92a0494796 | ||
|
|
d2bd18acf1 | ||
|
|
f3cbf1237d | ||
|
|
76509d6a0c | ||
|
|
32ead756bb | ||
|
|
976a1ba8e8 | ||
|
|
1c4292d8f5 | ||
|
|
1ab766bc5c | ||
|
|
127588ba57 | ||
|
|
ccd80fedb1 | ||
|
|
1fc8731c2b | ||
|
|
b6deaf9fa0 | ||
|
|
a6eff82854 | ||
|
|
751fd74113 | ||
|
|
3dfa607685 | ||
|
|
b2c06a57c9 | ||
|
|
a97a334eb0 | ||
|
|
3d8180141f | ||
|
|
74ab0e7ba5 | ||
|
|
8dfeccd935 | ||
|
|
c144fe2408 | ||
|
|
3bbc6716ad | ||
|
|
75ed1b5ec3 | ||
|
|
699b3d52c5 | ||
|
|
ae8c4aca58 | ||
|
|
79d0c06951 | ||
|
|
a877c6f1ae | ||
|
|
6ccc588d69 | ||
|
|
81071ba4f5 | ||
|
|
e12c7c28d1 | ||
|
|
724b47922e | ||
|
|
b3911bf88a | ||
|
|
802f94560d | ||
|
|
5573667b95 | ||
|
|
dd5d161991 | ||
|
|
a005307a60 | ||
|
|
dcb4b8501d | ||
|
|
1e65cbf65d | ||
|
|
cdc9dd8584 | ||
|
|
93f4337576 | ||
|
|
69338b814b | ||
|
|
af6287f1ca | ||
|
|
1868f99cad | ||
|
|
ef3472d8f5 | ||
|
|
347a1fac67 | ||
|
|
239d6a036b | ||
|
|
d1da368537 | ||
|
|
38c16a5888 | ||
|
|
8b9960c603 | ||
|
|
0c937511c7 | ||
|
|
36ea516731 | ||
|
|
54314feab5 | ||
|
|
286a5c590a | ||
|
|
ce202f3549 | ||
|
|
c7882e941c | ||
|
|
c5da16771a | ||
|
|
98c6222154 | ||
|
|
33dce288dd | ||
|
|
406f1d62df | ||
|
|
674148fb07 | ||
|
|
aa5601041c | ||
|
|
62d167aeb3 | ||
|
|
b742a191ee | ||
|
|
9229952cd9 | ||
|
|
389cfdd583 | ||
|
|
3f1e851152 | ||
|
|
6b1fe63294 | ||
|
|
821fbb3566 | ||
|
|
3670564712 | ||
|
|
ced402ad5d | ||
|
|
5f8d072b86 | ||
|
|
f84f285db3 | ||
|
|
44194c000d | ||
|
|
c61bd07bb5 | ||
|
|
3df0a0f796 | ||
|
|
f16dfc92b2 | ||
|
|
96faf18d96 | ||
|
|
6393210a31 | ||
|
|
7151847d1f | ||
|
|
d5ffbd86f3 | ||
|
|
ab8b90b187 | ||
|
|
8d42c49b77 | ||
|
|
0e24296f67 | ||
|
|
7f87dc49f8 | ||
|
|
cc4177b096 | ||
|
|
a25b309ac7 | ||
|
|
e7cb0a7c6a | ||
|
|
b6f48cd1fe | ||
|
|
ea391a3a17 | ||
|
|
4ba260c486 | ||
|
|
7cb9f88f6c | ||
|
|
203823a6af | ||
|
|
10564f909a | ||
|
|
383579dba3 | ||
|
|
e896231d88 | ||
|
|
5325b379c5 | ||
|
|
1af06e1dd5 | ||
|
|
23fcef6dd8 | ||
|
|
c68caae1e7 | ||
|
|
3dc4b8f626 | ||
|
|
df5c16bddf | ||
|
|
b008f1a1cc | ||
|
|
3a3a31b9b8 | ||
|
|
5504bdf63d | ||
|
|
7d051394e6 | ||
|
|
468149a9ad | ||
|
|
6ec1d81ef0 | ||
|
|
6b5d3ee985 | ||
|
|
5b3c4c70b5 | ||
|
|
6d5e4c4114 | ||
|
|
c26054a1a6 | ||
|
|
a20a3f2781 | ||
|
|
e7f5d1731d | ||
|
|
16f6cf91c7 | ||
|
|
45addfddb3 | ||
|
|
6f80226e88 | ||
|
|
8fbc56a688 | ||
|
|
fecfc08451 | ||
|
|
62a03c2b21 | ||
|
|
7273d6112b | ||
|
|
74bddb82e5 | ||
|
|
4af6ca9db0 | ||
|
|
7e4ee25c48 | ||
|
|
6da9a49652 | ||
|
|
51d88dbb24 | ||
|
|
cd8ecf9060 | ||
|
|
ef04f022d2 | ||
|
|
1efac2736a | ||
|
|
9299e8df95 | ||
|
|
97363a3e57 | ||
|
|
28d5715dd5 | ||
|
|
8466888bc8 | ||
|
|
741e1ed78a | ||
|
|
e02b0a33a6 | ||
|
|
47785c4f98 |
@@ -0,0 +1,2 @@
|
||||
registry=https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/
|
||||
always-auth=true
|
||||
@@ -0,0 +1,86 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AddComment = void 0;
|
||||
const ActionBase_1 = require("../common/ActionBase");
|
||||
const utils_1 = require("../common/utils");
|
||||
class AddComment extends ActionBase_1.ActionBase {
|
||||
constructor(github, createdAfter, afterDays, labels, addComment, addLabels, removeLabels, setMilestoneId, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves) {
|
||||
super(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves);
|
||||
this.github = github;
|
||||
this.createdAfter = createdAfter;
|
||||
this.afterDays = afterDays;
|
||||
this.addComment = addComment;
|
||||
this.addLabels = addLabels;
|
||||
this.removeLabels = removeLabels;
|
||||
this.setMilestoneId = setMilestoneId;
|
||||
}
|
||||
async run() {
|
||||
const updatedTimestamp = this.afterDays ? (0, utils_1.daysAgoToHumanReadbleDate)(this.afterDays) : undefined;
|
||||
const query = this.buildQuery((updatedTimestamp ? `updated:<${updatedTimestamp} ` : "") +
|
||||
(this.createdAfter ? `created:>${this.createdAfter} ` : "") +
|
||||
"is:open is:unlocked");
|
||||
const addLabelsSet = this.addLabels ? this.addLabels.split(',') : [];
|
||||
const removeLabelsSet = this.removeLabels ? this.removeLabels.split(',') : [];
|
||||
for await (const page of this.github.query({ q: query })) {
|
||||
for (const issue of page) {
|
||||
const hydrated = await issue.getIssue();
|
||||
if (hydrated.open && this.validateIssue(hydrated)
|
||||
// TODO: Verify updated timestamp
|
||||
) {
|
||||
// Don't add a comment if already commented on by an action.
|
||||
let foundActionComment = false;
|
||||
for await (const commentBatch of issue.getComments()) {
|
||||
for (const comment of commentBatch) {
|
||||
if (comment.author.isGitHubApp) {
|
||||
foundActionComment = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundActionComment)
|
||||
break;
|
||||
}
|
||||
if (foundActionComment) {
|
||||
(0, utils_1.safeLog)(`Issue ${hydrated.number} already commented on by an action. Ignoring.`);
|
||||
continue;
|
||||
}
|
||||
if (this.addComment) {
|
||||
(0, utils_1.safeLog)(`Posting comment on issue ${hydrated.number}`);
|
||||
await issue.postComment(this.addComment);
|
||||
}
|
||||
if (removeLabelsSet.length > 0) {
|
||||
for (const removeLabel of removeLabelsSet) {
|
||||
if (removeLabel && removeLabel.length > 0) {
|
||||
(0, utils_1.safeLog)(`Removing label on issue ${hydrated.number}: ${removeLabel}`);
|
||||
await issue.removeLabel(removeLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (addLabelsSet.length > 0) {
|
||||
for (const addLabel of addLabelsSet) {
|
||||
if (addLabel && addLabel.length > 0) {
|
||||
(0, utils_1.safeLog)(`Adding label on issue ${hydrated.number}: ${addLabel}`);
|
||||
await issue.addLabel(addLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.setMilestoneId != undefined) {
|
||||
(0, utils_1.safeLog)(`Setting milestone of issue ${hydrated.number} to id ${+this.setMilestoneId}`);
|
||||
await issue.setMilestone(+this.setMilestoneId);
|
||||
}
|
||||
(0, utils_1.safeLog)(`Processing issue ${hydrated.number}.`);
|
||||
}
|
||||
else {
|
||||
if (!hydrated.open) {
|
||||
(0, utils_1.safeLog)(`Issue ${hydrated.number} is not open. Ignoring`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.AddComment = AddComment;
|
||||
//# sourceMappingURL=AddComment.js.map
|
||||
@@ -0,0 +1,98 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { GitHub } from '../api/api';
|
||||
import { ActionBase } from '../common/ActionBase';
|
||||
import { daysAgoToHumanReadbleDate, daysAgoToTimestamp, safeLog } from '../common/utils';
|
||||
|
||||
export class AddComment extends ActionBase {
|
||||
constructor(
|
||||
private github: GitHub,
|
||||
private createdAfter: string | undefined,
|
||||
private afterDays: number,
|
||||
labels: string,
|
||||
private addComment: string,
|
||||
private addLabels?: string,
|
||||
private removeLabels?: string,
|
||||
private setMilestoneId?: string,
|
||||
milestoneName?: string,
|
||||
milestoneId?: string,
|
||||
ignoreLabels?: string,
|
||||
ignoreMilestoneNames?: string,
|
||||
ignoreMilestoneIds?: string,
|
||||
minimumVotes?: number,
|
||||
maximumVotes?: number,
|
||||
involves?: string
|
||||
) {
|
||||
super(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves);
|
||||
}
|
||||
|
||||
async run() {
|
||||
const updatedTimestamp = this.afterDays ? daysAgoToHumanReadbleDate(this.afterDays) : undefined;
|
||||
const query = this.buildQuery(
|
||||
(updatedTimestamp ? `updated:<${updatedTimestamp} ` : "") +
|
||||
(this.createdAfter ? `created:>${this.createdAfter} ` : "") +
|
||||
"is:open is:unlocked");
|
||||
|
||||
const addLabelsSet = this.addLabels ? this.addLabels.split(',') : [];
|
||||
const removeLabelsSet = this.removeLabels ? this.removeLabels.split(',') : [];
|
||||
|
||||
for await (const page of this.github.query({ q: query })) {
|
||||
for (const issue of page) {
|
||||
const hydrated = await issue.getIssue();
|
||||
if (hydrated.open && this.validateIssue(hydrated)
|
||||
// TODO: Verify updated timestamp
|
||||
) {
|
||||
// Don't add a comment if already commented on by an action.
|
||||
let foundActionComment = false;
|
||||
for await (const commentBatch of issue.getComments()) {
|
||||
for (const comment of commentBatch) {
|
||||
if (comment.author.isGitHubApp) {
|
||||
foundActionComment = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundActionComment)
|
||||
break;
|
||||
}
|
||||
if (foundActionComment) {
|
||||
safeLog(`Issue ${hydrated.number} already commented on by an action. Ignoring.`);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (this.addComment) {
|
||||
safeLog(`Posting comment on issue ${hydrated.number}`);
|
||||
await issue.postComment(this.addComment);
|
||||
}
|
||||
if (removeLabelsSet.length > 0) {
|
||||
for (const removeLabel of removeLabelsSet) {
|
||||
if (removeLabel && removeLabel.length > 0) {
|
||||
safeLog(`Removing label on issue ${hydrated.number}: ${removeLabel}`);
|
||||
await issue.removeLabel(removeLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (addLabelsSet.length > 0) {
|
||||
for (const addLabel of addLabelsSet) {
|
||||
if (addLabel && addLabel.length > 0) {
|
||||
safeLog(`Adding label on issue ${hydrated.number}: ${addLabel}`);
|
||||
await issue.addLabel(addLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.setMilestoneId != undefined) {
|
||||
safeLog(`Setting milestone of issue ${hydrated.number} to id ${+this.setMilestoneId}`);
|
||||
await issue.setMilestone(+this.setMilestoneId);
|
||||
}
|
||||
safeLog(`Processing issue ${hydrated.number}.`);
|
||||
} else {
|
||||
if (!hydrated.open) {
|
||||
safeLog(`Issue ${hydrated.number} is not open. Ignoring`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
name: Add Comment and Label
|
||||
description: Add comment (etc) to issues that are marked with a specified label (etc)
|
||||
inputs:
|
||||
token:
|
||||
description: GitHub token with issue, comment, and label read/write permissions
|
||||
default: ${{ github.token }}
|
||||
createdAfter:
|
||||
description: Creation date after which to be considered.
|
||||
required: false
|
||||
afterDays:
|
||||
description: Days to wait before performing this action (may be 0).
|
||||
required: false
|
||||
addComment:
|
||||
description: Comment to add
|
||||
labels:
|
||||
description: items with these labels will be considered. May be "*".
|
||||
required: true
|
||||
milestoneName:
|
||||
description: items with these milestones will be considered (name only, must match ID)
|
||||
milestoneId:
|
||||
description: items with these milestones will be considered (id only, must match name)
|
||||
ignoreLabels:
|
||||
description: items with these labels will not be considered
|
||||
ignoreMilestoneNames:
|
||||
description: items with these milestones will not be considered (names only, must match IDs). May be "*".
|
||||
ignoreMilestoneIds:
|
||||
description: items with these milestones will not be considered (IDs only, must match names)
|
||||
addLabels:
|
||||
description: Labels to add to issue.
|
||||
removeLabels:
|
||||
description: Labels to remove from issue.
|
||||
minimumVotes:
|
||||
descriptions: Only issues with at least this many votes will be considered.
|
||||
maximumVotes:
|
||||
descriptions: Only issues fewer or equal to this many votes will be considered.
|
||||
involves:
|
||||
descriptions: Qualifier to find issues that in some way involve a certain user either as an author, assignee, or mentions.
|
||||
readonly:
|
||||
description: If true, changes are not applied.
|
||||
runs:
|
||||
using: 'node20'
|
||||
main: 'index.js'
|
||||
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const utils_1 = require("../common/utils");
|
||||
const AddComment_1 = require("./AddComment");
|
||||
const Action_1 = require("../common/Action");
|
||||
class AddCommentAction extends Action_1.Action {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.id = 'AddComment';
|
||||
}
|
||||
async onTriggered(github) {
|
||||
await new AddComment_1.AddComment(github, (0, utils_1.getInput)('createdAfter') || undefined, +((0, utils_1.getInput)('afterDays') || 0), (0, utils_1.getRequiredInput)('labels'), (0, utils_1.getInput)('addComment') || '', (0, utils_1.getInput)('addLabels') || undefined, (0, utils_1.getInput)('removeLabels') || undefined, (0, utils_1.getInput)('setMilestoneId') || undefined, (0, utils_1.getInput)('milestoneName') || undefined, (0, utils_1.getInput)('milestoneId') || undefined, (0, utils_1.getInput)('ignoreLabels') || undefined, (0, utils_1.getInput)('ignoreMilestoneNames') || undefined, (0, utils_1.getInput)('ignoreMilestoneIds') || undefined, +((0, utils_1.getInput)('minimumVotes') || 0), +((0, utils_1.getInput)('maximumVotes') || 9999999), (0, utils_1.getInput)('involves') || undefined).run();
|
||||
}
|
||||
}
|
||||
new AddCommentAction().run(); // eslint-disable-line
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1,36 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { OctoKit } from '../api/octokit'
|
||||
import { getInput, getRequiredInput } from '../common/utils'
|
||||
import { AddComment } from './AddComment'
|
||||
import { Action } from '../common/Action'
|
||||
|
||||
class AddCommentAction extends Action {
|
||||
id = 'AddComment';
|
||||
|
||||
async onTriggered(github: OctoKit) {
|
||||
await new AddComment(
|
||||
github,
|
||||
getInput('createdAfter') || undefined,
|
||||
+(getInput('afterDays') || 0),
|
||||
getRequiredInput('labels'),
|
||||
getInput('addComment') || '',
|
||||
getInput('addLabels') || undefined,
|
||||
getInput('removeLabels') || undefined,
|
||||
getInput('setMilestoneId') || undefined,
|
||||
getInput('milestoneName') || undefined,
|
||||
getInput('milestoneId') || undefined,
|
||||
getInput('ignoreLabels') || undefined,
|
||||
getInput('ignoreMilestoneNames') || undefined,
|
||||
getInput('ignoreMilestoneIds') || undefined,
|
||||
+(getInput('minimumVotes') || 0),
|
||||
+(getInput('maximumVotes') || 9999999),
|
||||
getInput('involves') || undefined
|
||||
).run();
|
||||
}
|
||||
}
|
||||
|
||||
new AddCommentAction().run(); // eslint-disable-line
|
||||
@@ -15,7 +15,7 @@ inputs:
|
||||
milestoneId:
|
||||
description: items with these milestones will be considered (id only, must match name)
|
||||
labels:
|
||||
description: items with these labels will not be considered. May be "*".
|
||||
description: items with these labels will be considered. May be "*".
|
||||
ignoreMilestoneNames:
|
||||
description: items with these milestones will not be considered (names only, must match IDs). May be "*".
|
||||
ignoreMilestoneIds:
|
||||
@@ -29,5 +29,5 @@ inputs:
|
||||
readonly:
|
||||
description: If true, changes are not applied.
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node20'
|
||||
main: 'index.js'
|
||||
|
||||
@@ -19,7 +19,7 @@ inputs:
|
||||
milestoneId:
|
||||
description: items with these milestones will be considered (id only, must match name)
|
||||
labels:
|
||||
description: items with these labels will not be considered. May be "*".
|
||||
description: items with these labels will be considered. May be "*".
|
||||
ignoreMilestoneNames:
|
||||
description: items with these milestones will not be considered (names only, must match IDs). May be "*".
|
||||
ignoreMilestoneIds:
|
||||
@@ -33,5 +33,5 @@ inputs:
|
||||
readonly:
|
||||
description: If true, changes are not applied.
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node20'
|
||||
main: 'index.js'
|
||||
|
||||
@@ -1,106 +1,106 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StaleCloser = void 0;
|
||||
const ActionBase_1 = require("../common/ActionBase");
|
||||
const utils_1 = require("../common/utils");
|
||||
class StaleCloser extends ActionBase_1.ActionBase {
|
||||
constructor(github, closeDays, labels, closeComment, pingDays, pingComment, additionalTeam, addLabels, removeLabels, setMilestoneId, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves) {
|
||||
super(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves);
|
||||
this.github = github;
|
||||
this.closeDays = closeDays;
|
||||
this.closeComment = closeComment;
|
||||
this.pingDays = pingDays;
|
||||
this.pingComment = pingComment;
|
||||
this.additionalTeam = additionalTeam;
|
||||
this.addLabels = addLabels;
|
||||
this.removeLabels = removeLabels;
|
||||
this.setMilestoneId = setMilestoneId;
|
||||
}
|
||||
async run() {
|
||||
const updatedTimestamp = (0, utils_1.daysAgoToHumanReadbleDate)(this.closeDays);
|
||||
const pingTimestamp = this.pingDays ? (0, utils_1.daysAgoToTimestamp)(this.pingDays) : undefined;
|
||||
const query = this.buildQuery((this.closeDays ? `updated:<${updatedTimestamp} ` : "") + "is:open is:unlocked");
|
||||
const addLabelsSet = this.addLabels ? this.addLabels.split(',') : [];
|
||||
const removeLabelsSet = this.removeLabels ? this.removeLabels.split(',') : [];
|
||||
for await (const page of this.github.query({ q: query })) {
|
||||
for (const issue of page) {
|
||||
const hydrated = await issue.getIssue();
|
||||
const lastCommentIterator = await issue.getComments(true).next();
|
||||
if (lastCommentIterator.done) {
|
||||
throw Error('Unexpected comment data');
|
||||
}
|
||||
const lastComment = lastCommentIterator.value[0];
|
||||
if (hydrated.open && this.validateIssue(hydrated)
|
||||
// TODO: Verify updated timestamp
|
||||
) {
|
||||
if (!lastComment ||
|
||||
lastComment.author.isGitHubApp ||
|
||||
pingTimestamp == undefined ||
|
||||
// TODO: List the collaborators once per go rather than checking a single user each issue
|
||||
this.additionalTeam.includes(lastComment.author.name) ||
|
||||
await issue.hasWriteAccess(lastComment.author)) {
|
||||
if (pingTimestamp != undefined) {
|
||||
if (lastComment) {
|
||||
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Closing.`);
|
||||
}
|
||||
else {
|
||||
(0, utils_1.safeLog)(`No comments on issue ${hydrated.number}. Closing.`);
|
||||
}
|
||||
}
|
||||
if (this.closeComment) {
|
||||
(0, utils_1.safeLog)(`Posting comment on issue ${hydrated.number}`);
|
||||
await issue.postComment(this.closeComment);
|
||||
}
|
||||
if (removeLabelsSet.length > 0) {
|
||||
for (const removeLabel of removeLabelsSet) {
|
||||
if (removeLabel && removeLabel.length > 0) {
|
||||
(0, utils_1.safeLog)(`Removing label on issue ${hydrated.number}: ${removeLabel}`);
|
||||
await issue.removeLabel(removeLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (addLabelsSet.length > 0) {
|
||||
for (const addLabel of addLabelsSet) {
|
||||
if (addLabel && addLabel.length > 0) {
|
||||
(0, utils_1.safeLog)(`Adding label on issue ${hydrated.number}: ${addLabel}`);
|
||||
await issue.addLabel(addLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
await issue.closeIssue("not_planned");
|
||||
if (this.setMilestoneId != undefined) {
|
||||
(0, utils_1.safeLog)(`Setting milestone of issue ${hydrated.number} to id ${+this.setMilestoneId}`);
|
||||
await issue.setMilestone(+this.setMilestoneId);
|
||||
}
|
||||
(0, utils_1.safeLog)(`Closing issue ${hydrated.number}.`);
|
||||
}
|
||||
else {
|
||||
// Ping
|
||||
if (hydrated.updatedAt < pingTimestamp && hydrated.assignee) {
|
||||
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Pinging @${hydrated.assignee}`);
|
||||
if (this.pingComment) {
|
||||
await issue.postComment(this.pingComment
|
||||
.replace('${assignee}', hydrated.assignee)
|
||||
.replace('${author}', hydrated.author.name));
|
||||
}
|
||||
}
|
||||
else {
|
||||
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Skipping.${hydrated.assignee ? ' cc @' + hydrated.assignee : ''}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!hydrated.open) {
|
||||
(0, utils_1.safeLog)(`Issue ${hydrated.number} is not open. Ignoring`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.StaleCloser = StaleCloser;
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StaleCloser = void 0;
|
||||
const ActionBase_1 = require("../common/ActionBase");
|
||||
const utils_1 = require("../common/utils");
|
||||
class StaleCloser extends ActionBase_1.ActionBase {
|
||||
constructor(github, closeDays, labels, closeComment, pingDays, pingComment, additionalTeam, addLabels, removeLabels, setMilestoneId, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves) {
|
||||
super(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves);
|
||||
this.github = github;
|
||||
this.closeDays = closeDays;
|
||||
this.closeComment = closeComment;
|
||||
this.pingDays = pingDays;
|
||||
this.pingComment = pingComment;
|
||||
this.additionalTeam = additionalTeam;
|
||||
this.addLabels = addLabels;
|
||||
this.removeLabels = removeLabels;
|
||||
this.setMilestoneId = setMilestoneId;
|
||||
}
|
||||
async run() {
|
||||
const updatedTimestamp = this.closeDays ? (0, utils_1.daysAgoToHumanReadbleDate)(this.closeDays) : undefined;
|
||||
const pingTimestamp = this.pingDays ? (0, utils_1.daysAgoToTimestamp)(this.pingDays) : undefined;
|
||||
const query = this.buildQuery((updatedTimestamp ? `updated:<${updatedTimestamp} ` : "") + "is:open is:unlocked");
|
||||
const addLabelsSet = this.addLabels ? this.addLabels.split(',') : [];
|
||||
const removeLabelsSet = this.removeLabels ? this.removeLabels.split(',') : [];
|
||||
for await (const page of this.github.query({ q: query })) {
|
||||
for (const issue of page) {
|
||||
const hydrated = await issue.getIssue();
|
||||
const lastCommentIterator = await issue.getComments(true).next();
|
||||
if (lastCommentIterator.done) {
|
||||
throw Error('Unexpected comment data');
|
||||
}
|
||||
const lastComment = lastCommentIterator.value[0];
|
||||
if (hydrated.open && this.validateIssue(hydrated)
|
||||
// TODO: Verify updated timestamp
|
||||
) {
|
||||
if (!lastComment ||
|
||||
lastComment.author.isGitHubApp ||
|
||||
pingTimestamp == undefined ||
|
||||
// TODO: List the collaborators once per go rather than checking a single user each issue
|
||||
this.additionalTeam.includes(lastComment.author.name) ||
|
||||
await issue.hasWriteAccess(lastComment.author)) {
|
||||
if (pingTimestamp != undefined) {
|
||||
if (lastComment) {
|
||||
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Closing.`);
|
||||
}
|
||||
else {
|
||||
(0, utils_1.safeLog)(`No comments on issue ${hydrated.number}. Closing.`);
|
||||
}
|
||||
}
|
||||
if (this.closeComment) {
|
||||
(0, utils_1.safeLog)(`Posting comment on issue ${hydrated.number}`);
|
||||
await issue.postComment(this.closeComment);
|
||||
}
|
||||
if (removeLabelsSet.length > 0) {
|
||||
for (const removeLabel of removeLabelsSet) {
|
||||
if (removeLabel && removeLabel.length > 0) {
|
||||
(0, utils_1.safeLog)(`Removing label on issue ${hydrated.number}: ${removeLabel}`);
|
||||
await issue.removeLabel(removeLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (addLabelsSet.length > 0) {
|
||||
for (const addLabel of addLabelsSet) {
|
||||
if (addLabel && addLabel.length > 0) {
|
||||
(0, utils_1.safeLog)(`Adding label on issue ${hydrated.number}: ${addLabel}`);
|
||||
await issue.addLabel(addLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
await issue.closeIssue("not_planned");
|
||||
if (this.setMilestoneId != undefined) {
|
||||
(0, utils_1.safeLog)(`Setting milestone of issue ${hydrated.number} to id ${+this.setMilestoneId}`);
|
||||
await issue.setMilestone(+this.setMilestoneId);
|
||||
}
|
||||
(0, utils_1.safeLog)(`Closing issue ${hydrated.number}.`);
|
||||
}
|
||||
else {
|
||||
// Ping
|
||||
if (hydrated.updatedAt < pingTimestamp && hydrated.assignee) {
|
||||
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Pinging @${hydrated.assignee}`);
|
||||
if (this.pingComment) {
|
||||
await issue.postComment(this.pingComment
|
||||
.replace('${assignee}', hydrated.assignee)
|
||||
.replace('${author}', hydrated.author.name));
|
||||
}
|
||||
}
|
||||
else {
|
||||
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Skipping.${hydrated.assignee ? ' cc @' + hydrated.assignee : ''}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!hydrated.open) {
|
||||
(0, utils_1.safeLog)(`Issue ${hydrated.number} is not open. Ignoring`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.StaleCloser = StaleCloser;
|
||||
//# sourceMappingURL=StaleCloser.js.map
|
||||
@@ -33,10 +33,10 @@ export class StaleCloser extends ActionBase {
|
||||
}
|
||||
|
||||
async run() {
|
||||
const updatedTimestamp = daysAgoToHumanReadbleDate(this.closeDays);
|
||||
const updatedTimestamp = this.closeDays ? daysAgoToHumanReadbleDate(this.closeDays) : undefined;
|
||||
const pingTimestamp = this.pingDays ? daysAgoToTimestamp(this.pingDays) : undefined;
|
||||
|
||||
const query = this.buildQuery((this.closeDays ? `updated:<${updatedTimestamp} ` : "") + "is:open is:unlocked");
|
||||
const query = this.buildQuery((updatedTimestamp ? `updated:<${updatedTimestamp} ` : "") + "is:open is:unlocked");
|
||||
|
||||
const addLabelsSet = this.addLabels ? this.addLabels.split(',') : [];
|
||||
const removeLabelsSet = this.removeLabels ? this.removeLabels.split(',') : [];
|
||||
|
||||
@@ -20,7 +20,7 @@ inputs:
|
||||
milestoneId:
|
||||
description: items with these milestones will be considered (id only, must match name)
|
||||
labels:
|
||||
description: items with these labels will not be considered. May be "*".
|
||||
description: items with these labels will be considered. May be "*".
|
||||
required: true
|
||||
ignoreMilestoneNames:
|
||||
description: items with these milestones will not be considered (names only, must match IDs). May be "*".
|
||||
@@ -43,5 +43,5 @@ inputs:
|
||||
readonly:
|
||||
description: If true, changes are not applied.
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node20'
|
||||
main: 'index.js'
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const utils_1 = require("../common/utils");
|
||||
const StaleCloser_1 = require("./StaleCloser");
|
||||
const Action_1 = require("../common/Action");
|
||||
class StaleCloserAction extends Action_1.Action {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.id = 'StaleCloser';
|
||||
}
|
||||
async onTriggered(github) {
|
||||
var _a;
|
||||
await new StaleCloser_1.StaleCloser(github, +(0, utils_1.getRequiredInput)('closeDays'), (0, utils_1.getRequiredInput)('labels'), (0, utils_1.getInput)('closeComment') || '', +((0, utils_1.getInput)('pingDays') || 0), (0, utils_1.getInput)('pingComment') || '', ((_a = (0, utils_1.getInput)('additionalTeam')) !== null && _a !== void 0 ? _a : '').split(','), (0, utils_1.getInput)('addLabels') || undefined, (0, utils_1.getInput)('removeLabels') || undefined, (0, utils_1.getInput)('setMilestoneId') || undefined, (0, utils_1.getInput)('milestoneName') || undefined, (0, utils_1.getInput)('milestoneId') || undefined, (0, utils_1.getInput)('ignoreLabels') || undefined, (0, utils_1.getInput)('ignoreMilestoneNames') || undefined, (0, utils_1.getInput)('ignoreMilestoneIds') || undefined, +((0, utils_1.getInput)('minimumVotes') || 0), +((0, utils_1.getInput)('maximumVotes') || 9999999), (0, utils_1.getInput)('involves') || undefined).run();
|
||||
}
|
||||
}
|
||||
new StaleCloserAction().run(); // eslint-disable-line
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const utils_1 = require("../common/utils");
|
||||
const StaleCloser_1 = require("./StaleCloser");
|
||||
const Action_1 = require("../common/Action");
|
||||
class StaleCloserAction extends Action_1.Action {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.id = 'StaleCloser';
|
||||
}
|
||||
async onTriggered(github) {
|
||||
var _a;
|
||||
await new StaleCloser_1.StaleCloser(github, +(0, utils_1.getRequiredInput)('closeDays'), (0, utils_1.getRequiredInput)('labels'), (0, utils_1.getInput)('closeComment') || '', +((0, utils_1.getInput)('pingDays') || 0), (0, utils_1.getInput)('pingComment') || '', ((_a = (0, utils_1.getInput)('additionalTeam')) !== null && _a !== void 0 ? _a : '').split(','), (0, utils_1.getInput)('addLabels') || undefined, (0, utils_1.getInput)('removeLabels') || undefined, (0, utils_1.getInput)('setMilestoneId') || undefined, (0, utils_1.getInput)('milestoneName') || undefined, (0, utils_1.getInput)('milestoneId') || undefined, (0, utils_1.getInput)('ignoreLabels') || undefined, (0, utils_1.getInput)('ignoreMilestoneNames') || undefined, (0, utils_1.getInput)('ignoreMilestoneIds') || undefined, +((0, utils_1.getInput)('minimumVotes') || 0), +((0, utils_1.getInput)('maximumVotes') || 9999999), (0, utils_1.getInput)('involves') || undefined).run();
|
||||
}
|
||||
}
|
||||
new StaleCloserAction().run(); // eslint-disable-line
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -12,6 +12,10 @@ let numRequests = 0;
|
||||
const getNumRequests = () => numRequests;
|
||||
exports.getNumRequests = getNumRequests;
|
||||
class OctoKit {
|
||||
get octokit() {
|
||||
numRequests++;
|
||||
return this._octokit;
|
||||
}
|
||||
constructor(token, params, options = { readonly: false }) {
|
||||
this.token = token;
|
||||
this.params = params;
|
||||
@@ -23,10 +27,6 @@ class OctoKit {
|
||||
this.repoName = params.repo;
|
||||
this.repoOwner = params.owner;
|
||||
}
|
||||
get octokit() {
|
||||
numRequests++;
|
||||
return this._octokit;
|
||||
}
|
||||
getIssueByNumber(number) {
|
||||
return new OctoKitIssue(this.token, this.params, { number: number });
|
||||
}
|
||||
|
||||
@@ -1,183 +1,183 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ActionBase = void 0;
|
||||
const utils_1 = require("./utils");
|
||||
class ActionBase {
|
||||
constructor(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves) {
|
||||
this.labels = labels;
|
||||
this.milestoneName = milestoneName;
|
||||
this.milestoneId = milestoneId;
|
||||
this.ignoreLabels = ignoreLabels;
|
||||
this.ignoreMilestoneNames = ignoreMilestoneNames;
|
||||
this.ignoreMilestoneIds = ignoreMilestoneIds;
|
||||
this.minimumVotes = minimumVotes;
|
||||
this.maximumVotes = maximumVotes;
|
||||
this.involves = involves;
|
||||
this.labelsSet = [];
|
||||
this.ignoreLabelsSet = [];
|
||||
this.ignoreMilestoneNamesSet = [];
|
||||
this.ignoreMilestoneIdsSet = [];
|
||||
this.ignoreAllWithLabels = false;
|
||||
this.ignoreAllWithMilestones = false;
|
||||
this.involvesSet = [];
|
||||
}
|
||||
buildQuery(baseQuery) {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
let query = baseQuery;
|
||||
(0, utils_1.safeLog)(`labels: ${this.labels}`);
|
||||
(0, utils_1.safeLog)(`milestoneName: ${this.milestoneName}`);
|
||||
(0, utils_1.safeLog)(`milestoneId: ${this.milestoneId}`);
|
||||
(0, utils_1.safeLog)(`ignoreLabels: ${this.ignoreLabels}`);
|
||||
(0, utils_1.safeLog)(`ignoreMilestoneNames: ${this.ignoreMilestoneNames}`);
|
||||
(0, utils_1.safeLog)(`ignoreMilestoneIds: ${this.ignoreMilestoneIds}`);
|
||||
(0, utils_1.safeLog)(`minimumVotes: ${this.minimumVotes}`);
|
||||
(0, utils_1.safeLog)(`maximumVotes: ${this.maximumVotes}`);
|
||||
(0, utils_1.safeLog)(`involves: ${this.involves}`);
|
||||
// Both milestone name and milestone Id must be provided and must match.
|
||||
// The name is used to construct the query, which does not accept ID.
|
||||
// The ID is used for comparisons with issue data, which does not include the name.
|
||||
// TODO: Figure out a way to convert either from milestone name to ID, or vice versa.
|
||||
// If label inclusion and exclusion are mixed, exclusion will take precedence.
|
||||
// For example, an issue with both labels A and B will not match if B is excluded, even if A is included.
|
||||
// If a milestoneName/milestoneId are set, ignoreMilenameName/ignoreMilestoneIds are ignored.
|
||||
// GitHub does not appear to support searching for all issues with milestones (not lacking a milestone). "-no:milestone" does not work.
|
||||
// GitHub does not appear to support searching for all issues with labels (not lacking a label). "-no:label" does not work.
|
||||
// All indicated labels must be present
|
||||
if (this.labels) {
|
||||
if (((_a = this.labels) === null || _a === void 0 ? void 0 : _a.length) > 2 && ((_b = this.labels) === null || _b === void 0 ? void 0 : _b.startsWith('"')) && ((_c = this.labels) === null || _c === void 0 ? void 0 : _c.endsWith('"'))) {
|
||||
this.labels = this.labels.substring(1, this.labels.length - 2);
|
||||
}
|
||||
this.labelsSet = (_d = this.labels) === null || _d === void 0 ? void 0 : _d.split(',');
|
||||
for (const str of this.labelsSet) {
|
||||
if (str != "") {
|
||||
query = query.concat(` label:"${str}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
// The "involves" qualifier to find issues that in some way involve a certain user.
|
||||
// It is a logical OR between the author, assignee, and mentions.
|
||||
if (this.involves) {
|
||||
this.involvesSet = (_e = this.involves) === null || _e === void 0 ? void 0 : _e.split(',');
|
||||
for (const str of this.involvesSet) {
|
||||
if (str != "") {
|
||||
query = query.concat(` involves:"${str}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.ignoreLabels) {
|
||||
if (this.ignoreLabels == "*" && !this.labels) { // only if unlabeled
|
||||
query = query.concat(` no:label`);
|
||||
this.ignoreAllWithLabels = true;
|
||||
}
|
||||
else {
|
||||
this.ignoreLabelsSet = (_f = this.ignoreLabels) === null || _f === void 0 ? void 0 : _f.split(',');
|
||||
for (const str of this.ignoreLabelsSet) {
|
||||
if (str != "") {
|
||||
query = query.concat(` -label:"${str}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.milestoneName) {
|
||||
query = query.concat(` milestone:"${this.milestoneName}"`);
|
||||
}
|
||||
else if (this.ignoreMilestoneNames) {
|
||||
if (this.ignoreMilestoneNames == "*") {
|
||||
query = query.concat(` no:milestone`);
|
||||
this.ignoreAllWithMilestones = true;
|
||||
}
|
||||
else if (this.ignoreMilestoneIds) {
|
||||
this.ignoreMilestoneNamesSet = this.ignoreMilestoneNames.split(',');
|
||||
this.ignoreMilestoneIdsSet = this.ignoreMilestoneIds.split(',');
|
||||
for (const str of this.ignoreMilestoneNamesSet) {
|
||||
if (str != "") {
|
||||
query = query.concat(` -milestone:"${str}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return query;
|
||||
}
|
||||
// This is necessary because GitHub sometimes returns incorrect results,
|
||||
// and because issues may get modified while we are processing them.
|
||||
validateIssue(issue) {
|
||||
var _a, _b;
|
||||
if (this.ignoreAllWithLabels) {
|
||||
// Validate that the issue does not have labels
|
||||
if (issue.labels && issue.labels.length !== 0) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to label found after querying for no:label.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Make sure all labels we wanted are present.
|
||||
if ((!issue.labels || issue.labels.length == 0) && this.labelsSet.length > 0) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having a required label set. No labels found.`);
|
||||
return false;
|
||||
}
|
||||
for (const str of this.labelsSet) {
|
||||
if (!issue.labels.includes(str)) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having a required label set.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Make sure no labels we wanted to ignore are present.
|
||||
if (issue.labels && issue.labels.length > 0) {
|
||||
for (const str of this.ignoreLabelsSet) {
|
||||
if (issue.labels.includes(str)) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to having an ignore label set: ${str}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.ignoreAllWithMilestones) {
|
||||
// Validate that the issue does not have a milestone.
|
||||
if (issue.milestone) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to milestone found after querying for no:milestone.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Make sure milestone is present, if required.
|
||||
if (this.milestoneId != null && ((_a = issue.milestone) === null || _a === void 0 ? void 0 : _a.milestoneId) != +this.milestoneId) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having required milsetone id ${this.milestoneId}. Had: ${(_b = issue.milestone) === null || _b === void 0 ? void 0 : _b.milestoneId}`);
|
||||
return false;
|
||||
}
|
||||
// Make sure a milestones we wanted to ignore is not present.
|
||||
if (issue.milestone && issue.milestone.milestoneId != null) {
|
||||
for (const str of this.ignoreMilestoneIdsSet) {
|
||||
if (issue.milestone.milestoneId == +str) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to milestone ${issue.milestone.milestoneId} found in list of ignored milestone IDs.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Verify the issue has a sufficient number of upvotes
|
||||
let upvotes = 0;
|
||||
if (issue.reactions) {
|
||||
upvotes = issue.reactions['+1'];
|
||||
}
|
||||
if (this.minimumVotes != undefined) {
|
||||
if (upvotes < this.minimumVotes) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having at least ${this.minimumVotes} upvotes. Had: ${upvotes}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Verify the issue does not have too many upvotes
|
||||
if (this.maximumVotes != undefined) {
|
||||
if (upvotes > this.maximumVotes) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to having more than ${this.maximumVotes} upvotes. Had: ${upvotes}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
exports.ActionBase = ActionBase;
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ActionBase = void 0;
|
||||
const utils_1 = require("./utils");
|
||||
class ActionBase {
|
||||
constructor(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves) {
|
||||
this.labels = labels;
|
||||
this.milestoneName = milestoneName;
|
||||
this.milestoneId = milestoneId;
|
||||
this.ignoreLabels = ignoreLabels;
|
||||
this.ignoreMilestoneNames = ignoreMilestoneNames;
|
||||
this.ignoreMilestoneIds = ignoreMilestoneIds;
|
||||
this.minimumVotes = minimumVotes;
|
||||
this.maximumVotes = maximumVotes;
|
||||
this.involves = involves;
|
||||
this.labelsSet = [];
|
||||
this.ignoreLabelsSet = [];
|
||||
this.ignoreMilestoneNamesSet = [];
|
||||
this.ignoreMilestoneIdsSet = [];
|
||||
this.ignoreAllWithLabels = false;
|
||||
this.ignoreAllWithMilestones = false;
|
||||
this.involvesSet = [];
|
||||
}
|
||||
buildQuery(baseQuery) {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
let query = baseQuery;
|
||||
(0, utils_1.safeLog)(`labels: ${this.labels}`);
|
||||
(0, utils_1.safeLog)(`milestoneName: ${this.milestoneName}`);
|
||||
(0, utils_1.safeLog)(`milestoneId: ${this.milestoneId}`);
|
||||
(0, utils_1.safeLog)(`ignoreLabels: ${this.ignoreLabels}`);
|
||||
(0, utils_1.safeLog)(`ignoreMilestoneNames: ${this.ignoreMilestoneNames}`);
|
||||
(0, utils_1.safeLog)(`ignoreMilestoneIds: ${this.ignoreMilestoneIds}`);
|
||||
(0, utils_1.safeLog)(`minimumVotes: ${this.minimumVotes}`);
|
||||
(0, utils_1.safeLog)(`maximumVotes: ${this.maximumVotes}`);
|
||||
(0, utils_1.safeLog)(`involves: ${this.involves}`);
|
||||
// Both milestone name and milestone Id must be provided and must match.
|
||||
// The name is used to construct the query, which does not accept ID.
|
||||
// The ID is used for comparisons with issue data, which does not include the name.
|
||||
// TODO: Figure out a way to convert either from milestone name to ID, or vice versa.
|
||||
// If label inclusion and exclusion are mixed, exclusion will take precedence.
|
||||
// For example, an issue with both labels A and B will not match if B is excluded, even if A is included.
|
||||
// If a milestoneName/milestoneId are set, ignoreMilenameName/ignoreMilestoneIds are ignored.
|
||||
// GitHub does not appear to support searching for all issues with milestones (not lacking a milestone). "-no:milestone" does not work.
|
||||
// GitHub does not appear to support searching for all issues with labels (not lacking a label). "-no:label" does not work.
|
||||
// All indicated labels must be present
|
||||
if (this.labels) {
|
||||
if (((_a = this.labels) === null || _a === void 0 ? void 0 : _a.length) > 2 && ((_b = this.labels) === null || _b === void 0 ? void 0 : _b.startsWith('"')) && ((_c = this.labels) === null || _c === void 0 ? void 0 : _c.endsWith('"'))) {
|
||||
this.labels = this.labels.substring(1, this.labels.length - 2);
|
||||
}
|
||||
this.labelsSet = (_d = this.labels) === null || _d === void 0 ? void 0 : _d.split(',');
|
||||
for (const str of this.labelsSet) {
|
||||
if (str != "") {
|
||||
query = query.concat(` label:"${str}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
// The "involves" qualifier to find issues that in some way involve a certain user.
|
||||
// It is a logical OR between the author, assignee, and mentions.
|
||||
if (this.involves) {
|
||||
this.involvesSet = (_e = this.involves) === null || _e === void 0 ? void 0 : _e.split(',');
|
||||
for (const str of this.involvesSet) {
|
||||
if (str != "") {
|
||||
query = query.concat(` involves:"${str}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.ignoreLabels) {
|
||||
if (this.ignoreLabels == "*" && !this.labels) { // only if unlabeled
|
||||
query = query.concat(` no:label`);
|
||||
this.ignoreAllWithLabels = true;
|
||||
}
|
||||
else {
|
||||
this.ignoreLabelsSet = (_f = this.ignoreLabels) === null || _f === void 0 ? void 0 : _f.split(',');
|
||||
for (const str of this.ignoreLabelsSet) {
|
||||
if (str != "") {
|
||||
query = query.concat(` -label:"${str}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.milestoneName) {
|
||||
query = query.concat(` milestone:"${this.milestoneName}"`);
|
||||
}
|
||||
else if (this.ignoreMilestoneNames) {
|
||||
if (this.ignoreMilestoneNames == "*") {
|
||||
query = query.concat(` no:milestone`);
|
||||
this.ignoreAllWithMilestones = true;
|
||||
}
|
||||
else if (this.ignoreMilestoneIds) {
|
||||
this.ignoreMilestoneNamesSet = this.ignoreMilestoneNames.split(',');
|
||||
this.ignoreMilestoneIdsSet = this.ignoreMilestoneIds.split(',');
|
||||
for (const str of this.ignoreMilestoneNamesSet) {
|
||||
if (str != "") {
|
||||
query = query.concat(` -milestone:"${str}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return query;
|
||||
}
|
||||
// This is necessary because GitHub sometimes returns incorrect results,
|
||||
// and because issues may get modified while we are processing them.
|
||||
validateIssue(issue) {
|
||||
var _a, _b;
|
||||
if (this.ignoreAllWithLabels) {
|
||||
// Validate that the issue does not have labels
|
||||
if (issue.labels && issue.labels.length !== 0) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to label found after querying for no:label.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Make sure all labels we wanted are present.
|
||||
if ((!issue.labels || issue.labels.length == 0) && this.labelsSet.length > 0) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having a required label set. No labels found.`);
|
||||
return false;
|
||||
}
|
||||
for (const str of this.labelsSet) {
|
||||
if (!issue.labels.includes(str)) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having a required label set.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Make sure no labels we wanted to ignore are present.
|
||||
if (issue.labels && issue.labels.length > 0) {
|
||||
for (const str of this.ignoreLabelsSet) {
|
||||
if (issue.labels.includes(str)) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to having an ignore label set: ${str}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.ignoreAllWithMilestones) {
|
||||
// Validate that the issue does not have a milestone.
|
||||
if (issue.milestone) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to milestone found after querying for no:milestone.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Make sure milestone is present, if required.
|
||||
if (this.milestoneId != null && ((_a = issue.milestone) === null || _a === void 0 ? void 0 : _a.milestoneId) != +this.milestoneId) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having required milsetone id ${this.milestoneId}. Had: ${(_b = issue.milestone) === null || _b === void 0 ? void 0 : _b.milestoneId}`);
|
||||
return false;
|
||||
}
|
||||
// Make sure a milestones we wanted to ignore is not present.
|
||||
if (issue.milestone && issue.milestone.milestoneId != null) {
|
||||
for (const str of this.ignoreMilestoneIdsSet) {
|
||||
if (issue.milestone.milestoneId == +str) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to milestone ${issue.milestone.milestoneId} found in list of ignored milestone IDs.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Verify the issue has a sufficient number of upvotes
|
||||
let upvotes = 0;
|
||||
if (issue.reactions) {
|
||||
upvotes = issue.reactions['+1'];
|
||||
}
|
||||
if (this.minimumVotes != undefined) {
|
||||
if (upvotes < this.minimumVotes) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having at least ${this.minimumVotes} upvotes. Had: ${upvotes}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Verify the issue does not have too many upvotes
|
||||
if (this.maximumVotes != undefined) {
|
||||
if (upvotes > this.maximumVotes) {
|
||||
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to having more than ${this.maximumVotes} upvotes. Had: ${upvotes}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
exports.ActionBase = ActionBase;
|
||||
//# sourceMappingURL=ActionBase.js.map
|
||||
Generated
+3645
-8007
File diff suppressed because it is too large
Load Diff
@@ -11,11 +11,11 @@
|
||||
"author": "",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.9.1",
|
||||
"@actions/github": "^5.0.3",
|
||||
"@octokit/rest": "^19.0.3",
|
||||
"@slack/web-api": "^6.7.2",
|
||||
"@actions/github": "^6.0.0",
|
||||
"@octokit/rest": "^21.1.1",
|
||||
"@slack/web-api": "^6.9.1",
|
||||
"applicationinsights": "^2.5.1",
|
||||
"axios": "^0.27.2",
|
||||
"axios": "^1.8.2",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Bug - debugger
|
||||
on:
|
||||
schedule:
|
||||
- cron: 50 12 * * * # Run at 12:50 PM UTC (4:50 AM PST, 5:50 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
description: "readonly: Specify true or 1 to prevent changes from being commited to GitHub"
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
- name: Install Actions
|
||||
run: cd ./.github/actions && npm install --production && cd ../..
|
||||
- name: Add Comment
|
||||
uses: ./.github/actions/AddComment
|
||||
with:
|
||||
readonly: ${{ github.event.inputs.readonly }}
|
||||
labels: bug,debugger
|
||||
ignoreLabels: "investigate: costing,investigate,external,by design,question,more info needed,Language Service,internal"
|
||||
createdAfter: "2024-07-22"
|
||||
addComment: "Thank you for reporting this issue. We’ll let you know if we need more information to investigate it. Additionally, if you're working with GDB/LLDB, please note that the code is open source at https://github.com/microsoft/MIEngine/wiki/Contributing-Code . Your contributions are always welcome and appreciated."
|
||||
addLabels: help wanted
|
||||
@@ -1,7 +1,7 @@
|
||||
name: By Design closer - debugger
|
||||
on:
|
||||
schedule:
|
||||
- cron: 10 11 * * * # Run at 11:10 AM UTC (3:10 AM PST, 4:10 AM PDT)
|
||||
- cron: 0 13 * * * # Run at 1:00 PM UTC (5:00 AM PST, 6:00 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
@@ -21,6 +23,6 @@ jobs:
|
||||
with:
|
||||
readonly: ${{ github.event.inputs.readonly }}
|
||||
labels: by design,debugger
|
||||
ignoreLabels: language service,internal
|
||||
ignoreLabels: Language Service,internal
|
||||
closeDays: 0
|
||||
closeComment: "This issue has been closed because the described behavior was determined to be by design."
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
|
||||
@@ -7,44 +7,8 @@ on:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install
|
||||
working-directory: Extension
|
||||
|
||||
- name: Compile Sources
|
||||
run: yarn run compile
|
||||
working-directory: Extension
|
||||
|
||||
- name: Run Linter
|
||||
run: yarn run lint
|
||||
working-directory: Extension
|
||||
|
||||
- name: Run unit tests
|
||||
run: yarn test
|
||||
working-directory: Extension
|
||||
|
||||
# # NOTE : We can't run the test that require the native binary files
|
||||
# # yet -- there will be an update soon that allows the tester to
|
||||
# # acquire them on-the-fly
|
||||
# - name: Run simple vscode unit tests
|
||||
# uses: GabrielBB/[email protected]
|
||||
# with:
|
||||
# run: yarn test --scenario=SingleRootProject
|
||||
# working-directory: Extension
|
||||
|
||||
# - name: Run languageServer integration tests
|
||||
# uses: GabrielBB/[email protected]
|
||||
# with:
|
||||
# run: yarn run integrationTests
|
||||
# working-directory: Extension
|
||||
job:
|
||||
uses: ./.github/workflows/job-compile-and-test.yml
|
||||
with:
|
||||
runner-env: ubuntu-22.04
|
||||
platform: linux
|
||||
@@ -7,44 +7,9 @@ on:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-12
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --network-timeout 100000
|
||||
working-directory: Extension
|
||||
|
||||
- name: Compile Sources
|
||||
run: yarn run compile
|
||||
working-directory: Extension
|
||||
|
||||
- name: Run Linter
|
||||
run: yarn run lint
|
||||
working-directory: Extension
|
||||
|
||||
- name: Run unit tests
|
||||
run: yarn test
|
||||
working-directory: Extension
|
||||
|
||||
# # NOTE : We can't run the test that require the native binary files
|
||||
# # yet -- there will be an update soon that allows the tester to
|
||||
# # acquire them on-the-fly
|
||||
# - name: Run simple vscode unit tests
|
||||
# uses: GabrielBB/[email protected]
|
||||
# with:
|
||||
# run: yarn test --scenario=SingleRootProject
|
||||
# working-directory: Extension
|
||||
|
||||
# - name: Run languageServer integration tests
|
||||
# uses: GabrielBB/[email protected]
|
||||
# with:
|
||||
# run: yarn run integrationTests
|
||||
# working-directory: Extension
|
||||
job:
|
||||
uses: ./.github/workflows/job-compile-and-test.yml
|
||||
with:
|
||||
runner-env: macos-14
|
||||
platform: mac
|
||||
yarn-args: --network-timeout 100000
|
||||
@@ -7,40 +7,8 @@ on:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2022
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install
|
||||
working-directory: Extension
|
||||
|
||||
- name: Compile Sources
|
||||
run: yarn run compile
|
||||
working-directory: Extension
|
||||
|
||||
- name: Run Linter
|
||||
run: yarn run lint
|
||||
working-directory: Extension
|
||||
|
||||
- name: Run unit tests
|
||||
run: yarn test
|
||||
working-directory: Extension
|
||||
|
||||
# # NOTE : We can't run the test that require the native binary files
|
||||
# # yet -- there will be an update soon that allows the tester to
|
||||
# # acquire them on-the-fly
|
||||
# - name: Run simple vscode unit tests
|
||||
# run: yarn test --scenario=SingleRootProject
|
||||
# working-directory: Extension
|
||||
|
||||
# - name: Run languageServer integration tests
|
||||
# run: yarn run integrationTests
|
||||
# working-directory: Extension
|
||||
job:
|
||||
uses: ./.github/workflows/job-compile-and-test.yml
|
||||
with:
|
||||
runner-env: windows-2022
|
||||
platform: windows
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "insiders", "release", "vs" ]
|
||||
pull_request:
|
||||
branches: [ "main", "insiders", "release", "vs" ]
|
||||
schedule:
|
||||
- cron: '29 4 * * 3'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: javascript-typescript
|
||||
build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Enhancement Closer (no milestone)
|
||||
on:
|
||||
schedule:
|
||||
- cron: 50 11 * * * # Run at 11:50 AM UTC (3:50 AM PST, 4:50 AM PDT)
|
||||
- cron: 40 12 * * * # Run at 12:40 PM UTC (4:40 AM PST, 5:40 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Enhancement Closer (Triage)
|
||||
on:
|
||||
schedule:
|
||||
- cron: 40 11 * * * # Run at 11:40 AM UTC (3:40 AM PST, 4:40 AM PDT)
|
||||
- cron: 30 12 * * * # Run at 12:30 PM UTC (4:30 AM PST, 5:30 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Enhancement Reopener
|
||||
on:
|
||||
schedule:
|
||||
- cron: 20 12 * * * # Run at 12:20 PM UTC (4:20 AM PST, 5:20 AM PDT)
|
||||
- cron: 0 11 * * * # Run at 11:00 AM UTC (3:00 AM PST, 4:00 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: External closer - debugger
|
||||
on:
|
||||
schedule:
|
||||
- cron: 10 11 * * * # Run at 11:10 AM UTC (3:10 AM PST, 4:10 AM PDT)
|
||||
- cron: 10 13 * * * # Run at 1:10 PM UTC (5:10 AM PST, 6:10 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
@@ -21,6 +23,6 @@ jobs:
|
||||
with:
|
||||
readonly: ${{ github.event.inputs.readonly }}
|
||||
labels: external,debugger
|
||||
ignoreLabels: language service,internal
|
||||
ignoreLabels: Language Service,internal
|
||||
closeDays: 0
|
||||
closeComment: "This issue has been closed because it is external or not applicable to the extension."
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Feature Request - debugger
|
||||
on:
|
||||
schedule:
|
||||
- cron: 20 13 * * * # Run at 1:20 PM UTC (5:20 AM PST, 6:20 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
description: "readonly: Specify true or 1 to prevent changes from being commited to GitHub"
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
- name: Install Actions
|
||||
run: cd ./.github/actions && npm install --production && cd ../..
|
||||
- name: Add Comment
|
||||
uses: ./.github/actions/AddComment
|
||||
with:
|
||||
readonly: ${{ github.event.inputs.readonly }}
|
||||
labels: Feature Request,debugger
|
||||
ignoreLabels: "investigate: costing,investigate,external,by design,question,more info needed,Language Service,internal"
|
||||
createdAfter: "2024-07-22"
|
||||
addComment: "Thank you for your feature request. While we may not be able to implement it immediately, we will monitor community reactions to see how it fits into our backlog. Additionally, if you're working with GDB/LLDB, please note that the code is open source at https://github.com/microsoft/MIEngine/wiki/Contributing-Code . Your contributions are always welcome and appreciated."
|
||||
addLabels: help wanted
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Investigate closer - debugger
|
||||
on:
|
||||
schedule:
|
||||
- cron: 10 11 * * * # Run at 11:10 AM UTC (3:10 AM PST, 4:10 AM PDT)
|
||||
- cron: 30 13 * * * # Run at 1:30 PM UTC (5:30 AM PST, 6:30 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
@@ -21,6 +23,6 @@ jobs:
|
||||
with:
|
||||
readonly: ${{ github.event.inputs.readonly }}
|
||||
labels: investigate,debugger
|
||||
ignoreLabels: language service,internal
|
||||
ignoreLabels: Language Service,internal
|
||||
closeDays: 180
|
||||
closeComment: "This issue has been closed as lower priority. We're sorry if this issue still impacts you but unfortunately we're not able to address this. We will accept a pull request from the community if it's applicable for this issue."
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Investigate Costing closer - debugger
|
||||
on:
|
||||
schedule:
|
||||
- cron: 10 11 * * * # Run at 11:10 AM UTC (3:10 AM PST, 4:10 AM PDT)
|
||||
- cron: 40 13 * * * # Run at 1:40 PM UTC (5:40 AM PST, 6:40 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
@@ -21,6 +23,6 @@ jobs:
|
||||
with:
|
||||
readonly: ${{ github.event.inputs.readonly }}
|
||||
labels: "investigate: costing,debugger"
|
||||
ignoreLabels: language service,internal
|
||||
ignoreLabels: Language Service,internal
|
||||
closeDays: 180
|
||||
closeComment: "This issue has been closed as lower priority. We're sorry if this issue still impacts you but unfortunately we're not able to address this. We will accept a pull request from the community if it's applicable for this issue."
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
# Reuable workflow for compiling and testing extension.
|
||||
name: Compile and test extension
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
runner-env:
|
||||
required: true
|
||||
type: string
|
||||
platform:
|
||||
# Expects 'mac', 'linux', or 'windows'
|
||||
required: true
|
||||
type: string
|
||||
yarn-args:
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ inputs.runner-env }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js 22
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install ${{ inputs.yarn-args }}
|
||||
working-directory: Extension
|
||||
|
||||
- name: Compile Sources
|
||||
run: yarn run compile
|
||||
working-directory: Extension
|
||||
|
||||
- name: Run Linter
|
||||
run: yarn run lint
|
||||
working-directory: Extension
|
||||
|
||||
- name: Run unit tests
|
||||
run: yarn test
|
||||
working-directory: Extension
|
||||
|
||||
# These tests don't require the binary.
|
||||
# On Linux, it is failing (before the tests actually run) with: Test run terminated with signal SIGSEGV.
|
||||
# But it works on Linux during the E2E test.
|
||||
- name: Run SingleRootProject tests
|
||||
if: ${{ inputs.platform != 'linux' }}
|
||||
run: yarn test --scenario=SingleRootProject --skipCheckBinaries
|
||||
working-directory: Extension
|
||||
|
||||
# NOTE : We can't run the test that require the native binary files
|
||||
# yet -- there will be an update soon that allows the tester to
|
||||
# acquire them on-the-fly
|
||||
# - name: Run languageServer integration tests
|
||||
# if: ${{ inputs.platform == 'windows' }}
|
||||
# run: yarn test --scenario=SingleRootProject
|
||||
# working-directory: Extension
|
||||
|
||||
# - name: Run E2E IntelliSense features tests
|
||||
# if: ${{ inputs.platform == 'windows' }}
|
||||
# run: yarn test --scenario=MultirootDeadlockTest
|
||||
# working-directory: Extension
|
||||
|
||||
# NOTE: For mac/linux run the tests with xvfb-action for UI support.
|
||||
# Another way to start xvfb https://github.com/microsoft/vscode-test/blob/master/sample/azure-pipelines.yml
|
||||
|
||||
# - name: Run languageServer integration tests (xvfb)
|
||||
# if: ${{ inputs.platform == 'mac' || inputs.platform == 'linux' }}
|
||||
# uses: coactions/setup-xvfb@v1
|
||||
# with:
|
||||
# run: yarn test --scenario=SingleRootProject
|
||||
# working-directory: Extension
|
||||
|
||||
# - name: Run E2E IntelliSense features tests (xvfb)
|
||||
# if: ${{ inputs.platform == 'mac' || inputs.platform == 'linux' }}
|
||||
# uses: coactions/setup-xvfb@v1
|
||||
# with:
|
||||
# run: yarn test --scenario=MultirootDeadlockTest
|
||||
# working-directory: Extension
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: More Info Needed Closer - debugger
|
||||
on:
|
||||
schedule:
|
||||
- cron: 10 11 * * * # Run at 11:10 AM UTC (3:10 AM PST, 4:10 AM PDT)
|
||||
- cron: 50 13 * * * # Run at 1:50 PM UTC (5:50 AM PST, 6:50 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
@@ -21,7 +23,7 @@ jobs:
|
||||
with:
|
||||
readonly: ${{ github.event.inputs.readonly }}
|
||||
labels: more info needed,debugger
|
||||
ignoreLabels: language service,internal
|
||||
ignoreLabels: Language Service,internal
|
||||
involves: wardengnaw,pieandcakes,calgagi
|
||||
closeDays: 14
|
||||
closeComment: "This issue has been closed because it needs more information and has not had recent activity."
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
@@ -22,7 +24,7 @@ jobs:
|
||||
readonly: ${{ github.event.inputs.readonly }}
|
||||
labels: more info needed
|
||||
ignoreLabels: debugger,internal
|
||||
closeDays: 60
|
||||
closeDays: 30
|
||||
closeComment: "This issue has been closed because it needs more information and has not had recent activity."
|
||||
pingDays: 80
|
||||
pingDays: 14
|
||||
pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information."
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Question Closer - debugger
|
||||
on:
|
||||
schedule:
|
||||
- cron: 20 11 * * * # Run at 11:20 AM UTC (3:20 AM PST, 4:20 AM PDT)
|
||||
- cron: 0 14 * * * # Run at 2:00 PM UTC (6:00 AM PST, 7:00 AM PDT)
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
readonly:
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
@@ -21,7 +23,7 @@ jobs:
|
||||
with:
|
||||
readonly: ${{ github.event.inputs.readonly }}
|
||||
labels: question,debugger
|
||||
ignoreLabels: language service,internal
|
||||
ignoreLabels: Language Service,internal
|
||||
involves: wardengnaw,pieandcakes,calgagi
|
||||
closeDays: 14
|
||||
closeComment: "This issue has been closed because it is a question and has not had recent activity."
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
name: $(date:yyyyMMdd)$(rev:.r)
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- release
|
||||
|
||||
schedules:
|
||||
- cron: 30 5 * * 0
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
always: true
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: MicroBuildTemplate
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/MicroBuildTemplate
|
||||
ref: refs/tags/release
|
||||
|
||||
variables:
|
||||
- name: Codeql.Enabled
|
||||
value: true
|
||||
- name: Codeql.Language
|
||||
value: javascript
|
||||
|
||||
extends:
|
||||
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
|
||||
parameters:
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
sdl:
|
||||
sourceAnalysisPool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
tsa:
|
||||
enabled: true
|
||||
config:
|
||||
tsaVersion: TsaV2
|
||||
codebase: NewOrUpdate
|
||||
codebaseName: vscode-cpptools
|
||||
tsaStamp: $(TsaProjectName)
|
||||
tsaEnvironment: PROD
|
||||
notificationAliases: $(TsaNotificationAlias)
|
||||
codebaseAdmins: $(TsaCodebaseAdmins)
|
||||
instanceUrl: $(TsaInstanceUrl)
|
||||
projectName: $(TsaProjectName)
|
||||
areaPath: $(TsaAreaPath)
|
||||
iterationPath: $(TsaIterationPath)
|
||||
alltools: true
|
||||
repositoryName: vscode-cpptools
|
||||
policheck:
|
||||
enabled: true
|
||||
featureFlags:
|
||||
autoBaseline: false
|
||||
|
||||
stages:
|
||||
- stage: build
|
||||
jobs:
|
||||
- job: Phase_1
|
||||
displayName: Build cpptools.vsix
|
||||
timeoutInMinutes: 60
|
||||
cancelTimeoutInMinutes: 1
|
||||
templateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
displayName: 'cpptools.vsix'
|
||||
condition: succeeded()
|
||||
targetPath: $(Build.ArtifactStagingDirectory)\Extension
|
||||
artifactName: cpptools.vsix
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
||||
displayName: Use Yarn 1.x
|
||||
|
||||
- task: UseNode@1
|
||||
displayName: Use Node 22.x
|
||||
inputs:
|
||||
version: 22.x
|
||||
|
||||
- script: IF EXIST %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc del %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc
|
||||
displayName: Delete .npmrc if it exists
|
||||
|
||||
- task: Npm@0
|
||||
displayName: Install vsce
|
||||
inputs:
|
||||
arguments: --global @vscode/vsce
|
||||
|
||||
- script: mkdir $(Build.ArtifactStagingDirectory)\Extension
|
||||
displayName: Create Extension Staging Directory
|
||||
|
||||
- script: yarn run vsix-prepublish
|
||||
displayName: Build files
|
||||
workingDirectory: $(Build.SourcesDirectory)\Extension
|
||||
|
||||
- script: |
|
||||
cd $(Build.SourcesDirectory)\Extension
|
||||
vsce package --yarn -o $(Build.ArtifactStagingDirectory)\Extension\cpptools.vsix
|
||||
name: ProcessRunner_12
|
||||
displayName: Run VSCE to package vsix
|
||||
|
||||
- task: Npm@0
|
||||
displayName: Uninstall vsce
|
||||
inputs:
|
||||
command: uninstall
|
||||
arguments: --global @vscode/vsce
|
||||
@@ -2,11 +2,14 @@
|
||||
# Pipeline for VsCodeExtension-Localization build definition
|
||||
# Runs OneLocBuild task to localize xlf file
|
||||
# ==================================================================================
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: self
|
||||
clean: true
|
||||
- repository: MicroBuildTemplate
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/MicroBuildTemplate
|
||||
ref: refs/tags/release
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
@@ -18,45 +21,72 @@ schedules:
|
||||
- main
|
||||
always: true
|
||||
|
||||
pool:
|
||||
name: 'AzurePipelines-EO'
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesWindows2022compliant
|
||||
variables:
|
||||
TeamName: cpptools
|
||||
Codeql.Language: javascript
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '16.x'
|
||||
displayName: 'Install Node.js'
|
||||
extends:
|
||||
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
|
||||
parameters:
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
sdl:
|
||||
sourceAnalysisPool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
stages:
|
||||
- stage: stage
|
||||
jobs:
|
||||
- job: job
|
||||
templateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)'
|
||||
artifactName: 'drop'
|
||||
publishLocation: 'Container'
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '22.x'
|
||||
displayName: 'Install Node.js'
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: 'cd Extension && yarn install'
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: 'cd Extension && yarn install'
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: 'cd ./Extension && yarn run translations-export && cd ..'
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: 'cd ./Extension && yarn run translations-export && cd ..'
|
||||
|
||||
- task: OneLocBuild@2
|
||||
env:
|
||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||
inputs:
|
||||
locProj: 'Build/loc/LocProject.json'
|
||||
outDir: '$(Build.ArtifactStagingDirectory)'
|
||||
isCreatePrSelected: false
|
||||
prSourceBranchPrefix: 'locfiles'
|
||||
packageSourceAuth: 'patAuth'
|
||||
patVariable: '$(OneLocBuildPat)'
|
||||
LclSource: lclFilesfromPackage
|
||||
LclPackageId: 'LCL-JUNO-PROD-VCPP'
|
||||
lsBuildXLocPackageVersion: '7.0.30510'
|
||||
# Requires Azure client 2.x
|
||||
- task: AzureCLI@2
|
||||
displayName: 'Set OneLocBuildToken'
|
||||
enabled: true
|
||||
inputs:
|
||||
azureSubscription: '$(AzureSubscription)' # Azure DevOps service connection
|
||||
scriptType: 'pscore'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
$token = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv
|
||||
Write-Host "##vso[task.setvariable variable=AzDO.OneLocBuildToken;issecret=true]${token}"
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: 'cd Extension && node ./translations_auto_pr.js microsoft vscode-cpptools csigs $(csigsPat) csigs [email protected] "$(Build.ArtifactStagingDirectory)/loc" vscode-extensions-localization-export/vscode-extensions && cd ..'
|
||||
- task: OneLocBuild@2
|
||||
env:
|
||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||
inputs:
|
||||
locProj: 'Build/loc/LocProject.json'
|
||||
outDir: '$(Build.ArtifactStagingDirectory)'
|
||||
isCreatePrSelected: false
|
||||
prSourceBranchPrefix: 'locfiles'
|
||||
packageSourceAuth: 'patAuth'
|
||||
patVariable: '$(AzDO.OneLocBuildToken)'
|
||||
LclSource: lclFilesfromPackage
|
||||
LclPackageId: 'LCL-JUNO-PROD-VCPP'
|
||||
lsBuildXLocPackageVersion: '7.0.30510'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
ArtifactName: 'drop'
|
||||
publishLocation: 'Container'
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: 'cd Extension && node ./translations_auto_pr.js microsoft vscode-cpptools csigs $(csigsPat) csigs [email protected] "$(Build.ArtifactStagingDirectory)/loc" vscode-extensions-localization-export/vscode-extensions && cd ..'
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
name: $(date:yyyyMMdd)$(rev:.r)
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
parameters:
|
||||
- name: verifyVersion
|
||||
displayName: Attest version in package.json is correct
|
||||
type: boolean
|
||||
default: false
|
||||
- name: verifyReadme
|
||||
displayName: Attest README.md is updated
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: MicroBuildTemplate
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/MicroBuildTemplate
|
||||
ref: refs/tags/release
|
||||
|
||||
extends:
|
||||
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
|
||||
parameters:
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
sdl:
|
||||
sourceAnalysisPool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
|
||||
stages:
|
||||
- stage: package
|
||||
jobs:
|
||||
# Introduce pipeline compilation errors to block scheduling if the requisite parameters are not set
|
||||
- ${{ if not(eq(parameters.verifyVersion, true)) }}:
|
||||
- 'The version in package.json should be updated before scheduling the pipeline.'
|
||||
|
||||
- ${{ if not(eq(parameters.verifyReadme, true)) }}:
|
||||
- 'README.md should be updated before scheduling the pipeline.'
|
||||
|
||||
- template: /Build/package/jobs_package_vsix.yml@self
|
||||
parameters:
|
||||
vsixName: cpptools-extension-pack.vsix
|
||||
srcDir: ExtensionPack
|
||||
@@ -0,0 +1,48 @@
|
||||
name: $(date:yyyyMMdd)$(rev:.r)
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
parameters:
|
||||
- name: verifyVersion
|
||||
displayName: Attest version in package.json is correct
|
||||
type: boolean
|
||||
default: false
|
||||
- name: verifyReadme
|
||||
displayName: Attest README.md is updated
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: MicroBuildTemplate
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/MicroBuildTemplate
|
||||
ref: refs/tags/release
|
||||
|
||||
extends:
|
||||
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
|
||||
parameters:
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
sdl:
|
||||
sourceAnalysisPool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
|
||||
stages:
|
||||
- stage: package
|
||||
jobs:
|
||||
# Introduce pipeline compilation errors to block scheduling if the requisite parameters are not set
|
||||
- ${{ if not(eq(parameters.verifyVersion, true)) }}:
|
||||
- 'The version in package.json should be updated before scheduling the pipeline.'
|
||||
|
||||
- ${{ if not(eq(parameters.verifyReadme, true)) }}:
|
||||
- 'README.md should be updated before scheduling the pipeline.'
|
||||
|
||||
- template: /Build/package/jobs_package_vsix.yml@self
|
||||
parameters:
|
||||
vsixName: cpptools-themes.vsix
|
||||
srcDir: Themes
|
||||
@@ -0,0 +1,49 @@
|
||||
parameters:
|
||||
- name: vsixName
|
||||
type: string
|
||||
default: ''
|
||||
- name: srcDir
|
||||
type: string
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
- job: package
|
||||
displayName: Build ${{ parameters.vsixName }}
|
||||
timeoutInMinutes: 30
|
||||
cancelTimeoutInMinutes: 1
|
||||
templateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
displayName: '${{ parameters.vsixName }}'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)\vsix
|
||||
artifactName: vsix
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
|
||||
- task: UseNode@1
|
||||
displayName: Use Node 22.x
|
||||
inputs:
|
||||
version: 22.x
|
||||
|
||||
- task: Npm@0
|
||||
displayName: Install vsce
|
||||
inputs:
|
||||
arguments: --global @vscode/vsce
|
||||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
||||
displayName: Use Yarn 1.x
|
||||
|
||||
- script: mkdir $(Build.ArtifactStagingDirectory)\vsix
|
||||
displayName: Create Staging Directory
|
||||
|
||||
- script: |
|
||||
cd $(Build.SourcesDirectory)\${{ parameters.srcDir }}
|
||||
vsce package -o $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}
|
||||
displayName: Run VSCE to package vsix
|
||||
|
||||
- task: Npm@0
|
||||
displayName: Uninstall vsce
|
||||
inputs:
|
||||
command: uninstall
|
||||
arguments: --global @vscode/vsce
|
||||
@@ -0,0 +1,43 @@
|
||||
name: $(Date:yyyyMMdd)$(rev:.r)
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: MicroBuildTemplate
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/MicroBuildTemplate
|
||||
ref: refs/tags/release
|
||||
pipelines:
|
||||
- pipeline: vsixBuild
|
||||
source: '\VC\VSCode\CpptoolsVSIX\Package cpptools-extension-pack'
|
||||
trigger: true
|
||||
|
||||
extends:
|
||||
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
|
||||
parameters:
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
sdl:
|
||||
sourceAnalysisPool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
|
||||
stages:
|
||||
- stage: Validate
|
||||
jobs:
|
||||
- template: /Build/publish/jobs_manual_validation.yml@self
|
||||
parameters:
|
||||
notifyUsers: $(NotifyUsers)
|
||||
releaseBuildUrl: $(ReleaseBuildUrl)
|
||||
|
||||
- stage: Release
|
||||
dependsOn: Validate
|
||||
jobs:
|
||||
- template: /Build/publish/jobs_publish_vsix.yml@self
|
||||
parameters:
|
||||
vsixName: cpptools-extension-pack.vsix
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
name: $(Date:yyyyMMdd)$(rev:.r)
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: MicroBuildTemplate
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/MicroBuildTemplate
|
||||
ref: refs/tags/release
|
||||
pipelines:
|
||||
- pipeline: vsixBuild
|
||||
source: '\VC\VSCode\CpptoolsVSIX\Package cpptools-themes'
|
||||
trigger: true
|
||||
|
||||
extends:
|
||||
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
|
||||
parameters:
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
sdl:
|
||||
sourceAnalysisPool:
|
||||
name: AzurePipelines-EO
|
||||
image: AzurePipelinesWindows2022compliantGPT
|
||||
os: windows
|
||||
|
||||
stages:
|
||||
- stage: Validate
|
||||
jobs:
|
||||
- template: /Build/publish/jobs_manual_validation.yml@self
|
||||
parameters:
|
||||
notifyUsers: $(NotifyUsers)
|
||||
releaseBuildUrl: $(ReleaseBuildUrl)
|
||||
|
||||
- stage: Release
|
||||
dependsOn: Validate
|
||||
jobs:
|
||||
- template: /Build/publish/jobs_publish_vsix.yml@self
|
||||
parameters:
|
||||
vsixName: cpptools-themes.vsix
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
parameters:
|
||||
- name: notifyUsers
|
||||
type: string
|
||||
default: ''
|
||||
- name: releaseBuildUrl
|
||||
type: string
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
- job: WaitForValidation
|
||||
displayName: Wait for VSIX validation
|
||||
pool: server
|
||||
steps:
|
||||
- task: ManualValidation@0
|
||||
displayName: "Manual Validation"
|
||||
inputs:
|
||||
notifyUsers: $(notifyUsers)
|
||||
instructions: |
|
||||
Download and test the vsix from the latest release build: $(releaseBuildUrl)
|
||||
@@ -0,0 +1,44 @@
|
||||
parameters:
|
||||
- name: vsixName
|
||||
type: string
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
- job: Publish
|
||||
displayName: Publish to Marketplace
|
||||
templateContext:
|
||||
type: releaseJob
|
||||
isProduction: true
|
||||
inputs:
|
||||
- input: pipelineArtifact
|
||||
pipeline: vsixBuild
|
||||
artifactName: vsix
|
||||
targetPath: $(Build.StagingDirectory)\vsix
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
displayName: Use Node 22.x
|
||||
inputs:
|
||||
versionSpec: 22.x
|
||||
|
||||
- task: Npm@0
|
||||
displayName: Install vsce
|
||||
inputs:
|
||||
arguments: --global @vscode/vsce
|
||||
|
||||
- task: AzureCLI@2
|
||||
displayName: Generate AAD_TOKEN
|
||||
inputs:
|
||||
azureSubscription: $(AzureSubscription)
|
||||
scriptType: ps
|
||||
scriptLocation: inlineScript
|
||||
inlineScript: |
|
||||
$aadToken = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv
|
||||
Write-Host "##vso[task.setvariable variable=AAD_TOKEN;issecret=true]$aadToken"
|
||||
|
||||
- script: |
|
||||
vsce publish --packagePath $(Build.StagingDirectory)\vsix\${{ parameters.vsixName }}
|
||||
displayName: Publish to Marketplace
|
||||
env:
|
||||
VSCE_PAT: $(AAD_TOKEN)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="SignFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<BaseOutputDirectory>$(BUILD_STAGINGDIRECTORY)/Extension</BaseOutputDirectory>
|
||||
<!-- These properties are required by MicroBuild, which only signs files that are under these paths -->
|
||||
<IntermediateOutputPath>$(BaseOutputDirectory)</IntermediateOutputPath>
|
||||
<OutDir>$(BaseOutputDirectory)</OutDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Because of Webpack bundling, these are the only shipping Javascript files.
|
||||
There are no third-party files to sign because they've all been bundled. -->
|
||||
<FilesToSign Include="$(OutDir)\dist\src\main.js;$(OutDir)\dist\ui\settings.js">
|
||||
<Authenticode>Microsoft400</Authenticode>
|
||||
</FilesToSign>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="SignFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<BaseOutputDirectory>$(BUILD_STAGINGDIRECTORY)</BaseOutputDirectory>
|
||||
<!-- These properties are required by MicroBuild, which only signs files that are under these paths -->
|
||||
<IntermediateOutputPath>$(BaseOutputDirectory)</IntermediateOutputPath>
|
||||
<OutDir>$(BaseOutputDirectory)</OutDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToSign Include="$(OutDir)\vsix\cpptools-*.signature.p7s">
|
||||
<Authenticode>VSCodePublisher</Authenticode>
|
||||
</FilesToSign>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.VisualStudioEng.MicroBuild.Core" version="0.4.1" developmentDependency="true" />
|
||||
</packages>
|
||||
@@ -0,0 +1,8 @@
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
|
||||
# These owners will be the default owners for everything in
|
||||
# the repo. Unless a later match takes precedence,
|
||||
# @microsoft/cpptools-maintainers will be requested for
|
||||
# review when someone opens a pull request.
|
||||
|
||||
* @microsoft/cpptools-maintainers
|
||||
+2
-1
@@ -6,4 +6,5 @@ Resources:
|
||||
|
||||
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
|
||||
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
||||
- Contact [[email protected]](mailto:[email protected]) with questions or concerns
|
||||
- Contact [[email protected]](mailto:[email protected]) with questions or concerns
|
||||
- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support)
|
||||
+22
-1
@@ -5,7 +5,7 @@
|
||||
* [Build and debug the extension](Documentation/Building%20the%20Extension.md).
|
||||
* File an [issue](https://github.com/Microsoft/vscode-cpptools/issues) and a [pull request](https://github.com/Microsoft/vscode-cpptools/pulls) with the change and we will review it.
|
||||
* If the change affects functionality, add a line describing the change to [**CHANGELOG.md**](Extension/CHANGELOG.md).
|
||||
* Try and add a test in [**test/extension.test.ts**](Extension/test/unitTests/extension.test.ts).
|
||||
* Try and add a test in [**test/extension.test.ts**](Extension/test/scenarios/SingleRootProject/tests/extension.test.ts).
|
||||
* Run tests via opening the [**Extension**](https://github.com/Microsoft/vscode-cpptools/tree/main/Extension) folder in Visual Studio Code, selecting the "Launch Tests" configuration in the Debug pane, and choosing "Start Debugging".
|
||||
|
||||
## About the Code
|
||||
@@ -33,3 +33,24 @@ const localize: nls.LocalizeFunc = nls.loadMessageBundle();
|
||||
const readmeMessage: string = localize("refer.read.me", "Please refer to {0} for troubleshooting information. Issues can be created at {1}", readmePath, "https://github.com/Microsoft/vscode-cpptools/issues");
|
||||
```
|
||||
* The first parameter to localize should be a unique key for that string, not used by any other call to localize() in the file unless representing the same string. The second parameter is the string to localize. Both of these parameters must be string literals. Tokens such as {0} and {1} are supported in the localizable string, with replacement values passed as additional parameters to localize().
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to
|
||||
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
|
||||
and actually do, grant us the rights to use your contribution. For details, visit
|
||||
https://cla.microsoft.com.
|
||||
|
||||
When you submit a pull request, a CLA-bot will automatically determine whether you need
|
||||
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
|
||||
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
||||
or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
|
||||
|
||||
### Adding/Updating package.json dependencies
|
||||
|
||||
We maintain a public Azure Artifacts feed that we point the package manager to in .npmrc files. If you want to add a dependency or update a version in package.json, you may need to contact us so we can add it to our feed. Please ping our team in a PR or new issue if you experience this issue.
|
||||
|
||||
For local development, you can delete the .npmrc file and the matching `yarn.lock` file while you wait for us to update the feed. However, these changes will need to be reverted in your branch before we will accept a PR.
|
||||
+2
-15
@@ -21,21 +21,9 @@ module.exports = {
|
||||
"eslint-plugin-jsdoc",
|
||||
"@typescript-eslint/eslint-plugin",
|
||||
"eslint-plugin-import",
|
||||
"eslint-plugin-header",
|
||||
"etc"
|
||||
"eslint-plugin-header"
|
||||
],
|
||||
"rules": {
|
||||
"indent": [
|
||||
"warn",
|
||||
4,
|
||||
{
|
||||
"SwitchCase": 1,
|
||||
"ObjectExpression": "first"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/indent": [
|
||||
"error", 4
|
||||
],
|
||||
"@typescript-eslint/adjacent-overload-signatures": "error",
|
||||
"@typescript-eslint/array-type": "error",
|
||||
"@typescript-eslint/await-thenable": "error",
|
||||
@@ -84,7 +72,6 @@ module.exports = {
|
||||
"@typescript-eslint/prefer-function-type": "error",
|
||||
"@typescript-eslint/prefer-namespace-keyword": "error",
|
||||
"@typescript-eslint/semi": "error",
|
||||
"etc/no-commented-out-code": "error",
|
||||
"@typescript-eslint/triple-slash-reference": "error",
|
||||
"@typescript-eslint/type-annotation-spacing": "error",
|
||||
"@typescript-eslint/unified-signatures": "error",
|
||||
@@ -92,7 +79,7 @@ module.exports = {
|
||||
"@typescript-eslint/method-signature-style": ["error", "method"],
|
||||
"@typescript-eslint/space-infix-ops": "error",
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
|
||||
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
|
||||
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
||||
"arrow-body-style": "error",
|
||||
"comma-dangle": "error",
|
||||
|
||||
@@ -10,10 +10,10 @@ server
|
||||
debugAdapters
|
||||
LLVM
|
||||
bin/cpptools*
|
||||
bin/libc.so
|
||||
bin/*.dll
|
||||
bin/.vs
|
||||
bin/LICENSE.txt
|
||||
bin/rg*
|
||||
|
||||
# ignore lock files
|
||||
install.lock
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
registry=https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/
|
||||
always-auth=true
|
||||
@@ -1,60 +0,0 @@
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All Rights Reserved.
|
||||
* See 'LICENSE' in the project root for license information.
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
import { parse } from 'semver';
|
||||
import { $root, $switches, cyan, glob, green, note, updateFiles } from './common';
|
||||
import { extensionsDir, installExtension, uninstallExtension } from './vscode';
|
||||
|
||||
export async function install(version: string) {
|
||||
if (!version || parse(version)) {
|
||||
note(`Attempting to install binaries from published vsix (${version ? version : $switches.includes('--pre-release') ? 'latest pre-release' : 'latest'})`);
|
||||
}
|
||||
// install it in the isolated vscodearea
|
||||
note("Temporarily installing vscode-cpptools extension");
|
||||
const { id, ver } = await installExtension('ms-vscode.cpptools', version);
|
||||
|
||||
// grab the binaries out
|
||||
let files = [] as string[];
|
||||
|
||||
files.push(...await glob(`${extensionsDir}/${id}-${ver}*/bin/cpptools*`));
|
||||
files.push(...await glob(`${extensionsDir}/${id}-${ver}*/bin/*.dll`));
|
||||
files.push(...await glob(`${extensionsDir}/${id}-${ver}*/bin/*.exe`));
|
||||
|
||||
files.push(...await glob(`${extensionsDir}/${id}-${ver}*/LLVM/**`));
|
||||
files.push(...await glob(`${extensionsDir}/${id}-${ver}*/debugAdapters/**`));
|
||||
files = [...new Set(files)];
|
||||
const extensionFolder = files[0].replace(/.bin.cpptools.*$/g, '');
|
||||
note(`Copying files from vscode-cpptools extension ${ver} in '${extensionFolder}'`);
|
||||
await updateFiles(files, $root, extensionFolder);
|
||||
|
||||
// remove the extension fromthe isolated vscode
|
||||
note("Removing temporary vscode-cpptools extension");
|
||||
await uninstallExtension('ms-vscode.cpptools');
|
||||
|
||||
}
|
||||
|
||||
export async function installbuild() {
|
||||
//*
|
||||
// cpptools-srv.exe
|
||||
// cpptools-vcpkgsrv.exe
|
||||
// cpptools.exe
|
||||
// vcpkgsrvtest.exe
|
||||
// xobjgen.exe
|
||||
|
||||
// search relative for the vcpkgsrv
|
||||
//
|
||||
// (grep --iglob **/vcpkgsrv/cpptools-vcpkgsrv.exe --max-depth 5 --ignore-case --files ../../ | Resolve-Path).Path
|
||||
|
||||
// base folder:
|
||||
// ((grep --iglob **/vcpkgsrv/cpptools-vcpkgsrv.exe --max-depth 7 --ignore-case --files ../../) -replace "designtime.*",'' | Resolve-Path).Path
|
||||
// typical locations for binaries
|
||||
// ../../build/debug
|
||||
//
|
||||
}
|
||||
|
||||
export async function main() {
|
||||
console.log(`use ${green(`yarn binary install ${cyan('[version] [--pre-release]')}`)}`);
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import { $args, $root, $scenario, assertAnyFile, brightGreen, gray, green, pwd }
|
||||
|
||||
import { resolve } from 'path';
|
||||
import { getTestInfo } from '../test/common/selectTests';
|
||||
import { environment, install, options } from "./vscode";
|
||||
import { install, options } from "./vscode";
|
||||
|
||||
export { install, reset } from './vscode';
|
||||
|
||||
@@ -33,8 +33,10 @@ export async function main() {
|
||||
//verbose(`Installing release version of 'ms-vscode.cpptools'`);
|
||||
//spawnSync(cli, [...args, '--install-extension', 'ms-vscode.cpptools'], { encoding: 'utf-8', stdio: 'ignore' })
|
||||
verbose(green('Launch VSCode'));
|
||||
const ARGS = [...args, ...options.launchArgs.filter(each => !each.startsWith('--extensions-dir=') && !each.startsWith('--user-data-dir=')), `--extensionDevelopmentPath=${$root}`, ...$args ];
|
||||
verbose(gray(`${cli}\n ${ [...ARGS ].join('\n ')}`));
|
||||
const ARGS = [...args, ...options.launchArgs.filter(each => !each.startsWith('--extensions-dir=') && !each.startsWith('--user-data-dir=')), `--extensionDevelopmentPath=${$root}`, ...$args ].map(each => (each.indexOf(' ') > -1) && (each.indexOf('"') === -1) ? `"${each}"` : each);
|
||||
const CLI = cli.indexOf(' ') > -1 && cli.indexOf('"') === -1 ? `"${cli}"` : cli;
|
||||
|
||||
spawnSync(cli, ARGS, { encoding: 'utf-8', stdio: 'ignore', env:environment()});
|
||||
verbose(gray(`${CLI}\n ${ [...ARGS ].join('\n ')}`));
|
||||
|
||||
spawnSync(CLI, ARGS, { encoding: 'utf-8', stdio: 'ignore', env: { ...process.env, DONT_PROMPT_WSL_INSTALL:"1" }, shell: true });
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ export const Git = async (...args: Parameters<Awaited<CommandFunction>>) => (awa
|
||||
export const GitClean = async (...args: Parameters<Awaited<CommandFunction>>) => (await new Command(await git, 'clean'))(...args);
|
||||
|
||||
export async function getModifiedIgnoredFiles() {
|
||||
const {code, error, stdio } = await GitClean('-Xd', '-n');
|
||||
const { code, error, stdio } = await GitClean('-Xd', '-n');
|
||||
if (code) {
|
||||
throw new Error(`\n${error.all().join('\n')}`);
|
||||
}
|
||||
@@ -65,11 +65,11 @@ export async function rimraf(...paths: string[]) {
|
||||
}
|
||||
if (await filepath.isFolder(each)) {
|
||||
verbose(`Removing folder ${red(each)}`);
|
||||
all.push(rm(each, {recursive: true, force: true}));
|
||||
all.push(rm(each, { recursive: true, force: true }));
|
||||
continue;
|
||||
}
|
||||
verbose(`Removing file ${red(each)}`);
|
||||
all.push(rm(each, {force: true}));
|
||||
all.push(rm(each, { force: true }));
|
||||
}
|
||||
await Promise.all(all);
|
||||
}
|
||||
@@ -119,17 +119,13 @@ export async function write(filePath: string, data: Buffer | string) {
|
||||
await writeFile(filePath, data);
|
||||
}
|
||||
|
||||
export async function updateFiles(files: string[], dest: string | Promise<string>, prefix?: string) {
|
||||
export async function updateFiles(files: string[], dest: string | Promise<string>) {
|
||||
const target = is.promise(dest) ? await dest : dest;
|
||||
await Promise.all(files.map(async (each) => {
|
||||
const sourceFile = await filepath.isFile(each, $root);
|
||||
if (sourceFile) {
|
||||
const targetFile = prefix ? resolve(target, each.replace(prefix, '.')) : resolve(target, each);
|
||||
try {
|
||||
await write(targetFile, await readFile(sourceFile));
|
||||
} catch (e) {
|
||||
verbose(`Error during update of '${targetFile}' ${e} `);
|
||||
}
|
||||
const targetFile = resolve(target, each);
|
||||
await write(targetFile, await readFile(sourceFile));
|
||||
}
|
||||
}));
|
||||
}
|
||||
@@ -139,7 +135,7 @@ export async function go() {
|
||||
// loop through the args and pick out the first non --arg and remove it from the $args and set $cmd
|
||||
for (let i = 0; i < $args.length; i++) {
|
||||
const each = $args[i];
|
||||
if (require.main.exports[each]) {
|
||||
if (!each.startsWith('--') && require.main.exports[each]) {
|
||||
$cmd = each;
|
||||
$args.splice(i, 1);
|
||||
break;
|
||||
@@ -329,6 +325,7 @@ export async function checkDTS() {
|
||||
let failing = false;
|
||||
failing = !await assertAnyFile('vscode.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.d.ts is missing.`)) || failing;
|
||||
failing = !await assertAnyFile('vscode.proposed.terminalDataWriteEvent.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.proposed.terminalDataWriteEvent.d.ts is missing.`)) || failing;
|
||||
failing = !await assertAnyFile('vscode.proposed.lmTools.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.proposed.lmTools.d.ts is missing.`)) || failing;
|
||||
|
||||
if (!failing) {
|
||||
verbose('VSCode d.ts files appear to be in place.');
|
||||
@@ -337,6 +334,9 @@ export async function checkDTS() {
|
||||
}
|
||||
|
||||
export async function checkBinaries() {
|
||||
if ($switches.includes('--skipCheckBinaries')) {
|
||||
return false;
|
||||
}
|
||||
let failing = false;
|
||||
failing = !await assertAnyFile(['bin/cpptools.exe', 'bin/cpptools']) && (quiet || warn(`The native binary files are not present. You should either build or install the native binaries\n\n.`)) || failing;
|
||||
|
||||
@@ -346,54 +346,14 @@ export async function checkBinaries() {
|
||||
return failing;
|
||||
}
|
||||
|
||||
const sowrite = process.stdout.write.bind(process.stdout) as (...args: unknown[]) => boolean;
|
||||
const sewrite = process.stderr.write.bind(process.stderr) as (...args: unknown[]) => boolean;
|
||||
export async function checkProposals() {
|
||||
let failing = false;
|
||||
|
||||
const filters = [
|
||||
/^\[(.*)\].*/,
|
||||
/^Unexpected token A/,
|
||||
/Cannot register 'cmake.cmakePath'/,
|
||||
/\[DEP0005\] DeprecationWarning/,
|
||||
/--trace-deprecation/,
|
||||
/Iconv-lite warning/,
|
||||
/^Found existing install/
|
||||
];
|
||||
await rm(`${$root}/vscode.proposed.chatParticipantAdditions.d.ts`);
|
||||
failing = await assertAnyFile('vscode.proposed.chatParticipantAdditions.d.ts') && (quiet || warn(`The VSCode import file '${$root}/vscode.proposed.chatParticipantAdditions.d.ts' should not be present.`)) || failing;
|
||||
|
||||
// remove unwanted messages from stdio
|
||||
function filterStdio() {
|
||||
process.stdout.write = function (...args: unknown[]) {
|
||||
if (typeof args[0] === 'string') {
|
||||
const text = args[0];
|
||||
|
||||
if (filters.some(each => text.match(each))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (args[0] instanceof Buffer) {
|
||||
const text = args[0].toString();
|
||||
if (filters.some(each => text.match(each))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return sowrite(...args);
|
||||
};
|
||||
|
||||
process.stderr.write = function (...args: unknown[]) {
|
||||
if (typeof args[0] === 'string') {
|
||||
const text = args[0];
|
||||
|
||||
if (filters.some(each => text.match(each))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (args[0] instanceof Buffer) {
|
||||
const text = args[0].toString();
|
||||
if (filters.some(each => text.match(each))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return sewrite(...args);
|
||||
};
|
||||
if (!failing) {
|
||||
verbose('VSCode proposals appear to be in place.');
|
||||
}
|
||||
return failing;
|
||||
}
|
||||
|
||||
filterStdio();
|
||||
|
||||
@@ -19,11 +19,63 @@ import { install, isolated, options } from './vscode';
|
||||
|
||||
export { install, reset } from './vscode';
|
||||
|
||||
const sowrite = process.stdout.write.bind(process.stdout) as (...args: unknown[]) => boolean;
|
||||
const sewrite = process.stderr.write.bind(process.stderr) as (...args: unknown[]) => boolean;
|
||||
|
||||
const filters = [
|
||||
/^\[(.*)\].*/,
|
||||
/^Unexpected token A/,
|
||||
/Cannot register 'cmake.cmakePath'/,
|
||||
/\[DEP0005\] DeprecationWarning/,
|
||||
/--trace-deprecation/,
|
||||
/Iconv-lite warning/,
|
||||
/^Extension '/,
|
||||
/^Found existing install/
|
||||
];
|
||||
|
||||
// remove unwanted messages from stdio
|
||||
function filterStdio() {
|
||||
process.stdout.write = function (...args: unknown[]) {
|
||||
if (typeof args[0] === 'string') {
|
||||
const text = args[0];
|
||||
|
||||
if (filters.some(each => text.match(each))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (args[0] instanceof Buffer) {
|
||||
const text = args[0].toString();
|
||||
if (filters.some(each => text.match(each))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return sowrite(...args);
|
||||
};
|
||||
|
||||
process.stderr.write = function (...args: unknown[]) {
|
||||
if (typeof args[0] === 'string') {
|
||||
const text = args[0];
|
||||
|
||||
if (filters.some(each => text.match(each))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (args[0] instanceof Buffer) {
|
||||
const text = args[0].toString();
|
||||
if (filters.some(each => text.match(each))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return sewrite(...args);
|
||||
};
|
||||
}
|
||||
|
||||
filterStdio();
|
||||
|
||||
async function unitTests() {
|
||||
await assertAnyFolder('dist/test/unit', `The folder '${$root}/dist/test/unit is missing. You should run ${brightGreen("yarn compile")}\n\n`);
|
||||
const mocha = await assertAnyFile(["node_modules/.bin/mocha.cmd", "node_modules/.bin/mocha"], `Can't find the mocha testrunner. You might need to run ${brightGreen("yarn install")}\n\n`);
|
||||
const result = spawnSync(mocha, [`${$root}/dist/test/unit/**/*.test.js`, '--timeout', '30000'], { stdio:'inherit'});
|
||||
|
||||
const result = spawnSync(mocha, [`${$root}/dist/test/unit/**/*.test.js`, '--timeout', '30000'], { stdio:'inherit', shell: true });
|
||||
verbose(`\n${green("NOTE:")} If you want to run a scenario test (end-to-end) use ${cmdSwitch('scenario=<NAME>')} \n\n`);
|
||||
return result.status;
|
||||
}
|
||||
@@ -38,8 +90,7 @@ async function scenarioTests(assets: string, name: string, workspace: string) {
|
||||
extensionTestsPath: resolve($root, 'dist/test/common/selectTests'),
|
||||
launchArgs: workspace ? [...options.launchArgs, workspace] : options.launchArgs,
|
||||
extensionTestsEnv: {
|
||||
SCENARIO: assets,
|
||||
DONT_PROMPT_WSL_INSTALL:"1"
|
||||
SCENARIO: assets
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "Node16",
|
||||
"module": "node16",
|
||||
"moduleResolution": "node16",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* See 'LICENSE' in the project root for license information.
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
import { checkBinaries, checkCompiled, checkDTS, checkPrep, error, green } from './common';
|
||||
import { checkBinaries, checkCompiled, checkDTS, checkPrep, checkProposals, error, green } from './common';
|
||||
const quiet = process.argv.includes('--quiet');
|
||||
|
||||
export async function main() {
|
||||
@@ -50,3 +50,12 @@ export async function dts() {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
export async function proposals() {
|
||||
let failing = false;
|
||||
failing = (await checkProposals() && (quiet || error(`Issue with VSCode proposals. Run ${green('yarn prep')} to fix it.`))) || failing;
|
||||
|
||||
if (failing) {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,16 +3,12 @@
|
||||
* See 'LICENSE' in the project root for license information.
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-dynamic-delete */
|
||||
|
||||
import { downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath } from '@vscode/test-electron';
|
||||
import { fail } from 'assert';
|
||||
import { spawnSync } from 'child_process';
|
||||
import { createHash } from 'crypto';
|
||||
import { tmpdir } from 'os';
|
||||
import { resolve } from 'path';
|
||||
import { verbose } from '../src/Utility/Text/streams';
|
||||
import { $switches, error, mkdir, readJson, rimraf, write } from './common';
|
||||
import { mkdir, readJson, rimraf, write } from './common';
|
||||
|
||||
export const isolated = resolve(tmpdir(), '.vscode-test', createHash('sha256').update(__dirname).digest('hex').substring(0, 6));
|
||||
export const extensionsDir = resolve(isolated, 'extensions');
|
||||
@@ -56,57 +52,7 @@ export async function install() {
|
||||
} catch (err: unknown) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
export async function installExtension(name: string, version?: string) {
|
||||
// eslint-disable-next-line prefer-const
|
||||
let {cli, args} = await install();
|
||||
args = [...args, '--install-extension', version ? `${name}@${version}` : name ];
|
||||
if ($switches.includes('--pre-release')) {
|
||||
args.push('--pre-release');
|
||||
}
|
||||
verbose({cli, args});
|
||||
const result = spawnSync(cli, args, { encoding: 'utf-8', stdio: 'pipe', env:environment()});
|
||||
verbose(result.stdout);
|
||||
if (!result.status){
|
||||
for (const line of result.output){
|
||||
const [,id, ver] = /Extension '(.*)' v(.*?)\s/g.exec(line) ?? [];
|
||||
if (id) {
|
||||
return {id, ver};
|
||||
}
|
||||
}
|
||||
}
|
||||
error(result.stderr);
|
||||
fail('Failed to install extension');
|
||||
}
|
||||
|
||||
export async function uninstallExtension(name: string) {
|
||||
// eslint-disable-next-line prefer-const
|
||||
let {cli, args} = await install();
|
||||
args = [...args, '--uninstall-extension', name];
|
||||
|
||||
const result = spawnSync(cli, args, { encoding: 'utf-8', stdio: 'pipe', env:environment()});
|
||||
if (!result.status){
|
||||
for (const line of result.output){
|
||||
const [,id, ver] = /Extension '(.*)' v(.*?)\s/g.exec(line) ?? [];
|
||||
if (id) {
|
||||
return {id, ver};
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function extensions() {
|
||||
// eslint-disable-next-line prefer-const, @typescript-eslint/no-unused-vars
|
||||
let {cli, args} = await install();
|
||||
}
|
||||
|
||||
/** returns a copy of the environment, with tweaks to ensure isolated instance works correctly in WSL and remote dev situations */
|
||||
export function environment() {
|
||||
const env = { ...process.env, DONT_PROMPT_WSL_INSTALL:"1" }; // this lets you run the native VSCODE instance, even if you're working in WSL
|
||||
Object.keys(env).map(each => each.includes('VSCODE') && delete env[each]); // prevent VSCode remoting from hijacking the launching of the isolated vscode
|
||||
return env;
|
||||
}
|
||||
|
||||
export async function reset() {
|
||||
|
||||
Vendored
-4
@@ -13,12 +13,8 @@
|
||||
"--skip-welcome",
|
||||
"--skip-release-notes",
|
||||
"--disable-workspace-trust",
|
||||
"--disable-extensions",
|
||||
"--extensionDevelopmentPath=${workspaceFolder}",
|
||||
],
|
||||
"env": {
|
||||
//"VSCODE_CPP_DEBUG_VSCODE": "c:\\work\\vs\\src\\vc\\.vscode\\launch.json"
|
||||
},
|
||||
"sourceMaps": true,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/dist/**"
|
||||
|
||||
Vendored
+4
-22
@@ -1,16 +1,11 @@
|
||||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
"window.title": "CppTools <Typescript> ${separator}${activeEditorShort}${separator}${dirty}",
|
||||
"workbench.colorTheme": "Hacker",
|
||||
"files.exclude": {
|
||||
"out": false // set this to true to hide the "out" folder with the compiled JS files
|
||||
},
|
||||
"search.exclude": {
|
||||
"out": true // set this to false to include "out" folder in search results
|
||||
},
|
||||
"files.associations": {
|
||||
"**/bin/definitions/**/*.json": "jsonl",
|
||||
},
|
||||
"typescript.tsdk": "./node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version
|
||||
// if you install the mocha test explorer extension, you can run the unit tests from the test explorer UI
|
||||
"testExplorer.useNativeTesting": true,
|
||||
@@ -32,7 +27,7 @@
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "vscode.json-language-features",
|
||||
"editor.tabSize": 4,
|
||||
"files.insertFinalNewline": true
|
||||
"files.insertFinalNewline": false
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.formatOnSave": true,
|
||||
@@ -42,12 +37,12 @@
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.tabSize": 4,
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features",
|
||||
"editor.formatOnSave": true,
|
||||
"files.insertFinalNewline": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true,
|
||||
"source.organizeImports": true
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.organizeImports": "explicit"
|
||||
},
|
||||
},
|
||||
"eslint.format.enable": true,
|
||||
@@ -69,17 +64,4 @@
|
||||
"directory": "./.scripts",
|
||||
}
|
||||
],
|
||||
"[jsonl]": {
|
||||
"editor.tabSize": 2,
|
||||
},
|
||||
"workbench.colorCustomizations": {
|
||||
"[Hacker]": {
|
||||
"sideBar.background": "#050a0a",
|
||||
"menu.background": "#050a0a",
|
||||
"editorWidget.background": "#050a0a",
|
||||
"terminal.background": "#030303",
|
||||
"activityBar.background": "#050a0a",
|
||||
"activityBarBadge.foreground": "#eaeaea",
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -22,7 +22,7 @@
|
||||
"isDefault": true
|
||||
},
|
||||
"isBackground": true,
|
||||
"problemMatcher": "$tsc-watch"
|
||||
"problemMatcher": "$tsc-watch",
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,6 +46,9 @@ typings/**
|
||||
import_edge_strings.js
|
||||
localized_string_ids.h
|
||||
translations_auto_pr.js
|
||||
readme.developer.md
|
||||
Reinstalling the Extension.md
|
||||
*.d.ts
|
||||
|
||||
# ignore i18n language files
|
||||
i18n/**
|
||||
|
||||
+464
-1066
File diff suppressed because it is too large
Load Diff
+911
-581
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,20 +0,0 @@
|
||||
{
|
||||
// common query file for gcc-style compilers
|
||||
"analysis": {
|
||||
/*
|
||||
"query": {
|
||||
"-E -dM -v ${tmp:c}": {
|
||||
"macro": "^#define (\\S*) ?(.*)?$", // match defines in output
|
||||
"includePaths": "#include <...> search starts here:\n((?: [^\n]*\n)*)*", // match the lines for include folders
|
||||
"target": "^Target: (.*)", // get the target
|
||||
"cStandard": "^#define __STDC_VERSION__\\s*(.*)",
|
||||
"cppStandard": "^#define __cplusplus\\s*(.*)",
|
||||
},
|
||||
"--version": {
|
||||
"version": "^clang version (\\d+[.]\\d+[.]\\d+)(?:-\\S*)?$"
|
||||
}
|
||||
}
|
||||
}*/
|
||||
// how do we specify args to trim off if the discovery is handled/initiated by someone else
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
{
|
||||
"intellisense": {
|
||||
"hostArchitecture": "${host:arch}",
|
||||
},
|
||||
|
||||
"conditions": {
|
||||
// example using a conditional to set the target platform based on the host platform
|
||||
"${host:os} === 'linux'": { "intellisense.platform": "linux" },
|
||||
"${host:os} === 'win32'": { "intellisense.platform": "windows" },
|
||||
"${host:os} === 'darwin'": { "intellisense.platform": "macos" }
|
||||
},
|
||||
"analysis": {
|
||||
// there are a lot of things that can be inferred from the macros that are defined by the compiler
|
||||
// if they are specified, let's use them.
|
||||
"expressions: PRIORITY=90 # things inferred from macros": {
|
||||
/* if this is truthy */ /* then apply this to the intellisense configuration */
|
||||
|
||||
"${macro:_X86_}": { "architecture": "x86", "bits" : 32 },
|
||||
"${macro:_x86_64_}": { "architecture": "x64", "bits" : 64 },
|
||||
"${macro:__aarch64__}": { "architecture": "arm64", "bits" : 64 },
|
||||
"${macro:__arm__}": { "architecture": "arm", "bits" : 32 },
|
||||
"${macro:__AVR__}": { "architecture": "avr", "bits": 16 },
|
||||
|
||||
"${macro:winnt}": { "platform": "windows" },
|
||||
"${macro:_WIN32}": { "platform": "windows" },
|
||||
"${macro:_WIN64}": { "platform": "windows", "bits": 64, "architecture": "x64" },
|
||||
"${macro:__linux__}": { "platform": "linux" },
|
||||
"${macro:__APPLE__}": { "platform": "macos" },
|
||||
|
||||
"${macro:__INTPTR_WIDTH__}": { "bits": "${macro:.__INTPTR_WIDTH__}" },
|
||||
|
||||
"!${sizes.char} && ${macro:__CHAR_SIZE__}" : { "sizes.char": "${macro:__CHAR_SIZE__}" },
|
||||
|
||||
"!${sizes.short} && ${macro:__SIZEOF_SHORT__}": { "sizes.short": "${macro:__SIZEOF_SHORT__}"},
|
||||
"!${sizes.short} && ${macro:__SHORT_SIZE__}": { "sizes.short": "${macro:__SHORT_SIZE__}"},
|
||||
|
||||
"!${sizes.int} && ${macro:__SIZEOF_INT__}": { "sizes.int": "${macro:__SIZEOF_INT__}"},
|
||||
"!${sizes.int} && ${macro:__INT_SIZE__}": { "sizes.int": "${macro:__INT_SIZE__}"},
|
||||
|
||||
"!${sizes.long} && ${macro:__SIZEOF_LONG__}" : { "sizes.long": "${macro:__SIZEOF_LONG__}" },
|
||||
"!${sizes.long} && ${macro:__LONG_SIZE__}" : { "sizes.long": "${macro:__LONG_SIZE__}" },
|
||||
|
||||
"!${sizes.longDouble} && ${macro:__SIZEOF_LONG_DOUBLE__}" : { "sizes.longDouble": "${macro:__SIZEOF_LONG_DOUBLE__}" },
|
||||
"!${sizes.longDouble} && ${macro:__LONG_DOUBLE_SIZE__}" : { "sizes.longDouble": "${macro:__LONG_DOUBLE_SIZE__}" },
|
||||
|
||||
"!${sizes.float} && ${macro:__SIZEOF_FLOAT__}": { "sizes.float": "${macro:__SIZEOF_FLOAT__}"},
|
||||
"!${sizes.float} && ${macro:__FLOAT_SIZE__}": { "sizes.float": "${macro:__FLOAT_SIZE__}"},
|
||||
|
||||
"!${sizes.double} && ${macro:__SIZEOF_DOUBLE__}": { "sizes.double": "${macro:__SIZEOF_DOUBLE__}"},
|
||||
"!${sizes.double} && ${macro:__DOUBLE_SIZE__}": { "sizes.double": "${macro:__DOUBLE_SIZE__}"},
|
||||
|
||||
"!${sizes.pointer} && ${macro:__SIZEOF_POINTER__}": { "sizes.pointer": "${macro:__SIZEOF_POINTER__}"},
|
||||
"!${sizes.pointer} && ${macro:__DEF_PTR_SIZE__}": { "sizes.pointer": "${macro:__DEF_PTR_SIZE__}"},
|
||||
|
||||
"!${sizes.digitsInLongMantissa} && ${macro:__LDBL_MANT_DIG__}": { "sizes.digitsInLongMantissa": "${macro:__LDBL_MANT_DIG__}"},
|
||||
|
||||
"!${types.wcharT} && ${macro:__WCHAR_TYPE__}": { "types.wcharT":"${macro:__WCHAR_TYPE__}"},
|
||||
"!${types.wcharT} && ${macro:__WCHAR_T_TYPE__}": { "types.wcharT":"${macro:__WCHAR_T_TYPE__}"},
|
||||
|
||||
"!${types.sizeT} && ${macro:__SIZE_TYPE__}": { "types.sizeT":"${macro:__SIZE_TYPE__}"},
|
||||
"!${types.sizeT} && ${macro:__SIZE_T_TYPE__}": { "types.sizeT":"${macro:__SIZE_T_TYPE__}"},
|
||||
|
||||
"!${types.ptrDiffT} && ${macro:__PTRDIFF_TYPE__}": { "types.ptrDiffT":"${macro:__PTRDIFF_TYPE__}"},
|
||||
"!${types.ptrDiffT} && ${macro:__PTRDIFF_T_TYPE__}": { "types.ptrDiffT":"${macro:__PTRDIFF_T_TYPE__}"},
|
||||
},
|
||||
|
||||
// when setting priority, it forces it to be higher or lower depending on the value.
|
||||
// higher numbers mean that the block is applied later, lower numbers mean that the block is applied earlier
|
||||
// the default number is the order in which it is loaded
|
||||
"expressions: PRIORITY=100": {
|
||||
"!${sizes.long}" : { "sizes.long": "${platform} === 'windows' ? 4 : ${bits} === 64 ? 8: 4" },
|
||||
"!${sizes.longDouble}": { "sizes.longDouble": "${platform} === 'windows' || ${architecture} === 'arm' || (${architecture} === 'arm64' && ${platform} === 'macos' ) ? 8 : 16" },
|
||||
"!${sizes.char}": { "sizes.char": 1},
|
||||
"!${sizes.short}": { "sizes.short": 2},
|
||||
"!${sizes.int}": { "sizes.int": 4},
|
||||
"!${sizes.float}": { "sizes.float": 4},
|
||||
"!${sizes.double}": { "sizes.double": 8},
|
||||
"!${sizes.pointer}": { "sizes.pointer": "${bits} === 64 ? 8: 4" },
|
||||
"!${sizes.digitsInLongMantissa}": { "sizes.digitsInLongMantissa": "${platform} === 'windows' || ${architecture} === 'arm' || (${architecture} === 'arm64' && ${platform} === 'macos' ) ? 53 : 64" },
|
||||
"!${sizes.alignmentOfLongDouble}": { "sizes.alignmentOfLongDouble": "${platform} === 'windows' || ${architecture} === 'arm' || (${architecture} === 'arm64' && ${platform} === 'macos' ) ? 8 : 16" },
|
||||
"!${sizes.defaultNewAlignment}": { "sizes.defaultNewAlignment": "${bits} === 64 ? 16 : 8" },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
{
|
||||
"analysis": { // affects
|
||||
"queries: ONCE": { // we never need to do this more than once
|
||||
// gets the version of the compiler by executing it with --version
|
||||
"-dumpversion": {
|
||||
"(?<version>.*)" : {"version": "${version}"}, // parse the version from the output
|
||||
},
|
||||
},
|
||||
|
||||
"tasks: ": [
|
||||
// tasks are one-off, built-in functionality that can be executed during analysis
|
||||
],
|
||||
|
||||
"commandLineArguments: C #" :{
|
||||
"-std=(?<std>.+)" : { "standard":"${std}" },
|
||||
"-ansi" : { "standard":"c90" },
|
||||
},
|
||||
|
||||
"commandLineArguments: CPP # " :{
|
||||
"-std=(?<std>.+)" : { "standard":"${std}" },
|
||||
},
|
||||
|
||||
"commandLineArguments: PRIORITY=-10 # drop these (maybe we don't even care to do this?...)": {
|
||||
"-o;.+": { }, // output file
|
||||
"-c;.+": { }, // input file
|
||||
"-param;${keyEqualsValue}": { }, // compiler parameter
|
||||
"-aux-info;.+": { }, // aux info
|
||||
"-MF;.+": { }, // output file for dependencies
|
||||
"-MT;.+": { }, // target for dependencies
|
||||
"-MQ;.+": { }, // target for dependencies
|
||||
"-T;.+": { }, // link script
|
||||
"-Xlinker;.+": { }, // pass to linker
|
||||
"-Wl,.+": { }, // pass to linker
|
||||
"-z;.+": { }, // pass to linker
|
||||
"-Xpreprocessor;.+": { }, // pass to preprocessor
|
||||
"-Xassembler;.+": { }, // pass to assembler
|
||||
"-Wa,.+": { }, // pass to assembler,
|
||||
"-fmacro-prefix-map=.*": { }, // macro prefix map
|
||||
"-fdebug-prefix-map=.*": { }, // debug prefix map
|
||||
},
|
||||
|
||||
"commandLineArguments: # " :{
|
||||
"-B(?<prefix>.+)": { "queryArgument": "-B${prefix}" }, // binary prefix
|
||||
|
||||
"-fms-extensions" : { "parserArgument": "--ms_extensions" },
|
||||
"-fno-ms-extensions" : { "remove:parserArgument": "--ms_extensions" },
|
||||
|
||||
"-m(?<arch>.+)": { "queryArgument" : "-m${arch}" },
|
||||
|
||||
"-I-": { "splitDir": true},
|
||||
|
||||
"-I(?<path>.+)": { "path.include": "${path}", "queryArgument": "-I${path}" },
|
||||
"-I;(?<path>.+)": { "path.include": "${path}", "queryArgument": "-I${path}"},
|
||||
"-isystem;(?<path>.+)": { "path.systemInclude": "${path}", "queryArgument": ["-isystem","${path}"] },
|
||||
"-idirafter;(?<path>.+)": { "path.afterInclude": "${path}", "queryArgument": ["-idirafter","${path}"] },
|
||||
"-iprefix;(?<path>.+)": { "prefixPath": "${path}", "queryArgument": ["-iprefix","${path}"] },
|
||||
"-iwithprefix;(?<path>.+)": { "path.afterInclude": "${prefixPath}${path}", "queryArgument": ["-iwithprefix","${path}"] },
|
||||
"-iwithprefixbefore;(?<path>.+)": { "path.include": "${prefixPath}${path}", "queryArgument": ["-iwithprefixbefore","${path}"] },
|
||||
"-iquote;(?<path>.+)": { "path.quoteInclude": "${path}", "queryArgument": ["-iquote","${path}"] },
|
||||
|
||||
"-isysroot;(?<path>.+)": { "sysroot": "${path}" },
|
||||
"-imultilib;(?<path>.+)": { "path.multilibpaths": "${path}" },
|
||||
"-F(?<path>.+)": { "path.framework": "${path}" },
|
||||
|
||||
"-D${keyEqualsValue}" : { "macro": { "${key}": "${value}" } , "queryArgument": ["-D", "${key}=${value}"]},
|
||||
"-D${keyNoValue}" : { "macro": { "${key}": 1 }, "queryArgument": ["-D", "${key}"]},
|
||||
"-D;${keyEqualsValue}" : { "macro": { "${key}": "${value}" }, "queryArgument": ["-D", "${key}=${value}"]},
|
||||
"-D;${keyNoValue}" : { "macro": { "${key}": 1 }, "queryArgument": ["-D", "${key}"]},
|
||||
"-U${keyNoValue}" : { "macro": { "${key}": null }, "queryArgument": ["-U", "${key}"]},
|
||||
"-U$;{keyNoValue}" : { "macro": { "${key}": null}, "queryArgument": ["-U", "${key}"]},
|
||||
|
||||
"-include;(?<path>.+)": { "path.forcedIncludeFile": "${path}" }, // forced include
|
||||
"-fexperimental-library": { "macro": {"__has_feature(experimental_library)": 1 }},
|
||||
"-undef": { "queryArgument": "-undef" },
|
||||
|
||||
"-x;(?<language>.+)": { "language": "${language}" }
|
||||
|
||||
},
|
||||
|
||||
"expressions: # environment variables" : {
|
||||
"${env:CPATH}": { "path.include": "${env:CPATH}" },
|
||||
"${language}=== 'c' && ${env:C_INCLUDE_PATH}": { "path.systemInclude": "${env:C_INCLUDE_PATH}" },
|
||||
"${language}=== 'cpp' && ${env:CPLUS_INCLUDE_PATH}":{ "path.systemInclude": "${env:CPLUS_INCLUDE_PATH}" },
|
||||
"${language}=== 'objc' && ${env:OBJC_INCLUDE_PATH}":{ "path.systemInclude": "${env:OBJC_INCLUDE_PATH}" },
|
||||
},
|
||||
|
||||
// before the sizes are set, we need to query the compiler with the right args to get the macros again
|
||||
// (so we can let things like -m32 or -m64 or -mthumb or other arch changes affect the macros )
|
||||
"queries:":{
|
||||
// ==== COMMAND LINE IS THE KEY ====
|
||||
"-E -dM -v ${queryArgument} ${tmp:c}": {
|
||||
|
||||
/* regex on output */ /* apply this to the intellisense config*/
|
||||
"^#define (?<key>\\S*) ?(?<value>.*)?$": { "macro":{ "${key}": "${value}" } },
|
||||
"#include <...> search starts here:\n(?<path>(?: [^\n]*\n)*)*": { "path.builtInInclude": "${path}" },
|
||||
"#include \"...\" search starts here:\n(?<path>(?: [^\n]*\n)*)*": { "path.quoteInclude": "${path}" },
|
||||
"^COLLECT_GCC_OPTIONS=(?<opts>.*)": { "gcc.options" : "${opts}" },
|
||||
"^Target: (?<target>.*)": { "gcc.target": "${target}" },
|
||||
"^COMPILER_PATH=(?<cp>.*)": { "gcc.compiler.paths": "${cp}" },
|
||||
"^LIBRARY_PATH=(?<lp>.*)": { "gcc.library.paths": "${lp}" },
|
||||
"^#define __STDC_VERSION__\\s*(?<ver>.*)": { "cStandard": "${ver}" },
|
||||
"^#define __cplusplus\\s*(?<ver>.*)": { "cppStandard": "${ver}" },
|
||||
}
|
||||
},
|
||||
|
||||
"expressions: ONCE # get parts of gcc version" : {
|
||||
"${macro:__GNUC__}" : {
|
||||
"MAJOR": "${macro:__GNUC__} >= 10 ? ${macro:__GNUC__} : '0'+${macro:__GNUC__}",
|
||||
"MINOR": "${macro:__GNUC_MINOR__} >= 10 ? ${macro:__GNUC_MINOR__} : '0'+${macro:__GNUC_MINOR__}",
|
||||
"PATCH": "${macro:__GNUC_PATCHLEVEL__} >= 10 ? ${macro:__GNUC_PATCHLEVEL__} : '0'+${macro:__GNUC_PATCHLEVEL__}"
|
||||
}
|
||||
},
|
||||
|
||||
"expressions: ONCE # gnu_version" : {
|
||||
"${macro:__GNUC__}" : {
|
||||
"parserArgument": [ "--gcc", "--gnu_version=${MAJOR}${MINOR}${PATCH}" ]
|
||||
}
|
||||
},
|
||||
}
|
||||
// how do we specify args to trim off if the discovery is handled/initiated by someone else
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
{
|
||||
"analysis": {
|
||||
// analysis steps are applied in order
|
||||
|
||||
"tasks: # handle environment variables" : [
|
||||
"inline-environment-variables", // takes the $env:CL and $env:_CL_ variables and adds them to the command line
|
||||
"inline-response-file", // takes the @file response file and adds it to the command line
|
||||
"consume-lib-path", // adds $env:LIB to the lib paths
|
||||
"remove-linker-arguments", // removes linker arguments from the command line
|
||||
],
|
||||
|
||||
"expressions: #environment variables": {
|
||||
"${env:INCLUDE}": { "path.environmentInclude": "${env:INCLUDE}" },
|
||||
},
|
||||
|
||||
"commandLineArguments: # detect target language": { // looks thru args to find things that set certain states (ie, /Tc, /Tp for language selection )
|
||||
"${-/}T[cC]" : { "language": "c",},
|
||||
"${-/}T[pP]" : { "language": "c++" },
|
||||
},
|
||||
|
||||
"commandLineArguments: NO_CONSUME # telemetry check for CLR usage": {
|
||||
// don"t consume the parameter
|
||||
"${-/}clr.*" : {"telemetry:cliDetected": {"cliDetection": true} },
|
||||
"${-/}ZW.*" : {"telemetry:cxDetected": {"cxDetection": true} }
|
||||
},
|
||||
|
||||
"commandLineArguments: # process most args": {
|
||||
"${-/}I(?<path>.+)" : { "path.include": "${path}" },
|
||||
"${-/}I;(?<path>.+)" : { "path.include": "${path}" },
|
||||
"${-/}FI(?<path>.+)" : { "path.forcedIncludeFile": "${path}" }, // should we be validating the path exists against system and user include folders? -- cl_compiler_info.cpp@191
|
||||
"${-/}FI;(?<path>.+)" : { "path.forcedIncludeFile": "${path}" },
|
||||
"-include;(?<path>.+)" : { "path.forcedIncludeFile": "${path}" }, // This support for passing "-include" to cl.exe can be removed in the future, when Unreal Engine is updated to no longer pass it to cl.exe.
|
||||
"${-/}external:I(?<path>.+)" : { "path.externalInclude": "${path}" },
|
||||
"${-/}external:I;(?<path>.+)" : { "path.externalInclude": "${path}" },
|
||||
|
||||
"${-/}D;${keyEqualsValue}" : { "macro": { "${key}": "${value}" } },
|
||||
"${-/}D;${keyNoValue}" : { "macro": { "${key}": 1 } },
|
||||
"${-/}D${keyEqualsValue}" : { "macro": { "${key}": "${value}" } },
|
||||
"${-/}D${keyNoValue}" : { "macro": { "${key}": 1 } },
|
||||
|
||||
"${-/}Zl" : { "macro": { "_VC_NODEFAULTLIB": 1 } },
|
||||
"${-/}Zp(?<alignment>1|2|4|8|16)" : { "parserArgument": [ "--pack_alignment", "${alignment}" ] },
|
||||
"${-/}Zp(?<alignment>.+)": { "warning": "unknown pack alignment ${alignment}", "parserArgument": [ "--pack_alignment", 1 ] },
|
||||
|
||||
"${-/}fp:except": { "macro": { "_M_FP_EXCEPT": 1} },
|
||||
"${-/}fp:except-": { "macro": { "_M_FP_EXCEPT": null} },
|
||||
"${-/}fp:fast": { "macro": { "_M_FP_FAST": 1} },
|
||||
"${-/}fp:precise": { "macro": { "_M_FP_PRECISE": 1} },
|
||||
"${-/}fp:strict": { "macro": { "_M_FP_STRICT": 1, "_M_FP_EXCEPT":1} },
|
||||
"${-/}GR": { "parserArgument": "--rtti" },
|
||||
"${-/}GR-": { "parserArgument": "--no_rtti" },
|
||||
"${-/}headerUnit;(?<hu>.+)": { "parserArgument": ["--ms_header_unit","${hu}"] },
|
||||
"${-/}headerUnit(?<hu>.+)": { "parserArgument": ["--ms_header_unit","${hu}"] },
|
||||
"${-/}ifcSearchDir;(?<md>.+)": { "parserArgument": ["--modules_directory","${md}"] },
|
||||
"${-/}ifcSearchDir(?<md>.+)": { "parserArgument": ["--modules_directory","${md}"] },
|
||||
"${-/}J": { "parserArgument": "--unsiged_chars" , "macro": { "_CHAR_UNSIGNED": 1 } },
|
||||
"${-/}LD": { "macro": { "_MT":1 } },
|
||||
"${-/}MT": { "macro": { "_MT":1 } },
|
||||
"${-/}LDd": { "macro": { "_MT":1, "_DEBUG":1 } },
|
||||
"${-/}MTd": { "macro": { "_MT":1, "_DEBUG":1 } },
|
||||
"${-/}MD": { "macro": { "_MT":1, "_DLL":1 } },
|
||||
"${-/}MDd": { "macro": { "_MT":1, "_DLL":1, "_DEBUG":1 } },
|
||||
"${-/}openmp": { "macro": { "_OPENMP":"200203" } },
|
||||
"${-/}openmp:experimental": { "macro": { "_OPENMP":"2019" } },
|
||||
"${-/}openmp:llvm": { "macro": { "_OPENMP":"200203", "_OPENMP_LLVM_RUNTIME":1 } },
|
||||
"${-/}permissive": { "parserArgument": "--ms_permissive" },
|
||||
"${-/}permissive-": { "parserArgument": "--no_ms_permissive" },
|
||||
"${-/}reference;(?<path>.+)": { "parserArgument": ["--ms_mod_file_map","${path}"] },
|
||||
"${-/}reference(?<path>.+)": { "parserArgument": ["--ms_mod_file_map","${path}"] },
|
||||
"${-/}showIncludes": { "parserArgument": "--trace_includes" },
|
||||
"${-/}stdIfcDir;(?<path>.+)": { "parserArgument": ["--std_modules_directory","${path}"] },
|
||||
"${-/}stdIfcDir(?<path>.+)": { "parserArgument": ["--std_modules_directory","${path}"] },
|
||||
"${-/}volatile:iso": { "macro": { "_VOLATILE_ISO":1 } },
|
||||
"${-/}Za": { "parserArgument": "--alternative_tokens" },
|
||||
"${-/}Zc:__cplusplus": { "parserArgument": "--ms_cplusplus_std_value" },
|
||||
"${-/}Zc:__cplusplus-": { "parserArgument": "--no_ms_cplusplus_std_value" },
|
||||
"${-/}Zc:char8_t": { "parserArgument": "--char8_t" },
|
||||
"${-/}Zc:char8_t-": { "parserArgument": "--no_char8_t" },
|
||||
"${-/}Zc:forScope": { "parserArgument": "--new_for_init" },
|
||||
"${-/}Zc:forScope-": { "parserArgument": "--old_for_init" },
|
||||
"${-/}Zc:wchar_t": { "parserArgument": "--wchar_t_keyword" },
|
||||
"${-/}Zc:wchar_t-": { "parserArgument": "--no_wchar_t_keyword" },
|
||||
"${-/}Zc:auto-": { "parserArgument": "--no_auto_type" },
|
||||
"${-/}Zc:trigraphs": { "parserArgument": "--trigraphs" },
|
||||
"${-/}Zc:trigraphs-": { "parserArgument": "--no_trigraphs" },
|
||||
"${-/}Zc:rvalueCast": { "parserArgument": "--ms_rvalue_cast" },
|
||||
"${-/}Zc:rvalueCast-": { "parserArgument": "--no_ms_rvalue_cast" },
|
||||
"${-/}Zc:strictStrings": { "parserArgument": "--no_deprecated_string_conv" },
|
||||
"${-/}Zc:strictStrings-": { "parserArgument": "--deprecated_string_conv" },
|
||||
"${-/}Zc:noexceptTypes": { "parserArgument": "--exc_spec_in_func_type" },
|
||||
"${-/}Zc:noexceptTypes-": { "parserArgument": "--no_exc_spec_in_func_type" },
|
||||
"${-/}Zc:alignedNew": { "parserArgument": "--overaligned_allocation" },
|
||||
"${-/}Zc:alignedNew-": { "parserArgument": "--no_overaligned_allocation" },
|
||||
"${-/}Zc:referenceBinding": { "parserArgument": "--no_nonconst_ref_anachronism" },
|
||||
"${-/}Zc:referenceBinding-": { "parserArgument": "--nonconst_ref_anachronism" },
|
||||
"${-/}Zc:ternary": { "parserArgument": "--ms_strict_ternary" },
|
||||
"${-/}Zc:ternary-": { "parserArgument": "--no_ms_strict_ternary", "remove:parserArgument": "--ms_strict_ternary" },
|
||||
"${-/}Zc:twoPhase": { "parserArgument": "--no_dep_name" },
|
||||
},
|
||||
|
||||
"commandLineArguments:CPP": {
|
||||
"${-/}await": { "parserArgument": "--ms_await" },
|
||||
"${-/}experimental:module" : { "parserArgument": "--modules" },
|
||||
"${-/}experimental:preprocessor" : { "parserArgument": "--ms_std_preprocessor" },
|
||||
"${-/}Zc:preprocessor" : { "parserArgument": "--ms_std_preprocessor" },
|
||||
"${-/}experimental:preprocessor-" : { "parserArgument": "--no_ms_std_preprocessor" },
|
||||
"${-/}Zc:preprocessor-" : { "parserArgument": "--no_ms_std_preprocessor" },
|
||||
"${-/}std:(?<std>.+)" : { "standard":"${std}" },
|
||||
"${-/}kernel": { "macro": { "_KERNEL_MODE": 1 }, "parserArgument": ["--no_exceptions","no_rtti"] },
|
||||
},
|
||||
|
||||
|
||||
"commandLineArguments: # CPP-CLI ??? todo - come back to this (cl_compiler_info.cpp@485 to )": {
|
||||
|
||||
// *** This section would not apply to ARM complier? <#if !VSCODE_ARM> -- see cl_compiler_info.cpp@485 --
|
||||
// *** which I think may be a mistake, since being applied to ARM64 as a host isn"t right, we"re talking about a target?
|
||||
// cpp/cli
|
||||
"${-/}clr:initialAppDomain": { "macro": { "_CPPUNWIND":1 }},
|
||||
"${-/}clr:netcore": { "parserArgument": ["--cppcli_netcore","--no_using_framework_directory", "--cppcli"],"macro":{"D_CLR_NETCORE":1, "_MANAGED":1, "_M_CEE_":"001"} },
|
||||
"${-/}clr:newSyntax": { "parserArgument": "--cppcli", "macro": {"_CPPUNWIND":1, "_M_CEE_PURE":"001", "_MANAGED":1, "_M_CEE_":"001" }},
|
||||
"${-/}clr:noAssembly": { "parserArgument": "--cppcli", "macro": { "_MANAGED":1, "_M_CEE_":"001" }},
|
||||
"${-/}clr:nostdlib": { "parserArgument": ["--no_using_framework_directory"] },
|
||||
"${-/}clr:nostdimport": { "parserArgument": ["--no_stdlib"] },
|
||||
"${-/}clr": { "parserArgument": "--cppcli", "macro": { "_MANAGED":1, "_M_CEE_":"001", "_CPPUNWIND":1, }},
|
||||
"${-/}clr:pure": { "parserArgument": "--cppcli", "macro": { "_MANAGED":1, "_M_CEE_":"001", "_CPPUNWIND":1, }},
|
||||
"${-/}clr:safe": { "parserArgument": "--cppcli", "macro": { "_MANAGED":1, "_M_CEE_":"001", "_CPPUNWIND":1, "_M_CEE_PURE":"001", "_M_CEE_SAFE":"001" }},
|
||||
|
||||
"${-/}zw": { "parserArgument": "--cppcx" },
|
||||
"${-/}zw:nostdlib": { "parserArgument": "--cppcx"},
|
||||
},
|
||||
|
||||
"commandLineArguments:C" : {
|
||||
"${-/}kernel": { "macro": { "_KERNEL_MODE": 1 } },
|
||||
"${-/}std:(?<std>.+)" : { "cStandard":"${std}" },
|
||||
},
|
||||
|
||||
"query" : {
|
||||
"-E /Zc:preprocessor ${queryArgument} /PD ${tmp.c}": {
|
||||
"^#define (?<key>\\S*) ?(?<value>.*)?$": { "macro":{ "${key}": "${value}" } },
|
||||
}
|
||||
},
|
||||
|
||||
"expressions: PRIORITY=85" : {
|
||||
"${bits} === 64" : {
|
||||
"parserArgument": [
|
||||
"-D_MSC_EXTENSIONS",
|
||||
"--microsoft",
|
||||
"--microsoft_bugs",
|
||||
"--microsoft_version", "1935",
|
||||
"--pack_alignment", "8",
|
||||
"-D_CPPUNWIND=1",
|
||||
"-D_MSC_VER=1935",
|
||||
"-D_MSC_FULL_VER=193532215",
|
||||
"-D_MSC_BUILD=0",
|
||||
"-D_M_X64=100",
|
||||
"-D_M_AMD64=100"
|
||||
]
|
||||
|
||||
}
|
||||
},
|
||||
"task:post-process": [
|
||||
// see cl_compiler_info.cpp@617 - process zw directories
|
||||
"zwCommandLineSwitch",
|
||||
"experimentalModuleNegative",
|
||||
],
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "GNU C++ [ARM]",
|
||||
"import": "common/gcc.json",
|
||||
"discover": {
|
||||
"binary": "arm-none-eabi-g++",
|
||||
"locations": [ "c:/nxp/", "c:/st/" ],
|
||||
"match": {
|
||||
"^(?<ver>\\d+[.]\\d+[.]\\d+)(?:-\\S*)?$" : { "version": "${ver}" }
|
||||
}
|
||||
|
||||
},
|
||||
"intellisense": {
|
||||
"compiler": "gcc",
|
||||
"architecture": "arm",
|
||||
"bits": 32,
|
||||
"platform": "none"
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "GNU C [ARM]",
|
||||
"import": "common/gcc.json",
|
||||
"discover": {
|
||||
"binary": "arm-none-eabi-gcc",
|
||||
"locations": [ "c:/nxp/", "c:/st/" ],
|
||||
"match": {
|
||||
"^(?<ver>\\d+[.]\\d+[.]\\d+)(?:-\\S*)?$" : { "version": "${ver}" }
|
||||
}
|
||||
},
|
||||
"intellisense": {
|
||||
"compiler": "gcc",
|
||||
"architecture": "arm",
|
||||
"bits": 32,
|
||||
"platform": "none"
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "GNU C++ [AVR/Arduino]",
|
||||
"import": [
|
||||
"common/gcc.json",
|
||||
"common/defaults.json"
|
||||
],
|
||||
"discover": {
|
||||
"binary": "avr-g++",
|
||||
"locations": [ "${env:home}/appdata/local" ],
|
||||
"match": {
|
||||
"^(?<ver>\\d+[.]\\d+[.]\\d+)(?:-\\S*)?$" : { "version": "${ver}" }
|
||||
}
|
||||
},
|
||||
|
||||
"intellisense": {
|
||||
"compiler": "gcc",
|
||||
"architecture": "avr",
|
||||
"platform": "none"
|
||||
},
|
||||
"conditions": {
|
||||
"${host:os} === 'win32'": { "discover.locations": "${env:home}/appdata/local", }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "Clang C++",
|
||||
"import": [
|
||||
"common/defaults.json",
|
||||
"common/clang.json",
|
||||
],
|
||||
"discover": {
|
||||
"binary": "clang++",
|
||||
"match": {
|
||||
"^clang (?<ver>\\d+[.]\\d+[.]\\d+)(?:-\\S*)?$": { "version": "${ver}" }
|
||||
}
|
||||
},
|
||||
"intellisense": {
|
||||
"compiler": "clang",
|
||||
"architecture": "x64",
|
||||
"bits": 64,
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "GNU C++ [x64]",
|
||||
"import": [
|
||||
"common/gcc.json",
|
||||
"common/defaults.json"
|
||||
],
|
||||
"discover": {
|
||||
"binary": "g++",
|
||||
"match": {
|
||||
"^(?<ver>\\d+[.]\\d+[.]\\d+)(?:-\\S*)?$" : { "version": "${ver}" }
|
||||
}
|
||||
},
|
||||
"intellisense": {
|
||||
"compiler": "gcc",
|
||||
"architecture": "x64",
|
||||
"bits": 64,
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "GNU C [x64]",
|
||||
"import": [
|
||||
"common/gcc.json",
|
||||
"common/defaults.json"
|
||||
],
|
||||
"discover": {
|
||||
"binary": "gcc",
|
||||
"match": {
|
||||
"^(?<ver>\\d+[.]\\d+[.]\\d+)(?:-\\S*)?$" : { "version": "${ver}" }
|
||||
}
|
||||
},
|
||||
"intellisense": {
|
||||
"compiler": "gcc",
|
||||
"architecture": "x64",
|
||||
"bits": 64,
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"name": "IAR C/C++ [ARM]",
|
||||
"import": [
|
||||
"common/defaults.json"
|
||||
],
|
||||
"discover": {
|
||||
"binary": "iccarm",
|
||||
"match": {
|
||||
"^(?<ver>\\d{1,2}[.]\\d+[.]\\d+[.]\\d+)(?:/\\S*)?$": { "version": "${ver}" }
|
||||
},
|
||||
"expression: FOLDER" : {
|
||||
"${binary}/../../" : { "IARPath" : "${binary}/../../" }
|
||||
}
|
||||
},
|
||||
"intellisense": {
|
||||
"compiler": "iar", // this just gets us the 'base' that EDG will think it is
|
||||
"architecture": "arm", // we can have a common file that remaps this to something else if needed
|
||||
"bits": 32, // another hint for later.
|
||||
"platform": "none", // bare-metal target. (can be remaped to windows/macos/linux if needed to make EDG happy)
|
||||
"path.systemInclude": [ // we can't get the include path from the compiler, so we had to explicity state it
|
||||
"${IARPath}inc/cpp" // include folder for c++ headers in IAR
|
||||
]
|
||||
},
|
||||
"analysis": {
|
||||
"queries": {
|
||||
"${tmp.c} --c++ --predef_macros ${tmp.stdout} --output ${tmp.o}": {
|
||||
"^#define (?<key>\\S*) ?(?<value>.*)?$" : { "macro": { "${key}": "${value}" } },
|
||||
"^#define __STDC_VERSION__\\s*(?<ver>.*)": { "cStandard": "${ver}" },
|
||||
"^#define __cplusplus\\s*(?<ver>.*)": { "cppStandard": "${ver}" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
{
|
||||
"name": "Microsoft Visual C++",
|
||||
"import": [
|
||||
"common/msvc.json",
|
||||
"common/defaults.json"
|
||||
],
|
||||
"discover": {
|
||||
"binary": "cl",
|
||||
|
||||
// Add the default paths.include for the WindowsSDK
|
||||
"expression: FOLDER, OPTIONAL": {
|
||||
"${KitsRoot10}/Include/${SDKVer}/um" : { "path.builtInInclude": "${KitsRoot10}/Include/${SDKVer}/um" },
|
||||
"${KitsRoot10}/Include/${SDKVer}/ucrt" : { "path.builtInInclude": "${KitsRoot10}/Include/${SDKVer}/ucrt" },
|
||||
"${KitsRoot10}/Include/${SDKVer}/shared" : { "path.builtInInclude": "${KitsRoot10}/Include/${SDKVer}/shared" },
|
||||
"${KitsRoot10}/Include/${SDKVer}/winrt" : { "path.builtInInclude": "${KitsRoot10}/Include/${SDKVer}/winrt" },
|
||||
"${KitsRoot10}/Include/${SDKVer}/cppwinrt" : { "path.builtInInclude": "${KitsRoot10}/Include/${SDKVer}/cppwinrt" }
|
||||
},
|
||||
|
||||
// get the compiler version from the binary itself
|
||||
"match: # detect the compiler version from the binary": {
|
||||
"^(?<ver>\\d+[.]\\d+[.]\\d+)[.].*$" : { "version": "${ver}" }
|
||||
},
|
||||
|
||||
// get the host architecture based on the string we can find inside the binary
|
||||
"match: ONEOF # detect the host architecture from the binary" : {
|
||||
"\\\\amd64\\\\": { "hostArchitecture": "x64" ,"bits": 64, "architecture": "x64"},
|
||||
"\\\\i386\\\\" : { "hostArchitecture": "x86" , "bits": 32, "architecture": "x86" },
|
||||
"\\\\arm64\\\\": { "hostArchitecture": "arm64" , "bits": 64, "architecture": "arm64" },
|
||||
|
||||
"\\\\x86_amd64\\\\": { "hostArchitecture": "x86" ,"bits": 64, "architecture": "x64"},
|
||||
"\\\\x86_arm64\\\\": { "hostArchitecture": "x86", "bits": 64, "architecture": "arm64" },
|
||||
"\\\\x86_arm\\\\": { "hostArchitecture": "x86", "bits": 32, "architecture": "arm" },
|
||||
|
||||
"\\\\amd64_x86\\\\": { "hostArchitecture": "x64" , "bits": 32, "architecture": "x86" },
|
||||
"\\\\amd64_arm\\\\": { "hostArchitecture": "x64" , "bits": 32, "architecture": "arm"},
|
||||
"\\\\amd64_arm64\\\\": { "hostArchitecture": "x64", "bits": 64, "architecture": "arm64" },
|
||||
|
||||
"\\\\arm64_amd64\\\\": { "hostArchitecture": "arm64" ,"bits": 64, "architecture": "x64"},
|
||||
"\\\\arm64_x86\\\\": { "hostArchitecture": "arm64", "bits": 32, "architecture": "x86" },
|
||||
"\\\\arm64_arm\\\\": { "hostArchitecture": "arm64" , "bits": 32, "architecture": "arm"},
|
||||
},
|
||||
|
||||
// add the default paths.include for the Visual C++ compiler
|
||||
"expression: ONEOF,FOLDER # find the base include folder": {
|
||||
"${binary}/../include": { "path.builtInInclude": "${binary}/../include"},
|
||||
"${binary}/../../include": { "path.builtInInclude": "${binary}/../../include"},
|
||||
"${binary}/../../../include": { "path.builtInInclude": "${binary}/../../../include"},
|
||||
"${binary}/../../../../include": { "path.builtInInclude": "${binary}/../../../../include" }
|
||||
},
|
||||
|
||||
// add the atlmfc paths.include for the Visual C++ compiler
|
||||
"expression: ONEOF,OPTIONAL,FOLDER # find the optional atlmfc include folder": {
|
||||
"${binary}/../atlmfc/include": { "path.builtInInclude": "${binary}/../atlmfc/include" },
|
||||
"${binary}/../../atlmfc/include": { "path.builtInInclude": "${binary}/../../atlmfc/include" },
|
||||
"${binary}/../../../atlmfc/include": { "path.builtInInclude": "${binary}/../../../atlmfc/include" },
|
||||
"${binary}/../../../../atlmfc/include": { "path.builtInInclude": "${binary}/../../../../atlmfc/include" }
|
||||
}
|
||||
},
|
||||
|
||||
"intellisense": {
|
||||
// get the location of the SDK root from the registry
|
||||
"KitsRoot10": "${HKLM:SOFTWARE/WOW6432Node/Microsoft/Windows Kits/Installed Roots;KitsRoot10}",
|
||||
"KitsRoot81": "${HKLM:SOFTWARE/WOW6432Node/Microsoft/Windows Kits/Installed Roots;KitsRoot81}",
|
||||
|
||||
// set the default SDK version (todo: this should be able to be pulled in from the user's config)
|
||||
"SDKVer": "10.0.22000.0",
|
||||
|
||||
"parserArgument": [
|
||||
"--no_warnings",
|
||||
"--rtti",
|
||||
"--wchar_t_keyword",
|
||||
"--edge",
|
||||
"--exceptions",
|
||||
"--error_limit", "25000",
|
||||
"-D_EDG_COMPILER",
|
||||
"-D_USE_DECLSPECS_FOR_SAL=1"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"name": "GNU C++ [xtensa-esp32]",
|
||||
"import": [
|
||||
"common/gcc.json",
|
||||
"common/defaults.json"
|
||||
],
|
||||
"discover": {
|
||||
"binary": "xtensa-esp32-elf-g++",
|
||||
"locations": [ "${env:IDF_TOOLS_PATH}" ],
|
||||
"match": {
|
||||
"^(?<ver>\\d+[.]\\d+[.]\\d+)(?:-\\S*)?$" : { "version": "${ver}" }
|
||||
}
|
||||
|
||||
},
|
||||
"intellisense": {
|
||||
"compiler": "gcc",
|
||||
"architecture": "xtensa",
|
||||
"bits": 32,
|
||||
"platform": "none",
|
||||
"parserArgument": [],
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"name": "GNU C [xtensa-esp32]",
|
||||
"import": [
|
||||
"common/gcc.json",
|
||||
"common/defaults.json"
|
||||
],
|
||||
"discover": {
|
||||
"binary": "xtensa-esp32-elf-gcc",
|
||||
"locations": [ "${env:IDF_TOOLS_PATH}" ],
|
||||
"match": {
|
||||
"^(?<ver>\\d+[.]\\d+[.]\\d+)(?:-\\S*)?$" : { "version": "${ver}" }
|
||||
}
|
||||
|
||||
},
|
||||
"intellisense": {
|
||||
"compiler": "gcc",
|
||||
"architecture": "xtensa",
|
||||
"bits": 32,
|
||||
"platform": "none",
|
||||
"parserArgument": ["--c", "--c${cStandard}" ]
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,13 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
"-D__arm__=1",
|
||||
"-D__ARM_32BIT_STATE=1",
|
||||
"-D__PTRDIFF_TYPE__=int",
|
||||
"-D__SIZE_TYPE__=unsigned int",
|
||||
"-D__WCHAR_TYPE__=long int"
|
||||
],
|
||||
"defaults_op" : "merge"
|
||||
}
|
||||
{
|
||||
"defaults": [
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
"-D__arm__=1",
|
||||
"-D__ARM_32BIT_STATE=1",
|
||||
"-D__PTRDIFF_TYPE__=int",
|
||||
"-D__SIZE_TYPE__=unsigned int",
|
||||
"-D__WCHAR_TYPE__=long int"
|
||||
],
|
||||
"defaults_op": "merge"
|
||||
}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
"-D__aarch64__=1",
|
||||
"-D__ARM_64BIT_STATE=1",
|
||||
"-D__PTRDIFF_TYPE__=long int",
|
||||
"-D__SIZE_TYPE__=long unsigned int",
|
||||
"-D__WCHAR_TYPE__=int"
|
||||
],
|
||||
"defaults_op" : "merge"
|
||||
}
|
||||
{
|
||||
"defaults": [
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
"-D__aarch64__=1",
|
||||
"-D__ARM_64BIT_STATE=1",
|
||||
"-D__PTRDIFF_TYPE__=long int",
|
||||
"-D__SIZE_TYPE__=long unsigned int",
|
||||
"-D__WCHAR_TYPE__=int"
|
||||
],
|
||||
"defaults_op": "merge"
|
||||
}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
"-D__x86_64=1",
|
||||
"-D__x86_64__=1",
|
||||
"-D__PTRDIFF_TYPE__=long int",
|
||||
"-D__SIZE_TYPE__=long unsigned int",
|
||||
"-D__WCHAR_TYPE__=int"
|
||||
],
|
||||
"defaults_op" : "merge"
|
||||
}
|
||||
{
|
||||
"defaults": [
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
"-D__x86_64=1",
|
||||
"-D__x86_64__=1",
|
||||
"-D__PTRDIFF_TYPE__=long int",
|
||||
"-D__SIZE_TYPE__=long unsigned int",
|
||||
"-D__WCHAR_TYPE__=int"
|
||||
],
|
||||
"defaults_op": "merge"
|
||||
}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
"-D__i386=1",
|
||||
"-D__i386__=1",
|
||||
"-D__PTRDIFF_TYPE__=int",
|
||||
"-D__SIZE_TYPE__=unsigned int",
|
||||
"-D__WCHAR_TYPE__=long int"
|
||||
],
|
||||
"defaults_op" : "merge"
|
||||
}
|
||||
{
|
||||
"defaults": [
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
"-D__i386=1",
|
||||
"-D__i386__=1",
|
||||
"-D__PTRDIFF_TYPE__=int",
|
||||
"-D__SIZE_TYPE__=unsigned int",
|
||||
"-D__WCHAR_TYPE__=long int"
|
||||
],
|
||||
"defaults_op": "merge"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-Dunix=1",
|
||||
"-D__unix__=1",
|
||||
"-D__linux__=1",
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-D__APPLE__=1",
|
||||
"-D__MACH__=1",
|
||||
"-D__arm__=1",
|
||||
"-D__ARM_32BIT_STATE=1",
|
||||
"-D__PTRDIFF_TYPE__=int",
|
||||
"-D__SIZE_TYPE__=unsigned int",
|
||||
"-D__WCHAR_TYPE__=long int"
|
||||
],
|
||||
"defaults_op" : "merge"
|
||||
}
|
||||
{
|
||||
"defaults": [
|
||||
"-D__APPLE__=1",
|
||||
"-D__MACH__=1",
|
||||
"-D__arm__=1",
|
||||
"-D__ARM_32BIT_STATE=1",
|
||||
"-D__PTRDIFF_TYPE__=int",
|
||||
"-D__SIZE_TYPE__=unsigned int",
|
||||
"-D__WCHAR_TYPE__=long int"
|
||||
],
|
||||
"defaults_op": "merge"
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-D__APPLE__=1",
|
||||
"-D__MACH__=1",
|
||||
"-D__aarch64__=1",
|
||||
"-D__ARM_64BIT_STATE=1",
|
||||
"-D__PTRDIFF_TYPE__=long int",
|
||||
"-D__SIZE_TYPE__=long unsigned int",
|
||||
"-D__WCHAR_TYPE__=int"
|
||||
],
|
||||
"defaults_op" : "merge"
|
||||
}
|
||||
{
|
||||
"defaults": [
|
||||
"-D__APPLE__=1",
|
||||
"-D__MACH__=1",
|
||||
"-D__aarch64__=1",
|
||||
"-D__ARM_64BIT_STATE=1",
|
||||
"-D__PTRDIFF_TYPE__=long int",
|
||||
"-D__SIZE_TYPE__=long unsigned int",
|
||||
"-D__WCHAR_TYPE__=int"
|
||||
],
|
||||
"defaults_op": "merge"
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-D__APPLE__=1",
|
||||
"-D__MACH__=1",
|
||||
"-D__x86_64=1",
|
||||
"-D__x86_64__=1",
|
||||
"-D__PTRDIFF_TYPE__=long int",
|
||||
"-D__SIZE_TYPE__=long unsigned int",
|
||||
"-D__WCHAR_TYPE__=int"
|
||||
],
|
||||
"defaults_op" : "merge"
|
||||
}
|
||||
{
|
||||
"defaults": [
|
||||
"-D__APPLE__=1",
|
||||
"-D__MACH__=1",
|
||||
"-D__x86_64=1",
|
||||
"-D__x86_64__=1",
|
||||
"-D__PTRDIFF_TYPE__=long int",
|
||||
"-D__SIZE_TYPE__=long unsigned int",
|
||||
"-D__WCHAR_TYPE__=int"
|
||||
],
|
||||
"defaults_op": "merge"
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-D__APPLE__=1",
|
||||
"-D__MACH__=1",
|
||||
"-D__i386=1",
|
||||
"-D__i386__=1",
|
||||
"-D__PTRDIFF_TYPE__=int",
|
||||
"-D__SIZE_TYPE__=unsigned int",
|
||||
"-D__WCHAR_TYPE__=long int"
|
||||
],
|
||||
"defaults_op" : "merge"
|
||||
}
|
||||
{
|
||||
"defaults": [
|
||||
"-D__APPLE__=1",
|
||||
"-D__MACH__=1",
|
||||
"-D__i386=1",
|
||||
"-D__i386__=1",
|
||||
"-D__PTRDIFF_TYPE__=int",
|
||||
"-D__SIZE_TYPE__=unsigned int",
|
||||
"-D__WCHAR_TYPE__=long int"
|
||||
],
|
||||
"defaults_op": "merge"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-D__APPLE__=1",
|
||||
"-D__MACH__=1",
|
||||
"-D__arm__=1",
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"defaults": [
|
||||
"--pack_alignment",
|
||||
"8",
|
||||
"-D__APPLE__=1",
|
||||
"-D__MACH__=1",
|
||||
"-D__aarch64__=1",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user