Make branch protection attempt less restrictive
In case if something wrong happens along the way when trying to apply protection of a newly created branch - log error, instead of throwing an it, making scaffolder exit with non-zero exit code. This one addresses the issue #6330 Signed-off-by: Eugene S <jh.sh@me.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
removing mandatory of protection for the default branch, that could be handled by the GitHub automation in async manner, thus throwing floating errors
|
||||
@@ -268,8 +268,8 @@ export function createPublishGithubAction(options: {
|
||||
defaultBranch,
|
||||
});
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Failed to add branch protection to '${newRepo.name}', ${e}`,
|
||||
ctx.logger.warn(
|
||||
`Skipping: default branch protection on '${newRepo.name}', ${e.message}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user