@@ -11,6 +11,7 @@ A GitHub Action that audits LaunchDarkly feature flags with expiry dates stored
1111- 🚨 ** Past Due Identification** : Optionally includes flags that are already past their expiry date
1212- 📝 ** Multiple Date Formats** : Supports various date formats (MM/DD/YYYY, YYYY-MM-DD, etc.)
1313- 🎫 ** Automated Issue Creation** : Optionally creates GitHub issues for expired flags with task labels
14+ - 🌐 ** Multi-Project Support** : Audit a single project or all projects in your LaunchDarkly account
1415
1516## Usage
1617
@@ -181,12 +182,39 @@ jobs:
181182 github_token : ${{ secrets.GITHUB_TOKEN }}
182183` ` `
183184
185+ ### Auditing All Projects
186+
187+ ` ` ` yaml
188+ name : Audit All LaunchDarkly Projects
189+ on :
190+ schedule :
191+ - cron : ' 0 6 * * 1' # Monday at 6 AM
192+
193+ jobs :
194+ audit-all-projects :
195+ runs-on : ubuntu-latest
196+ permissions :
197+ issues : write
198+ contents : read
199+ steps :
200+ - uses : actions/checkout@v4
201+
202+ - name : Audit all projects
203+ uses : your-org/ld-cp-exp-date-gh-actions-audit@v1
204+ with :
205+ launchdarkly_api_key : ${{ secrets.LAUNCHDARKLY_API_KEY }}
206+ project_key : ' all' # This will audit ALL projects
207+ days_ahead : ' 14'
208+ create_issues : ' true'
209+ github_token : ${{ secrets.GITHUB_TOKEN }}
210+ ` ` `
211+
184212## Inputs
185213
186214| Input | Description | Required | Default |
187215|-------|-------------|----------|---------|
188216| ` launchdarkly_api_key` | LaunchDarkly API access token (should be stored as a secret) | Yes | |
189- | `project_key` | LaunchDarkly project key | Yes | |
217+ | `project_key` | LaunchDarkly project key (use "all" to audit all projects) | Yes | |
190218| `days_ahead` | Number of days ahead to check for expiring flags | No | `7` |
191219| `include_past_due` | Include flags that are past their expiry date | No | `true` |
192220| `custom_property_name` | Name of the custom property containing the expiry date | No | `flag.expiry.date` |
@@ -209,8 +237,10 @@ Each flag object in the output arrays contains:
209237{
210238 "name": "My Feature Flag",
211239 "key": "my-feature-flag",
240+ "projectKey": "my-project",
241+ "projectName": "My Project",
212242 "expiryDate": "2024-03-15",
213- "custom_property_key ": "flag.expiry.date",
243+ "customPropertyKey ": "flag.expiry.date",
214244 "customPropertyValue": "03/15/2024",
215245 "daysUntilExpiry": 5
216246}
@@ -252,6 +282,7 @@ The action looks for an `ISSUE_TEMPLATE.md` file in your repository root. If not
252282- ` {{expiryDate}}` - The expiry date
253283- ` {{daysOverdue}}` - Number of days past expiry
254284- ` {{projectKey}}` - LaunchDarkly project key
285+ - ` {{projectName}}` - LaunchDarkly project name
255286- ` {{auditDate}}` - Date the audit was run
256287- ` {{repoOwner}}` - Repository owner
257288- ` {{repoName}}` - Repository name
0 commit comments