question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Probot throwing HttpError when trying to add member to a team

See original GitHub issue

Bug Report

Current Behavior When attempting to use the below function, an error is throw that says

ERROR probot: Validation Failed: {"code":"no_permission","field":"user","resource":"TeamMember"}
  HttpError: Validation Failed: {"code":"no_permission","field":"user","resource":"TeamMember"}
  const results = await context.github.teams.addOrUpdateMembershipLegacy({
        team_id: accessTeamId,
        username: authorOfPR
    });

Expected behavior/code The member should be added to the team

Environment

  • Probot version(s): 9.9.1
  • @octokit/rest version: 16.40.1
  • Node/npm version: Node 12.10.0 / npm 6.10.3
  • OS: Windows 10

Possible Solution I’m not entirely sure if this is an issue with Probot or Octokit since I’m not sure how to get more details than just the error message I added above.

Additional context/Screenshots We have GitHub Enterprise version 2.18.4 (which is why I have to use the legacy request)

I can make requests appropriately to create a team and to remove a member from a team, but when I try to add a member to a team it errors. I’m pretty sure the privs needed to remove someone would be the same as adding, so it doesn’t seem to be a permission/priv problem.

Any help would be greatly appreciated!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kjc17710commented, Mar 2, 2020

Our Enterprise version was updated to 2.20.0 and the request works now! 😄

1reaction
kjc17710commented, Feb 18, 2020

GitHub Enterprise Support confirmed its a known issue in my enterprise version and was fixed in the next patch release. It’s listed in their release notes, the third bullet under Bug Fixes https://enterprise.github.com/releases/2.18.5/notes. My company will be upgrading to the next minor version at the end of the month, so hopefully that fix was properly carried forward into 2.19. Thank you for your help @gr2m!

<div>GitHub Enterprise</div><div>GitHub Enterprise - The best way to build and ship software</div><div>The power of GitHub's social coding for your own workgroup. Pricing, tour and more.</div>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Probot App throwing "Resource Not Accessible By ...
I have been trying to create a simple Probot app that amongst other things will merge PRs on certain criteria being met.
Read more >
ProBot Commands
Are you new to ProBot and want to know about all the commands and their usage? You've come to the right place! All;...
Read more >
Mergeable Documentation
Install the Mergeable GitHub App. 2. Create your recipe(s) using Configuration or check out some ready to use examples at Recipes.
Read more >
Discord ProBot - Complete Invite & Setup Guide - YouTube
Complete tutorial for using ProBot on Discord. Including how to invite it to your server, setup settings on the bot Dashboard, ...
Read more >
Untitled
Marquette basketball roster 2010, Legionario romano vestimenta, Art. 26 do codigo ... Christian godfirnon, Gapo tak tido lagi, Paperpk add, Natasa cirkovic, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found