You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I created a GitHub workflow that automatically assigns a label to an issue based on its title and description after the issue is created or edited.
To test this workflow locally, I struggled a lot because using a test repository wasn't very convenient. I found this tool that helps run GitHub Actions workflows locally.
The problem is that my workflow requires the issue creation event to extract the title and labels from the issue and based on these two parameters assigns a label to the issue from the repo available labels.
To simulate this, I created a JSON file with an actual issue object from my test repository and provided it to the act command using the -e flag for a scenario like this:
Could anyone suggest why this might be happening? Am I missing something in the setup, or is there another way to simulate an issue context for testing? Thank you for any help!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I created a GitHub workflow that automatically assigns a label to an issue based on its title and description after the issue is created or edited.
To test this workflow locally, I struggled a lot because using a test repository wasn't very convenient. I found this tool that helps run GitHub Actions workflows locally.
The problem is that my workflow requires the issue creation event to extract the title and labels from the issue and based on these two parameters assigns a label to the issue from the repo available labels.
To simulate this, I created a JSON file with an actual issue object from my test repository and provided it to the act command using the -e flag for a scenario like this:
act -W .github/workflows/issue-created.yml -e scenarios/create-issue-event.json
However, when the workflow runs locally, I encounter an error stating that the issue does not exist, or every field of the issue is
undefined
:Could anyone suggest why this might be happening? Am I missing something in the setup, or is there another way to simulate an issue context for testing? Thank you for any help!
Beta Was this translation helpful? Give feedback.
All reactions