-
Notifications
You must be signed in to change notification settings - Fork 108
Create Github workflow to automate creating an Asana task when adding a new Android feature flag #4182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 3e9d1c6.
|
👋 Don't forget to add an individual reviewer (in addition to those auto-added), as this will create a task for them in Asana.
👉 Please mark this as DRAFT unless there's an intention to merge this immediately. |
Generated file outputs:Time updated: Tue, 09 Dec 2025 11:40:40 GMT legacy27 files identical
2 files changed
--- v4/android-config.json (and 1 other files)
+++ v4/android-config.json
@@ -457,8 +457,12 @@
},
"newCustomTab": {
"state": "enabled",
"minSupportedVersion": 52590000
+ },
+ "test": {
+ "state": "enabled",
+ "minSupportedVersion": 52590000
}
}
},
"androidNewStateKillSwitch": {
latestv5/android-config.json--- v5/android-config.json
+++ v5/android-config.json
@@ -457,8 +457,12 @@
},
"newCustomTab": {
"state": "enabled",
"minSupportedVersion": 52590000
+ },
+ "test": {
+ "state": "enabled",
+ "minSupportedVersion": 52590000
}
}
},
"androidNewStateKillSwitch": {
13 files identical
|
JSON approval analysis:Time updated: Tue, 09 Dec 2025 11:40:45 GMT legacy❌ Manual Review Required
latest❌ Manual Review Required
🎯 OVERALL APPROVAL STATUS❌ MANUAL REVIEW REQUIRED |
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Workflow triggers on PR open, not merge
The feature flag cleanup workflow triggers on pull_request opened and synchronize events. This creates Asana tasks when a PR is opened or updated, instead of only after it's merged as intended. This can lead to premature or unnecessary cleanup tasks for unmerged PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be changed after testing, for now I want to test that it works as expected, then I will update it and trigger this workflow only when the PR is merged
anikiki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can merge this to test and update later 👍
| id: get-author-asana-id | ||
| with: | ||
| github-pat: ${{ secrets.GH_RO_PAT }} | ||
| action: 'get-asana-user-id' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Asana user lookup runs without conditional check
The "Get PR author Asana ID" step runs unconditionally regardless of whether new feature flags were detected. It lacks the if: steps.detect_flags.outputs.has_new_flags == 'true' condition that the subsequent "Prepare Asana task content" step has. This causes unnecessary API calls to fetch Asana user IDs even when there are no new flags and no task will be created.
Please tell me if this was useful or not with a 👍 or 👎.
| id: get-author-asana-id | ||
| with: | ||
| github-pat: ${{ secrets.GH_RO_PAT }} | ||
| action: 'get-asana-user-id' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: PR author not passed for workflow_dispatch Asana lookup
When triggered via workflow_dispatch, the get-asana-user-id action has no way to determine which GitHub user to look up. The author field is fetched from the PR at line 34 but is never output to $GITHUB_OUTPUT or passed to the Asana action. The action likely relies on github.event.pull_request.user context which doesn't exist for workflow_dispatch events. This will cause the task assignment to fail or assign to the wrong user when the workflow is manually triggered.
Please tell me if this was useful or not with a 👍 or 👎.
Additional Locations (1)
| done | ||
| fi | ||
| fi | ||
| done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Sub-features of new top-level features not detected
The sub-feature detection loop iterates over BASE_FEATURES only, meaning it only checks for new sub-features within features that already existed before the PR. If someone adds a brand new top-level feature that contains sub-features, those nested sub-features won't be individually tracked in the Asana task - only the parent feature name will be listed. This could result in incomplete cleanup tracking when complex feature hierarchies are added.
Please tell me if this was useful or not with a 👍 or 👎.
| id: get-author-asana-id | ||
| with: | ||
| github-pat: ${{ secrets.GH_RO_PAT }} | ||
| github-username: 'catalinradoiu' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Hardcoded username prevents dynamic PR author assignment
The github-username is hardcoded to 'catalinradoiu' instead of dynamically retrieving the actual PR author. This causes all Asana tasks to be assigned to the same user regardless of who authored the PR. The workflow should use ${{ github.event.pull_request.author.login }} (for pull_request events) or extract the author from the PR data (for workflow_dispatch).
Please tell me if this was useful or not with a 👍 or 👎.
|
|
||
| - name: Debug Asana User ID | ||
| run: | | ||
| echo "Asana User ID: ${{ steps.get-author-asana-id.outputs.asanaUserId }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Debug step exposes internal data in workflow logs
The "Debug Asana User ID" step echoes the Asana user ID to the workflow logs. This appears to be temporary debugging code that was left in during development. While the Asana user ID itself may not be sensitive, leaving debug statements in production workflows is not ideal practice.
Please tell me if this was useful or not with a 👍 or 👎.
Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/1211724162604201/task/1211982480566593?focus=true
Description
Create Github workflow to automate creating an Asana task when adding a new Android feature flag. The workflow will be triggered automatically then a PR with a new feature flag is merged and will create an Asana task, assigned to the PR author, for clearing the feature flag.
Feature change process:
Site breakage mitigation process:
Brief explanation
Note
Adds a GitHub Actions workflow that creates Asana cleanup tasks when new Android feature flags are introduced, updates CODEOWNERS, and introduces a new
androidBrowserConfig.features.testflag./.github/workflows/feature-flag-cleanup-tracker.ymlto detect new flags inoverrides/android-override.jsonby diffing base/head, then create Asana tasks (auto on PRs touching the file or viaworkflow_dispatch; assigns to PR author).androidBrowserConfig.features.test(state:enabled,minSupportedVersion:52590000) inoverrides/android-override.json.CODEOWNERSto include.github/workflows/feature-flag-cleanup-tracker.ymlowned by@duckduckgo/config-aorand@duckduckgo/android-devs.Written by Cursor Bugbot for commit 71b7e60. This will update automatically on new commits. Configure here.