Skip to content

Commit bed32f2

Browse files
committed
Allow parameters in asana links
1 parent e8a9af9 commit bed32f2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

org/allPRs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export const featureFlagAsanaLink = async () => {
300300

301301
if (changedFiles.length === 0) return;
302302

303-
const asanaTaskUrlRegex = /^\/\/\/\s*https:\/\/app\.asana\.com\/1\/137249556945\/project\/1211834678943996\/task\/\d+\s*$/;
303+
const asanaTaskUrlRegex = /^\/\/\/\s*https:\/\/app\.asana\.com\/1\/137249556945\/project\/1211834678943996\/task\/\d+(\?\S*)?\s*$/;
304304

305305
for (const file of changedFiles) {
306306
const structuredDiff = await danger.git.structuredDiffForFile(file);

tests/featureFlagAsanaLink.allPRs.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ describe("Feature flag Asana link checks", () => {
7575
expect(dm.warn).not.toHaveBeenCalled()
7676
})
7777

78+
it("does not warn when Asana link has query parameters", async () => {
79+
dm.rawDiff = `@@ -10,6 +10,8 @@ enum FeatureFlag {
80+
+ /// https://app.asana.com/1/137249556945/project/1211834678943996/task/123456789?focus=true
81+
+ case myNewFeature`
82+
83+
await featureFlagAsanaLink()
84+
expect(dm.warn).not.toHaveBeenCalled()
85+
})
86+
7887
it("does not warn when added case with assignment has valid Asana link above it", async () => {
7988
dm.rawDiff = `@@ -10,6 +10,8 @@ enum FeatureFlag {
8089
+ /// https://app.asana.com/1/137249556945/project/1211834678943996/task/999888777

0 commit comments

Comments
 (0)