:calls: `PATCH /orgs/{org}/actions/variables/{name} `_ :param variable_name: string :param value: string :param visibility: string :rtype: bool
(
self,
value: str,
visibility: str = "all",
)
| 82 | ) |
| 83 | |
| 84 | def edit( |
| 85 | self, |
| 86 | value: str, |
| 87 | visibility: str = "all", |
| 88 | ) -> bool: |
| 89 | """ |
| 90 | :calls: `PATCH /orgs/{org}/actions/variables/{name} <https://docs.github.com/en/rest/reference/actions/variables#update-an-organization-variable>`_ |
| 91 | :param variable_name: string |
| 92 | :param value: string |
| 93 | :param visibility: string |
| 94 | :rtype: bool |
| 95 | """ |
| 96 | assert isinstance(value, str), value |
| 97 | assert isinstance(visibility, str), visibility |
| 98 | |
| 99 | patch_parameters: dict[str, Any] = { |
| 100 | "name": self.name, |
| 101 | "value": value, |
| 102 | "visibility": visibility, |
| 103 | } |
| 104 | |
| 105 | status, _, _ = self._requester.requestJson( |
| 106 | "PATCH", |
| 107 | f"{self.url}/actions/variables/{self.name}", |
| 108 | input=patch_parameters, |
| 109 | ) |
| 110 | return status == 204 |
| 111 | |
| 112 | def add_repo(self, repo: Repository) -> bool: |
| 113 | """ |
nothing calls this directly
no test coverage detected