ersilia-os / ersilia

The Ersilia Model Hub, a repository of AI/ML models for infectious and neglected disease research.
https://ersilia.io
GNU General Public License v3.0
203 stars 131 forks source link

🐛 Bug: `/approve` command triggers workflows outside the "Model Request" issue template #962

Open miquelduranfrigola opened 7 months ago

miquelduranfrigola commented 7 months ago

Describe the bug.

The /approve command triggers workflows to create a model repository when an Ersilia Maintainer approves a model request issue. This workflow runs every time a user (possibly only Ersilia maintainers) comment on any issue within this repository, whereas this workflow should be triggered only when the related issue is a "Model Request" issue.

This is a good first issue and provides a starting point for learning more about GitHub actions. The workflow being referenced is implemented here.

This can potentially be fixed by making the job within this workflow execute conditionally based on the issue label. You can find an example here.

Describe the steps to reproduce the behavior

You can see the number of times this action has run where it was not relevant here.

To reproduce this issue yourself, please open an issue, and tag one of the maintainers to comment on it. Once a maintainer comments on it, the workflow will be triggered.

Expected behavior.

One possibility would be to modify the first triggered action to check for a new-model, as suggested by @GrantBirki .

To make sure the implemented fix works, please tag a maintainer to post a comment on an issue and verify if the workflow no longer gets triggered.

Screenshots.

No response

Operating environment

Ubuntu 20.04 LTS

Additional context

No response

GemmaTuron commented 1 week ago

Is this a persisting issue? seems quite straightforward to fix. Perhaps a good first issue?

DhanshreeA commented 1 week ago

I agree - straightforward. We simply need to add a label filter in this workflow, like we have it in ersilia-self-service.