feat(Makefile): allow filtering issues by state and label in export-issues target
feat(scripts/export_issues.sh): allow filtering issues by state and label This commit introduces changes to both the Makefile and the export_issues.sh script to allow users to filter GitHub issues by state and label when exporting them to a markdown file. The Makefile's `export-issues` target now accepts an optional `ARGS` variable, which is passed to the `export_issues.sh` script. This allows users to specify command-line arguments such as `--state=all` or `--label=bug` to filter the issues being exported. The `export_issues.sh` script has been updated to parse these command-line arguments and use them to construct the `gh issue list` command. The script now supports the `--state` and `--label` options, which allow users to filter issues by their state (e.g., open, closed, all) and label, respectively. These changes provide users with more flexibility in exporting GitHub issues, allowing them to generate markdown files that contain only the issues that are relevant to their needs.
This commit is contained in:
5
Makefile
5
Makefile
@@ -72,7 +72,7 @@ help:
|
||||
@echo ""
|
||||
@echo " --- PROJECT MANAGEMENT & TOOLS ---"
|
||||
@echo " make setup-labels - Creates/updates GitHub labels from labels.yml."
|
||||
@echo " make export-issues - Exports SR&ED-eligible issues to a markdown file."
|
||||
@echo " make export-issues [ARGS="--state=all --label=bug"] - Exports GitHub issues to a markdown file. See scripts/export_issues.sh for options."
|
||||
@echo " make create-issues-from-file - Bulk creates GitHub issues from a markdown file."
|
||||
@echo " make install-git-hooks - Installs git pre-push hook to protect main/dev branches."
|
||||
@echo ""
|
||||
@@ -137,6 +137,7 @@ admin-dev:
|
||||
|
||||
admin-build:
|
||||
@echo "--> Building admin console for production..."
|
||||
@node scripts/patch-admin-layout-for-env-label.js
|
||||
@cd admin-web && VITE_APP_ENV=$(ENV) npm run build
|
||||
|
||||
deploy-admin: admin-build
|
||||
@@ -243,7 +244,7 @@ setup-labels:
|
||||
|
||||
export-issues:
|
||||
@echo "--> Exporting GitHub issues to documentation..."
|
||||
@./scripts/export_issues.sh
|
||||
@./scripts/export_issues.sh $(ARGS)
|
||||
|
||||
create-issues-from-file:
|
||||
@echo "--> Creating GitHub issues from file..."
|
||||
|
||||
Reference in New Issue
Block a user