Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for merge attempts with blocked state #203

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
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: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ const {
retry
} = __nccwpck_require__(6979);

const MAYBE_READY = ["clean", "has_hooks", "unknown", "unstable"];
const MAYBE_READY = ["clean", "has_hooks", "unknown", "unstable", "blocked"];
const NOT_READY = ["dirty", "draft"];

const PR_PROPERTY = new RegExp("{pullRequest.([^}]+)}", "g");
Expand Down Expand Up @@ -23227,7 +23227,7 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"]
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"name":"automerge-action","version":"0.15.4","description":"GitHub action to automatically merge pull requests","main":"lib/api.js","author":"Pascal","license":"MIT","private":true,"bin":{"automerge-action":"./bin/automerge.js"},"scripts":{"test":"jest","it":"node it/it.js","lint":"prettier -l lib/** test/** && eslint .","compile":"ncc build bin/automerge.js --license LICENSE -o dist","prepublish":"yarn lint && yarn test && yarn compile"},"dependencies":{"@actions/core":"^1.10.0","@octokit/rest":"^19.0.5","argparse":"^2.0.1","fs-extra":"^10.1.0","object-resolve-path":"^1.1.1","tmp":"^0.2.1"},"devDependencies":{"@vercel/ncc":"^0.34.0","dotenv":"^16.0.3","eslint":"^8.25.0","eslint-plugin-jest":"^27.1.2","jest":"^29.2.0","prettier":"^2.7.1"},"prettier":{"trailingComma":"none","arrowParens":"avoid"}}');
module.exports = JSON.parse('{"name":"automerge-action","version":"0.15.5","description":"GitHub action to automatically merge pull requests","main":"lib/api.js","author":"Pascal","license":"MIT","private":true,"bin":{"automerge-action":"./bin/automerge.js"},"scripts":{"test":"jest","it":"node it/it.js","lint":"prettier -l lib/** test/** && eslint .","compile":"ncc build bin/automerge.js --license LICENSE -o dist","prepublish":"yarn lint && yarn test && yarn compile"},"dependencies":{"@actions/core":"^1.10.0","@octokit/rest":"^19.0.5","argparse":"^2.0.1","fs-extra":"^10.1.0","object-resolve-path":"^1.1.1","tmp":"^0.2.1"},"devDependencies":{"@vercel/ncc":"^0.34.0","dotenv":"^16.0.3","eslint":"^8.25.0","eslint-plugin-jest":"^27.1.2","jest":"^29.2.0","prettier":"^2.7.1"},"prettier":{"trailingComma":"none","arrowParens":"avoid"}}');

/***/ })

Expand Down
2 changes: 1 addition & 1 deletion lib/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
retry
} = require("./common");

const MAYBE_READY = ["clean", "has_hooks", "unknown", "unstable"];
const MAYBE_READY = ["clean", "has_hooks", "unknown", "unstable", "blocked"];
const NOT_READY = ["dirty", "draft"];

const PR_PROPERTY = new RegExp("{pullRequest.([^}]+)}", "g");
Expand Down
2 changes: 1 addition & 1 deletion test/merge.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ test("Base branch not listed then PR is skipped", async () => {
test("Unmergeable pull request fails action with non-zero exit code", async () => {
// GIVEN
const pr = pullRequest();
pr.mergeable_state = "blocked";
pr.mergeable_state = "behind";
const config = createConfig({ MERGE_ERROR_FAIL: "true" });
octokit.pulls.get = async () => ({ data: pr });

Expand Down