Invite Workflow Sporadically Failing
Description
During today's Open Source 101 presentation the invite workflow failed without an obvious explanation. It went through to line 25 of the run.rb file because it puts out USER: #{user} and sends an invite via email, but it does not execute from lines 28 downward.
Screenshots

Files
-
start-here/action/run.rb - Invite a contributor #146: Issue comment #100 (comment) created by mikemiles86
To Reproduce
It looks as though any PR from a contributor that triggers the workflow will yield this same result.
Possible Cause
After investigating the issue further, I think the cause lies with Octokit not updating their code to match GitHub's API endpoints.
References
- Octokit Issue #1327
- GitHub deprecation announcement
- Octokit's current documentation: #add_team_membership
- GitHub's current documentation: Add or update team membership for a user
Solutions
- Use @octokit/core.js instead.
- Create a PR against the aforementioned issue in octokit.rb and see if that solves the problem! It looks like quite an involved process for creating a PR on that repo—I'll co-author it with you if you'd like!
It's still under maintenance Thank you so much for this discovery!
Because I want to stay on top of everything that goes on in this organization and of course, as a good dev, you have to know about the challenges of this incredible world of programming