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
3 changes: 2 additions & 1 deletion plugins/protected-branch/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ export default class ProtectedBranchPlugin implements IPlugin {
});
} catch (e) {
// Silently ignore reference not found error since the ref might already be deleted
if (!e || e.status !== 422 || e.message !== "Reference does not exist") {
// GitHub API may return either 422 or 404 for non-existent references
if (!e || (e.status !== 422 && e.status !== 404) || e.message !== "Reference does not exist") {
throw e;
}
}
Expand Down