Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/setupClaCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export async function setupClaCheck() {
)
}
} catch (err) {
core.setFailed(`Could not update the JSON file: ${err.message}`)
let extraInfo = '';
if (err.message.includes('Changes must be made through a pull request')) extraInfo = ' (The branch appears to be protected - please disable the protection)';
Copy link
Member

@ibakshay ibakshay Feb 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laurent22 Could you please check why the content inside extraInfo variable is not printed in the error logs?
I tested your contribution from my test repository after enabling branch protection.
Screenshot 2023-02-16 at 14 39 25

core.setFailed(`Could not update the JSON file: ${err.message}${extraInfo}`)
}
}

Expand Down