GitHub Action that automatically ranks open feature request issues by reactions and generates a ranked Markdown report for your repository.
<!-- Optional: Add a license badge -->
<!-- Optional: Actions badge -->
A simple GitHub Action that automatically ranks open feature request issues in your repository based on 👍 reactions and generates a Markdown file listing them.
This action runs on a schedule (or manually) to:
feature-request).RANKED_FEATURES.md) in your repository listing the ranked issues with
links.The action will generate a file (e.g., RANKED_FEATURES.md) that looks something like this:
Here's a static example of what the generated Markdown content looks like:
Updated: 2025-05-05T15:00:00.000Z
| Rank | 👍 | Feature Request | Issue |
|---|---|---|---|
| 1 | 42 | Add dark mode support | your-owner/your-repo#123 |
| 2 | 25 | Integrate with Service X | your-owner/your-repo#456 |
| 3 | 18 | Improve performance | Optimize queries | your-owner/your-repo#789 |
| 4 | 5 | Add option for exporting data | your-owner/your-repo#101 |
Generated with ❤️ by Top Issues Action
(Note: The actual file will contain the real data from your repository's issues.)
Setting this up in your repository is easy:
Create Workflow Directory:
If it doesn't exist, create the .github/workflows directory in the root of your repository.
Copy Workflow File:
Copy the contents of .github/workflows/rank-features.yml from this
repository into a new file named rank-features.yml inside your repository's .github/workflows/ directory.
Create Scripts Directory:
If it doesn't exist, create the .github/scripts directory in the root of your repository.
Copy Script File:
Copy the contents of .github/scripts/rank_issues.ts from this repository into
a new file named rank_issues.ts inside your repository's .github/scripts/ directory.
Customize (Optional):
Open your .github/workflows/rank-features.yml file and adjust the following settings if needed:
cron schedule under
on: to run more or less frequently.
cron: '0 0 * * *' (Daily at 00:00 UTC)FEATURE_LABEL environment variable under env: if you use a different label for feature
requests (e.g., enhancement).OUTPUT_FILE environment variable if you want to name the generated Markdown file
differently or place it elsewhere.gh-pages), add a COMMIT_BRANCH environment variable under env:.COMMIT_MESSAGE environment variable for a custom commit message.Commit & Push:
Commit these two new files (.github/workflows/rank-features.yml and .github/scripts/rank_issues.ts) to your
repository.
That's it! The action will run on the next scheduled time (daily at midnight UTC by default) or you can trigger it manually from the "Actions" tab in your repository (look for "Rank Feature Requests").
rank-features.yml)You can customize the action's behavior by modifying the env: section within your
.github/workflows/rank-features.yml file:
FEATURE_LABEL: (Required) The label used to identify feature request issues.feature-requestOUTPUT_FILE: (Required) The path (relative to the repo root) where the Markdown report will be saved.RANKED_FEATURES.mdCOMMIT_MESSAGE: (Optional) The commit message used when updating the report file.Update ranked features listCOMMIT_BRANCH: (Optional) The branch to commit the report file to. If not set, uses the repository's default branch.gh-pagesContributions are welcome! Feel free to open an issue or submit a pull request to improve this action.
This project is licensed under the MIT License - see the LICENSE file for details.