Skip to content

Commit

Permalink
refactor: incorporate PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
setchy committed Jul 2, 2023
1 parent 86361d3 commit e32d18c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/modules/platform/bitbucket/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export async function initRepo({
owner: info.owner,
mergeMethod: info.mergeMethod,
has_issues: info.has_issues,
isPrivate: info.isPrivate,
is_private: info.is_private,
};

logger.debug(`${repository} owner = ${config.owner}`);
Expand Down Expand Up @@ -315,11 +315,11 @@ export async function findPr({
* Bitbucket doesn't support renaming or reopening declined PRs.
* Instead, we have to use comment-driven signals.
*/
if (pr && pr.state === 'closed') {
if (pr?.state === 'closed') {
const reopenComments = await comments.reopenComments(config, pr.number);

if (is.nonEmptyArray(reopenComments)) {
if (config.isPrivate) {
if (config.is_private) {
// Only workspace members could have commented on a private repository
logger.debug(
`Found '${comments.REOPEN_PR_COMMENT_KEYWORD}' comment from workspace member. Renovate will reopen PR ${pr.number} as a new PR`
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/platform/bitbucket/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface Config {
prList: Pr[];
repository: string;
ignorePrAuthor: boolean;
isPrivate: boolean;
is_private: boolean;
}

export interface PagedResult<T = any> {
Expand All @@ -33,7 +33,7 @@ export interface RepoInfo {
mergeMethod: string;
has_issues: boolean;
uuid: string;
isPrivate: boolean;
is_private: boolean;
}

export interface RepoBranchingModel {
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/platform/bitbucket/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function repoInfoTransformer(repoInfoBody: RepoInfoBody): RepoInfo {
mergeMethod: 'merge',
has_issues: repoInfoBody.has_issues,
uuid: repoInfoBody.uuid,
isPrivate: repoInfoBody.is_private,
is_private: repoInfoBody.is_private,
};
}

Expand Down

0 comments on commit e32d18c

Please sign in to comment.