Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

196
Vistas
Is there a way to accept github invitation as collaborator automatically? Preferably with octokit?

I've been using octokit to fetch github repos and their commits, but I realized that if the repo is private then the person must invite me, and I have to accept that manually every time. I found this as a solution but to be honest I am not sure how I could use it.

This is the method I fetch github repos:

<script type="module">
        import { Octokit } from "https://cdn.pika.dev/@octokit/core";
        
        const octokit = new Octokit({ auth: "*authkey*" });
        octokit.request('GET /repos/:owner/:repo/commits', {
        owner: "*owner*",
        repo: "*repo*"
        }).then(response => console.log(response.data))
    </script>
    

Thank you for your help in advance!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I've never worked with GitHub invitations via API but apparently Octokit offers the option to create an invite, list all existing invites for a user or a repository and accept or decline an invite:

  • https://octokit.github.io/rest.js/v18#repos-accept-invitation
  • https://octokit.github.io/rest.js/v18#repos-list-invitations

I guess you can play with this and get your goal, right?

Also, if you are using GitHub API for a certain group of repositories, I recommend you take a look into https://github.com/octoherd. It offers an easy way to create scripts and re-use existing utilities for interacting with GitHub's API with Octokit.

Let us know if you still have problems with this.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda