Hello everyone,
I’m currently working on a Python project and I’m facing a challenge in filtering issues from a repository that don’t have any associated pull requests. I would greatly appreciate it if someone could help me with this issue.
Here’s the code snippet I’m using:
pythonCopy code
new_issues = []
for index, row in contributor_filtered_df.iterrows():
contributor = row["assignee"]
issues = repo.get_issues(state="open", assignee=contributor)
for issue in issues:
if not any(pr.number == issue.number for pr in pull_requests):
new_issues.append(issue)
new_issues = list({issue.number: issue for issue in new_issues}.values())
# Print the new issues
print("New Issues:")
for issue in new_issues:
print(f"Issue Title: {issue.title}")
print(f"Issue Number: {issue.number}")
print(f"Issue URL: {issue.html_url}")
print("--------------------------")
I’m trying to obtain a list of issues that are assigned to specific contributors but don’t have any associated pull requests. However, I’m encountering some issues with the code.
If anyone could help me understand and resolve this issue, I would be extremely grateful. If you need the full code ask me
Thank you in advance for your assistance!