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

Update approve-trigger.yml #1300

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

aderemi1224
Copy link

@aderemi1224 aderemi1224 commented Oct 7, 2024

Thank you for taking your time to contribute to Ersilia, just a few checks before we proceed

  • Have you followed the guidelines in our Contribution Guide
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Description
This project addresses the current implementation of the /approve command in the Ersilia repository, which unintentionally triggers workflows to create a model repository for any comment made on any issue. The objective is to refine this functionality so that the workflow is executed only for "new-model" issues. Originally, the workflow would activate for any comment on any issue, without checking if the issue was related to creating a new model. This led to unwanted triggers.

Changes to be made

  • I updated the if condition in the job approve-command-trigger to ensure the workflow only runs when the issue has a label matching 'new model':
    if: contains(github.event.issue.labels.*.name, 'new-model')
    This ensures that the workflow does not activate for every comment but is instead filtered to respond only when a specific label is applied to the issue.

Status

  • I have successfully modified the trigger to activate only when comments are made on issues labeled "new-model". The label-based filtering using the if condition ensures that the workflow now only executes when an issue has the "new-model" label, preventing it from triggering other types of issues.

Is this pull request related to any open issue? If yes, replace issueID below with the issue ID

Related to #962

@aderemi1224
Copy link
Author

@DhanshreeA Please kindly review

@dzumii
Copy link
Contributor

dzumii commented Oct 9, 2024

@aderemi1224 Have you tested your changes? If yes, can you share details with us regarding your test before and after the changes were made?

.github/workflows/approve-trigger.yml Outdated Show resolved Hide resolved
.github/workflows/approve-trigger.yml Outdated Show resolved Hide resolved
.github/workflows/approve-trigger.yml Show resolved Hide resolved
I have removed the steps that log messages related to the approval process and label checking. The workflow now triggers the approval command when the 'Model Request' label is detected, streamlining the process by eliminating log outputs.
reactions: false
commands: |
approve
- name: Approve Command Trigger
Copy link
Member

Choose a reason for hiding this comment

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

We should keep the single tab indentation

Copy link
Member

Choose a reason for hiding this comment

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

@aderemi1224 can you please restore the indentation?

jobs:
approve-command-trigger:
if: contains(github.event.issue.labels.*.name, 'Model Request')
Copy link
Member

Choose a reason for hiding this comment

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

The label is actually called new-model, and not Model Request.

Copy link
Member

Choose a reason for hiding this comment

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

@Aderemi24
Copy link

@DhanshreeA I have made changes

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.

4 participants