(self, label: str)
add label to pull request
add label to pull request
add label to pull request
async def add_label(self, label: str) -> None:
        """
        add label to pull request
        """
        self.log.info("add_label", label=label)
        async with self.client(
            installation_id=self.install, owner=self.owner, repo=self.repo
        ) as api_client:
            res = await api_client.add_label(label, pull_number=self.number)
            try:
                res.raise_for_status()
            except HTTPError:
                self.log.warning(
                    "failed to add label", label=label, res=res, exc_info=True
                )
                raise ApiCallException(
                    method="pull_request/add_label",
                    http_status_code=res.status_code,
                    response=res.content,
                )
async def add_label ( self , label : str ) -> None : self . log . info ( "add_label" , label = label ) async with self . client ( installation_id = self . install , owner = self . owner , repo = self . repo ) as api_client : res = await api_client . add_label ( label , pull_number = self . number ) try : res . raise_for_status ( ) except HTTPError : self . log . warning ( "failed to add label" , label = label , res = res , exc_info = True ) raise ApiCallException ( method = "pull_request/add_label" , http_status_code = res . status_code , response = res . content , )