tasks/libs/common/githubapp.py
def make_request(self, endpoint, method='GET', data=None):
        """
        Make an HTTP request to the Github API, while using a token crafted from the App ID and
        private key to authenticate ourselves as a Github App.

        endpoint is the HTTP enpoint that will be requested.

        The method parameter dictates the type of request made (GET or POST).
        If method is GET, the data parameter is ignored (no body can be sent in a GET request).

        """
        import requests

        url = self.base_url + endpoint

        if method == 'GET':
            return requests.get(url, headers=self.get_headers())
        if method == 'POST':
            if data:
                return requests.post(url, data=data, headers=self.get_headers())
            else:
                return requests.post(url, headers=self.get_headers())

        Make an HTTP request to the Github API, while using a token crafted from the App ID and
        private key to authenticate ourselves as a Github App.

        endpoint is the HTTP enpoint that will be requested.

        The method parameter dictates the type of request made (GET or POST).
        If method is GET, the data parameter is ignored (no body can be sent in a GET request).

        
Make an HTTP request to the Github API, while using a token crafted from the App ID and
private key to authenticate ourselves as a Github App.

endpoint is the HTTP enpoint that will be requested.

The method parameter dictates the type of request made (GET or POST).
If method is GET, the data parameter is ignored (no body can be sent in a GET request).
Make an HTTP request to the Github API while using a token crafted from the App ID and private key to authenticate ourselves as a Github App . endpoint is the HTTP enpoint that will be requested . The method parameter dictates the type of request made ( GET or POST ) . If method is GET the data parameter is ignored ( no body can be sent in a GET request ) .
def make_request(self, endpoint, method='GET', data=None):
        import requests
        url = self.base_url + endpoint
        if method == 'GET':
            return requests.get(url, headers=self.get_headers())
        if method == 'POST':
            if data:
                return requests.post(url, data=data, headers=self.get_headers())
            else:
                return requests.post(url, headers=self.get_headers())
def make_request ( self , endpoint , method = 'GET' , data = None ) : import requests url = self . base_url + endpoint if method == 'GET' : return requests . get ( url , headers = self . get_headers ( ) ) if method == 'POST' : if data : return requests . post ( url , data = data , headers = self . get_headers ( ) ) else : return requests . post ( url , headers = self . get_headers ( ) )
Make an HTTP request to the Github API, while using a token crafted from the App ID and
private key to authenticate ourselves as a Github App.
Make an HTTP request to the Github API while using a token crafted from the App ID and private key to authenticate ourselves as a Github App .
"""
        Make an HTTP request to the Github API, while using a token crafted from the App ID and
        private key to authenticate ourselves as a Github App.

        endpoint is the HTTP enpoint that will be requested.

        The method parameter dictates the type of request made (GET or POST).
        If method is GET, the data parameter is ignored (no body can be sent in a GET request).

        """
self
endpoint
method
data