-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create better comments #6
Conversation
Improving the issue comment💡Did you know that GitHub Script also grants you access to a full Node.js environment? Although we wouldn't recommend using GitHub Script to write the logic for complex actions, there are use cases where you may want to leverage using a little more than just the octokit/rest.js API. One such use case is our issue comment. Right now it is pretty hard coded the way it is making it less than ideal. What if we wanted to display our contribution guide every time an issue was opened? Instead of writing the guide directly into our workflow, we can use the Node.js File System module to read a file and use it as the body of our issue comment. If we want access to the files within our repository, we need to make sure we include the |
Use a comment template from the repositoryWe will make the following changes to the current workflow file:
⌨️ Activity: Use the FS module to use a templated comment
I am waiting for you to commit the desired changes to this branch before moving on. I'll respond once you've committed the changes to this branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time to see the magic in action!
@axelboniface, All of the necessary changes have been made, and our workflow now contains enough information to be quite awesome!
⌨️ Activity: Merge the workflow
When you are ready, merge this pull request.
I am waiting for you to merge this pull request before moving on.
Once you have merged this pull request I will open a new issue so we can see this workflow in action!
Trouble merging?
Try refreshing the page!
A new issue has been openedI have created a new issue where we will continue this lesson. Click the link to meet me over there. |
No description provided.