()
| 220 | } |
| 221 | |
| 222 | private async getAndUnset(): Promise<string> { |
| 223 | let configValue = '' |
| 224 | // Save and unset persisted extraheader credential in git config if it exists |
| 225 | if ( |
| 226 | await this.git.configExists( |
| 227 | this.extraheaderConfigKey, |
| 228 | this.extraheaderConfigValueRegex |
| 229 | ) |
| 230 | ) { |
| 231 | configValue = await this.git.getConfigValue( |
| 232 | this.extraheaderConfigKey, |
| 233 | this.extraheaderConfigValueRegex |
| 234 | ) |
| 235 | if ( |
| 236 | await this.git.tryConfigUnset( |
| 237 | this.extraheaderConfigKey, |
| 238 | this.extraheaderConfigValueRegex |
| 239 | ) |
| 240 | ) { |
| 241 | core.info(`Unset config key '${this.extraheaderConfigKey}'`) |
| 242 | } else { |
| 243 | core.warning( |
| 244 | `Failed to unset config key '${this.extraheaderConfigKey}'` |
| 245 | ) |
| 246 | } |
| 247 | } |
| 248 | return configValue |
| 249 | } |
| 250 | |
| 251 | private async gitConfigStringReplace( |
| 252 | find: string, |
no test coverage detected