Skip to content

Add --language and --keyword flags for improved issue filtering#43

Open
kholoud512 wants to merge 10 commits intoyankeexe:masterfrom
kholoud512:add-language-keyword-flags
Open

Add --language and --keyword flags for improved issue filtering#43
kholoud512 wants to merge 10 commits intoyankeexe:masterfrom
kholoud512:add-language-keyword-flags

Conversation

@kholoud512
Copy link
Copy Markdown

@kholoud512 kholoud512 commented Nov 9, 2025

  1. Purpose of the change
    At the moment, the CLI tool shows all “good first issues” without providing filters for language or topic.
    This limitation makes it difficult for contributors to quickly locate issues relevant to their expertise or interests.
    Introducing filtering options will make the tool more practical and efficient.

  2. Overview of the implementation
    This pull request introduces two additional command-line flags to enhance issue filtering capabilities:

--language: filters issues by programming language
--keyword: filters issues containing particular words in their titles or descriptions

These new options allow users to narrow down search results and easily find the most relevant issues.

  1. How to test this feature
    After pulling the changes, run the tool with the new flags:

good-first-issues --language python
good-first-issues --keyword "api"
good-first-issues --language javascript --keyword "frontend"

✅ The output should display only the issues matching your filters.

  1. Additional notes
  • Updated CLI argument parsing logic
  • Adjusted usage documentation
  • No breaking changes introduced
  1. Related issue
    Fixes Add filtering options for programming language and keyword search #42

@kholoud512 kholoud512 changed the title Proposal: Add --language and --keyword flags to filter issues by lang… Add --language and --keyword flags for improved issue filtering Nov 10, 2025
@kholoud512
Copy link
Copy Markdown
Author

@yankeexe
Hello!
I'm interested in contributing to this project and would like to take this issue.
Can you please confirm me?

Thank you!

kholoud512 and others added 6 commits November 13, 2025 22:08
- Add --language flag to filter issues by programming language
- Add --keyword flag to filter issues by keywords in title
- Both filters use case-insensitive matching
- Display helpful messages when no results match filters
- Show active filters in output for user clarity

Resolves yankeexe#42
- Fix indentation of filter block (was causing syntax issues)
- Update README and feature documentation
- Ensure proper code formatting
@kholoud512 kholoud512 force-pushed the add-language-keyword-flags branch from dbf623e to 7d6716f Compare November 13, 2025 22:41
Copy link
Copy Markdown

@iamteamstar iamteamstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great progress on moving the arguments to search.py using Click! The CLI options and the README updates look perfect.

However, there is a critical logical bug in how the filtering is applied, specifically with the --language flag. I've left a comment on the exact lines, but essentially, the script is searching for the programming language inside the issue title, which won't work. Let's fix that filtering logic and we'll be good to go


# Data Filtering
if mode == "org" or mode == "user":
if mode in ["org", "user"]:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this works, a more 'Pythonic' and efficient way to filter lists is by using list comprehensions. You can reduce this entire block to a single line:
issues = [issue for issue in issues if keyword.lower() in issue[0].lower()]

filtered_issues = []
for issue in issues:
title = issue[0].lower()
if keyword.lower() in title:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, the code checks if the language string exists inside the issue title (issue[0]). Issue titles rarely mention the programming language (e.g., a title is usually 'Fix bug in login', not 'Fix bug in login Python'). Because of this, the language filter will almost always return an empty list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add filtering options for programming language and keyword search

2 participants