Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should new prefix issue workflow logic consider one or more issues? #1267

Closed
bgyori opened this issue Nov 20, 2024 · 2 comments
Closed

Should new prefix issue workflow logic consider one or more issues? #1267

bgyori opened this issue Nov 20, 2024 · 2 comments

Comments

@bgyori
Copy link
Contributor

bgyori commented Nov 20, 2024

Currently (as well as before the changes in #1258), the code turning new prefix issues into PRs iterates over multiple issues and thereby considers multiple prefixes simultaneously for addition. An example of this is #1266 where both #1257 and #1265 were processed and added to a PR.

Should this logic be preserved, or alternatively, should we look at the payload in this section
https://github.com/biopragmatics/bioregistry/blob/main/.github/workflows/new_prefix_pr.yml#L24-L26
to figure out what specific new issue triggered the workflow, and just create a PR from that given issue, not other past issues?

@nagutm
Copy link
Collaborator

nagutm commented Nov 20, 2024

Based on the last line of this comment: #1193 (review), I have been creating individual PRs for every new curation in order to limit the scope and not create too much cross communication between unrelated resources where information can easily get lost.

If we want to continue this then it probably makes more sense to limit the workflow to not iterate over every open issue. Especially considering that we often make edits and suggestions to the content of a new entry before merging it.

bgyori added a commit that referenced this issue Jan 27, 2025
This pull request addresses the following issue:
#1267

The purpose of this PR is to update the new prefix issue workflow logic
to only process the issue that triggered the workflow and not iterate
over every relevant open issue as it currently does. I've outlined the
changes below:

`github_client.py`:
- Added `get_form_data_for_issue` function to retrieve and parse form
data for a specific issue

`new_prefix.py`:
- Updated the main function to accept an optional issue parameter
- Uses `get_form_data_for_issue` to only process information about the
prefix corresponding to the specific issue number
- Only searches all relevant new prefix issues if issue parameter not
provided

`new_prefix_pr.yml`:
- Added logic to extract issue number and run workflow only on that
specific issue

Thanks to @bgyori for writing most of the logic to handle these changes
in the `new_prefix_single` branch
I have tested the logic in a forked repository which shows that the
updated workflow successfully generated a PR when a specific issue
number is provided as a parameter

---------

Co-authored-by: Benjamin M. Gyori <[email protected]>
Co-authored-by: Charles Tapley Hoyt <[email protected]>
@bgyori
Copy link
Contributor Author

bgyori commented Jan 28, 2025

The single-issue-based workflow was implemented in #1376 and seems to have worked successfully for #1381.

@bgyori bgyori closed this as completed Jan 28, 2025
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

No branches or pull requests

2 participants