renovate 44.29.4 → 44.29.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/error-messages.d.ts +2 -1
- package/dist/constants/error-messages.js +2 -1
- package/dist/constants/error-messages.js.map +1 -1
- package/dist/modules/platform/github/graphql.js +20 -1
- package/dist/modules/platform/github/graphql.js.map +1 -1
- package/dist/modules/platform/github/index.js +53 -5
- package/dist/modules/platform/github/index.js.map +1 -1
- package/dist/modules/platform/github/pr.js +33 -1
- package/dist/modules/platform/github/pr.js.map +1 -1
- package/dist/modules/platform/github/scm.js +3 -2
- package/dist/modules/platform/github/scm.js.map +1 -1
- package/dist/workers/repository/update/branch/index.js +9 -0
- package/dist/workers/repository/update/branch/index.js.map +1 -1
- package/package.json +1 -1
- package/renovate-schema.json +2 -2
|
@@ -48,6 +48,7 @@ declare const EXTERNAL_HOST_ERROR = "external-host-error";
|
|
|
48
48
|
declare const IGNORABLE_HOST_ERROR = "ignorable-host-error";
|
|
49
49
|
declare const HOST_DISABLED = "host-disabled";
|
|
50
50
|
declare const WORKER_FILE_UPDATE_FAILED = "update-failure";
|
|
51
|
+
declare const PR_ALREADY_IN_MERGE_QUEUE = "pr-already-in-merge-queue";
|
|
51
52
|
declare const BUNDLER_INVALID_CREDENTIALS = "bundler-credentials";
|
|
52
53
|
declare const UNKNOWN_ERROR = "unknown-error";
|
|
53
54
|
declare const INVALID_PATH = "invalid-path";
|
|
@@ -56,5 +57,5 @@ declare const MISSING_API_CREDENTIALS = "missing-api-credentials";
|
|
|
56
57
|
/** Logger not initialized */
|
|
57
58
|
declare const LOGGER_NOT_INITIALIZED = "logger-not-initialized";
|
|
58
59
|
//#endregion
|
|
59
|
-
export { BUNDLER_INVALID_CREDENTIALS, CONFIG_GIT_URL_UNAVAILABLE, CONFIG_INHERIT_NOT_FOUND, CONFIG_INHERIT_PARSE_ERROR, CONFIG_PRESETS_INVALID, CONFIG_SECRETS_EXPOSED, CONFIG_SECRETS_INVALID, CONFIG_VALIDATION, CONFIG_VARIABLES_INVALID, ConfigErrors, EXTERNAL_HOST_ERROR, FILE_ACCESS_VIOLATION_ERROR, HOST_DISABLED, IGNORABLE_HOST_ERROR, INVALID_PATH, LOGGER_NOT_INITIALIZED, MANAGER_LOCKFILE_ERROR, MISSING_API_CREDENTIALS, NO_VULNERABILITY_ALERTS, PAGE_NOT_FOUND_ERROR, PLATFORM_AUTHENTICATION_ERROR, PLATFORM_BAD_CREDENTIALS, PLATFORM_GPG_FAILED, PLATFORM_INTEGRATION_UNAUTHORIZED, PLATFORM_NOT_FOUND, PLATFORM_RATE_LIMIT_EXCEEDED, PLATFORM_UNKNOWN_ERROR, PlatformErrors, REPOSITORY_ACCESS_FORBIDDEN, REPOSITORY_ARCHIVED, REPOSITORY_BLOCKED, REPOSITORY_CANNOT_FORK, REPOSITORY_CHANGED, REPOSITORY_CLOSED_ONBOARDING, REPOSITORY_DISABLED, REPOSITORY_DISABLED_BY_CONFIG, REPOSITORY_EMPTY, REPOSITORY_FORKED, REPOSITORY_FORK_MISSING, REPOSITORY_FORK_MODE_FORKED, REPOSITORY_MIRRORED, REPOSITORY_NOT_FOUND, REPOSITORY_NO_CONFIG, REPOSITORY_NO_PACKAGE_FILES, REPOSITORY_RENAMED, REPOSITORY_UNINITIATED, RepositoryErrors, SYSTEM_INSUFFICIENT_DISK_SPACE, SYSTEM_INSUFFICIENT_MEMORY, SystemErrors, TEMPORARY_ERROR, TemporaryErrors, UNKNOWN_ERROR, WORKER_FILE_UPDATE_FAILED };
|
|
60
|
+
export { BUNDLER_INVALID_CREDENTIALS, CONFIG_GIT_URL_UNAVAILABLE, CONFIG_INHERIT_NOT_FOUND, CONFIG_INHERIT_PARSE_ERROR, CONFIG_PRESETS_INVALID, CONFIG_SECRETS_EXPOSED, CONFIG_SECRETS_INVALID, CONFIG_VALIDATION, CONFIG_VARIABLES_INVALID, ConfigErrors, EXTERNAL_HOST_ERROR, FILE_ACCESS_VIOLATION_ERROR, HOST_DISABLED, IGNORABLE_HOST_ERROR, INVALID_PATH, LOGGER_NOT_INITIALIZED, MANAGER_LOCKFILE_ERROR, MISSING_API_CREDENTIALS, NO_VULNERABILITY_ALERTS, PAGE_NOT_FOUND_ERROR, PLATFORM_AUTHENTICATION_ERROR, PLATFORM_BAD_CREDENTIALS, PLATFORM_GPG_FAILED, PLATFORM_INTEGRATION_UNAUTHORIZED, PLATFORM_NOT_FOUND, PLATFORM_RATE_LIMIT_EXCEEDED, PLATFORM_UNKNOWN_ERROR, PR_ALREADY_IN_MERGE_QUEUE, PlatformErrors, REPOSITORY_ACCESS_FORBIDDEN, REPOSITORY_ARCHIVED, REPOSITORY_BLOCKED, REPOSITORY_CANNOT_FORK, REPOSITORY_CHANGED, REPOSITORY_CLOSED_ONBOARDING, REPOSITORY_DISABLED, REPOSITORY_DISABLED_BY_CONFIG, REPOSITORY_EMPTY, REPOSITORY_FORKED, REPOSITORY_FORK_MISSING, REPOSITORY_FORK_MODE_FORKED, REPOSITORY_MIRRORED, REPOSITORY_NOT_FOUND, REPOSITORY_NO_CONFIG, REPOSITORY_NO_PACKAGE_FILES, REPOSITORY_RENAMED, REPOSITORY_UNINITIATED, RepositoryErrors, SYSTEM_INSUFFICIENT_DISK_SPACE, SYSTEM_INSUFFICIENT_MEMORY, SystemErrors, TEMPORARY_ERROR, TemporaryErrors, UNKNOWN_ERROR, WORKER_FILE_UPDATE_FAILED };
|
|
60
61
|
//# sourceMappingURL=error-messages.d.ts.map
|
|
@@ -87,6 +87,7 @@ const EXTERNAL_HOST_ERROR = "external-host-error";
|
|
|
87
87
|
const IGNORABLE_HOST_ERROR = "ignorable-host-error";
|
|
88
88
|
const HOST_DISABLED = "host-disabled";
|
|
89
89
|
const WORKER_FILE_UPDATE_FAILED = "update-failure";
|
|
90
|
+
const PR_ALREADY_IN_MERGE_QUEUE = "pr-already-in-merge-queue";
|
|
90
91
|
const BUNDLER_INVALID_CREDENTIALS = "bundler-credentials";
|
|
91
92
|
const UNKNOWN_ERROR = "unknown-error";
|
|
92
93
|
const INVALID_PATH = "invalid-path";
|
|
@@ -95,6 +96,6 @@ const MISSING_API_CREDENTIALS = "missing-api-credentials";
|
|
|
95
96
|
/** Logger not initialized */
|
|
96
97
|
const LOGGER_NOT_INITIALIZED = "logger-not-initialized";
|
|
97
98
|
//#endregion
|
|
98
|
-
export { BUNDLER_INVALID_CREDENTIALS, CONFIG_GIT_URL_UNAVAILABLE, CONFIG_INHERIT_NOT_FOUND, CONFIG_INHERIT_PARSE_ERROR, CONFIG_PRESETS_INVALID, CONFIG_SECRETS_EXPOSED, CONFIG_SECRETS_INVALID, CONFIG_VALIDATION, CONFIG_VARIABLES_INVALID, ConfigErrors, EXTERNAL_HOST_ERROR, FILE_ACCESS_VIOLATION_ERROR, HOST_DISABLED, IGNORABLE_HOST_ERROR, INVALID_PATH, LOGGER_NOT_INITIALIZED, MANAGER_LOCKFILE_ERROR, MISSING_API_CREDENTIALS, NO_VULNERABILITY_ALERTS, PAGE_NOT_FOUND_ERROR, PLATFORM_AUTHENTICATION_ERROR, PLATFORM_BAD_CREDENTIALS, PLATFORM_GPG_FAILED, PLATFORM_INTEGRATION_UNAUTHORIZED, PLATFORM_NOT_FOUND, PLATFORM_RATE_LIMIT_EXCEEDED, PLATFORM_UNKNOWN_ERROR, PlatformErrors, REPOSITORY_ACCESS_FORBIDDEN, REPOSITORY_ARCHIVED, REPOSITORY_BLOCKED, REPOSITORY_CANNOT_FORK, REPOSITORY_CHANGED, REPOSITORY_CLOSED_ONBOARDING, REPOSITORY_DISABLED, REPOSITORY_DISABLED_BY_CONFIG, REPOSITORY_EMPTY, REPOSITORY_FORKED, REPOSITORY_FORK_MISSING, REPOSITORY_FORK_MODE_FORKED, REPOSITORY_MIRRORED, REPOSITORY_NOT_FOUND, REPOSITORY_NO_CONFIG, REPOSITORY_NO_PACKAGE_FILES, REPOSITORY_RENAMED, REPOSITORY_UNINITIATED, RepositoryErrors, SYSTEM_INSUFFICIENT_DISK_SPACE, SYSTEM_INSUFFICIENT_MEMORY, SystemErrors, TEMPORARY_ERROR, TemporaryErrors, UNKNOWN_ERROR, WORKER_FILE_UPDATE_FAILED };
|
|
99
|
+
export { BUNDLER_INVALID_CREDENTIALS, CONFIG_GIT_URL_UNAVAILABLE, CONFIG_INHERIT_NOT_FOUND, CONFIG_INHERIT_PARSE_ERROR, CONFIG_PRESETS_INVALID, CONFIG_SECRETS_EXPOSED, CONFIG_SECRETS_INVALID, CONFIG_VALIDATION, CONFIG_VARIABLES_INVALID, ConfigErrors, EXTERNAL_HOST_ERROR, FILE_ACCESS_VIOLATION_ERROR, HOST_DISABLED, IGNORABLE_HOST_ERROR, INVALID_PATH, LOGGER_NOT_INITIALIZED, MANAGER_LOCKFILE_ERROR, MISSING_API_CREDENTIALS, NO_VULNERABILITY_ALERTS, PAGE_NOT_FOUND_ERROR, PLATFORM_AUTHENTICATION_ERROR, PLATFORM_BAD_CREDENTIALS, PLATFORM_GPG_FAILED, PLATFORM_INTEGRATION_UNAUTHORIZED, PLATFORM_NOT_FOUND, PLATFORM_RATE_LIMIT_EXCEEDED, PLATFORM_UNKNOWN_ERROR, PR_ALREADY_IN_MERGE_QUEUE, PlatformErrors, REPOSITORY_ACCESS_FORBIDDEN, REPOSITORY_ARCHIVED, REPOSITORY_BLOCKED, REPOSITORY_CANNOT_FORK, REPOSITORY_CHANGED, REPOSITORY_CLOSED_ONBOARDING, REPOSITORY_DISABLED, REPOSITORY_DISABLED_BY_CONFIG, REPOSITORY_EMPTY, REPOSITORY_FORKED, REPOSITORY_FORK_MISSING, REPOSITORY_FORK_MODE_FORKED, REPOSITORY_MIRRORED, REPOSITORY_NOT_FOUND, REPOSITORY_NO_CONFIG, REPOSITORY_NO_PACKAGE_FILES, REPOSITORY_RENAMED, REPOSITORY_UNINITIATED, RepositoryErrors, SYSTEM_INSUFFICIENT_DISK_SPACE, SYSTEM_INSUFFICIENT_MEMORY, SystemErrors, TEMPORARY_ERROR, TemporaryErrors, UNKNOWN_ERROR, WORKER_FILE_UPDATE_FAILED };
|
|
99
100
|
|
|
100
101
|
//# sourceMappingURL=error-messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-messages.js","names":[],"sources":["../../lib/constants/error-messages.ts"],"sourcesContent":["// System error\nexport const SYSTEM_INSUFFICIENT_DISK_SPACE = 'disk-space';\nexport const SYSTEM_INSUFFICIENT_MEMORY = 'out-of-memory';\n\nexport const SystemErrors = [\n SYSTEM_INSUFFICIENT_DISK_SPACE,\n SYSTEM_INSUFFICIENT_MEMORY,\n] as const;\n\n// Platform Error\nexport const PLATFORM_AUTHENTICATION_ERROR = 'authentication-error';\nexport const PLATFORM_BAD_CREDENTIALS = 'bad-credentials';\nexport const PLATFORM_GPG_FAILED = 'gpg-failed';\nexport const PLATFORM_INTEGRATION_UNAUTHORIZED = 'integration-unauthorized';\nexport const PLATFORM_NOT_FOUND = 'platform-not-found';\nexport const PLATFORM_RATE_LIMIT_EXCEEDED = 'rate-limit-exceeded';\nexport const PLATFORM_UNKNOWN_ERROR = 'platform-unknown-error';\n\nexport const PlatformErrors = [\n PLATFORM_AUTHENTICATION_ERROR,\n PLATFORM_BAD_CREDENTIALS,\n PLATFORM_GPG_FAILED,\n PLATFORM_INTEGRATION_UNAUTHORIZED,\n PLATFORM_NOT_FOUND,\n PLATFORM_RATE_LIMIT_EXCEEDED,\n PLATFORM_UNKNOWN_ERROR,\n] as const;\n\n// Config Error\nexport const CONFIG_VALIDATION = 'config-validation';\nexport const CONFIG_PRESETS_INVALID = 'config-presets-invalid';\nexport const CONFIG_SECRETS_EXPOSED = 'config-secrets-exposed';\nexport const CONFIG_SECRETS_INVALID = 'config-secrets-invalid';\nexport const CONFIG_VARIABLES_INVALID = 'config-variables-invalid';\nexport const CONFIG_GIT_URL_UNAVAILABLE = 'config-git-url-unavailable';\nexport const CONFIG_INHERIT_NOT_FOUND = 'config-inherit-not-found';\nexport const CONFIG_INHERIT_PARSE_ERROR = 'config-inherit-parse-error';\n\nexport const ConfigErrors = [\n CONFIG_VALIDATION,\n CONFIG_PRESETS_INVALID,\n CONFIG_SECRETS_EXPOSED,\n CONFIG_SECRETS_INVALID,\n CONFIG_VARIABLES_INVALID,\n CONFIG_GIT_URL_UNAVAILABLE,\n CONFIG_INHERIT_NOT_FOUND,\n CONFIG_INHERIT_PARSE_ERROR,\n] as const;\n\n// Repository Errors - causes repo to be considered as disabled\nexport const REPOSITORY_ACCESS_FORBIDDEN = 'forbidden';\nexport const REPOSITORY_ARCHIVED = 'archived';\nexport const REPOSITORY_BLOCKED = 'blocked';\nexport const REPOSITORY_CANNOT_FORK = 'cannot-fork';\nexport const REPOSITORY_DISABLED = 'disabled';\nexport const REPOSITORY_CLOSED_ONBOARDING = 'disabled-closed-onboarding';\nexport const REPOSITORY_DISABLED_BY_CONFIG = 'disabled-by-config';\nexport const REPOSITORY_NO_CONFIG = 'disabled-no-config';\nexport const REPOSITORY_EMPTY = 'empty';\nexport const REPOSITORY_FORK_MISSING = 'fork-missing';\nexport const REPOSITORY_FORK_MODE_FORKED = 'fork-mode-forked';\nexport const REPOSITORY_FORKED = 'fork';\nexport const REPOSITORY_MIRRORED = 'mirror';\nexport const REPOSITORY_NOT_FOUND = 'not-found';\nexport const REPOSITORY_NO_PACKAGE_FILES = 'no-package-files';\nexport const REPOSITORY_RENAMED = 'renamed';\nexport const REPOSITORY_UNINITIATED = 'uninitiated';\n\n/** cause repo to be considered as disabled */\nexport const RepositoryErrors = [\n REPOSITORY_ACCESS_FORBIDDEN,\n REPOSITORY_ARCHIVED,\n REPOSITORY_BLOCKED,\n REPOSITORY_CANNOT_FORK,\n REPOSITORY_DISABLED,\n REPOSITORY_CLOSED_ONBOARDING,\n REPOSITORY_DISABLED_BY_CONFIG,\n REPOSITORY_NO_CONFIG,\n REPOSITORY_EMPTY,\n REPOSITORY_FORK_MISSING,\n REPOSITORY_FORK_MODE_FORKED,\n REPOSITORY_FORKED,\n REPOSITORY_MIRRORED,\n REPOSITORY_NOT_FOUND,\n REPOSITORY_NO_PACKAGE_FILES,\n REPOSITORY_RENAMED,\n REPOSITORY_UNINITIATED,\n] as const;\n\n// Temporary Error\nexport const REPOSITORY_CHANGED = 'repository-changed';\nexport const TEMPORARY_ERROR = 'temporary-error';\nexport const NO_VULNERABILITY_ALERTS = 'no-vulnerability-alerts';\n\nexport const TemporaryErrors = [\n REPOSITORY_CHANGED,\n TEMPORARY_ERROR,\n NO_VULNERABILITY_ALERTS,\n] as const;\n\n// Manager Error\nexport const MANAGER_LOCKFILE_ERROR = 'lockfile-error';\nexport const FILE_ACCESS_VIOLATION_ERROR = 'file-access-violation-error';\n\n// Host error\nexport const EXTERNAL_HOST_ERROR = 'external-host-error';\nexport const IGNORABLE_HOST_ERROR = 'ignorable-host-error';\nexport const HOST_DISABLED = 'host-disabled';\n\n// Worker Error\nexport const WORKER_FILE_UPDATE_FAILED = 'update-failure';\n\n// Bundler Error\nexport const BUNDLER_INVALID_CREDENTIALS = 'bundler-credentials';\n\n// Unknown Error\nexport const UNKNOWN_ERROR = 'unknown-error';\n\n// PATH Error\nexport const INVALID_PATH = 'invalid-path';\n\n// PAGE NOT FOUND\nexport const PAGE_NOT_FOUND_ERROR = 'page-not-found';\n\n// Missing API required credentials\nexport const MISSING_API_CREDENTIALS = 'missing-api-credentials';\n\n/** Logger not initialized */\nexport const LOGGER_NOT_INITIALIZED = 'logger-not-initialized';\n"],"mappings":";AACA,MAAa,iCAAiC;AAC9C,MAAa,6BAA6B;AAE1C,MAAa,eAAe,CAC1B,gCACA,0BACF;AAGA,MAAa,gCAAgC;AAC7C,MAAa,2BAA2B;AACxC,MAAa,sBAAsB;AACnC,MAAa,oCAAoC;AACjD,MAAa,qBAAqB;AAClC,MAAa,+BAA+B;AAC5C,MAAa,yBAAyB;AAEtC,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,oBAAoB;AACjC,MAAa,yBAAyB;AACtC,MAAa,yBAAyB;AACtC,MAAa,yBAAyB;AACtC,MAAa,2BAA2B;AACxC,MAAa,6BAA6B;AAC1C,MAAa,2BAA2B;AACxC,MAAa,6BAA6B;AAE1C,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,8BAA8B;AAC3C,MAAa,sBAAsB;AACnC,MAAa,qBAAqB;AAClC,MAAa,yBAAyB;AACtC,MAAa,sBAAsB;AACnC,MAAa,+BAA+B;AAC5C,MAAa,gCAAgC;AAC7C,MAAa,uBAAuB;AACpC,MAAa,mBAAmB;AAChC,MAAa,0BAA0B;AACvC,MAAa,8BAA8B;AAC3C,MAAa,oBAAoB;AACjC,MAAa,sBAAsB;AACnC,MAAa,uBAAuB;AACpC,MAAa,8BAA8B;AAC3C,MAAa,qBAAqB;AAClC,MAAa,yBAAyB;;AAGtC,MAAa,mBAAmB;CAC9B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,qBAAqB;AAClC,MAAa,kBAAkB;AAC/B,MAAa,0BAA0B;AAEvC,MAAa,kBAAkB;CAC7B;CACA;CACA;AACF;AAGA,MAAa,yBAAyB;AACtC,MAAa,8BAA8B;AAG3C,MAAa,sBAAsB;AACnC,MAAa,uBAAuB;AACpC,MAAa,gBAAgB;AAG7B,MAAa,4BAA4B;AAGzC,MAAa,8BAA8B;AAG3C,MAAa,gBAAgB;AAG7B,MAAa,eAAe;AAG5B,MAAa,uBAAuB;AAGpC,MAAa,0BAA0B;;AAGvC,MAAa,yBAAyB"}
|
|
1
|
+
{"version":3,"file":"error-messages.js","names":[],"sources":["../../lib/constants/error-messages.ts"],"sourcesContent":["// System error\nexport const SYSTEM_INSUFFICIENT_DISK_SPACE = 'disk-space';\nexport const SYSTEM_INSUFFICIENT_MEMORY = 'out-of-memory';\n\nexport const SystemErrors = [\n SYSTEM_INSUFFICIENT_DISK_SPACE,\n SYSTEM_INSUFFICIENT_MEMORY,\n] as const;\n\n// Platform Error\nexport const PLATFORM_AUTHENTICATION_ERROR = 'authentication-error';\nexport const PLATFORM_BAD_CREDENTIALS = 'bad-credentials';\nexport const PLATFORM_GPG_FAILED = 'gpg-failed';\nexport const PLATFORM_INTEGRATION_UNAUTHORIZED = 'integration-unauthorized';\nexport const PLATFORM_NOT_FOUND = 'platform-not-found';\nexport const PLATFORM_RATE_LIMIT_EXCEEDED = 'rate-limit-exceeded';\nexport const PLATFORM_UNKNOWN_ERROR = 'platform-unknown-error';\n\nexport const PlatformErrors = [\n PLATFORM_AUTHENTICATION_ERROR,\n PLATFORM_BAD_CREDENTIALS,\n PLATFORM_GPG_FAILED,\n PLATFORM_INTEGRATION_UNAUTHORIZED,\n PLATFORM_NOT_FOUND,\n PLATFORM_RATE_LIMIT_EXCEEDED,\n PLATFORM_UNKNOWN_ERROR,\n] as const;\n\n// Config Error\nexport const CONFIG_VALIDATION = 'config-validation';\nexport const CONFIG_PRESETS_INVALID = 'config-presets-invalid';\nexport const CONFIG_SECRETS_EXPOSED = 'config-secrets-exposed';\nexport const CONFIG_SECRETS_INVALID = 'config-secrets-invalid';\nexport const CONFIG_VARIABLES_INVALID = 'config-variables-invalid';\nexport const CONFIG_GIT_URL_UNAVAILABLE = 'config-git-url-unavailable';\nexport const CONFIG_INHERIT_NOT_FOUND = 'config-inherit-not-found';\nexport const CONFIG_INHERIT_PARSE_ERROR = 'config-inherit-parse-error';\n\nexport const ConfigErrors = [\n CONFIG_VALIDATION,\n CONFIG_PRESETS_INVALID,\n CONFIG_SECRETS_EXPOSED,\n CONFIG_SECRETS_INVALID,\n CONFIG_VARIABLES_INVALID,\n CONFIG_GIT_URL_UNAVAILABLE,\n CONFIG_INHERIT_NOT_FOUND,\n CONFIG_INHERIT_PARSE_ERROR,\n] as const;\n\n// Repository Errors - causes repo to be considered as disabled\nexport const REPOSITORY_ACCESS_FORBIDDEN = 'forbidden';\nexport const REPOSITORY_ARCHIVED = 'archived';\nexport const REPOSITORY_BLOCKED = 'blocked';\nexport const REPOSITORY_CANNOT_FORK = 'cannot-fork';\nexport const REPOSITORY_DISABLED = 'disabled';\nexport const REPOSITORY_CLOSED_ONBOARDING = 'disabled-closed-onboarding';\nexport const REPOSITORY_DISABLED_BY_CONFIG = 'disabled-by-config';\nexport const REPOSITORY_NO_CONFIG = 'disabled-no-config';\nexport const REPOSITORY_EMPTY = 'empty';\nexport const REPOSITORY_FORK_MISSING = 'fork-missing';\nexport const REPOSITORY_FORK_MODE_FORKED = 'fork-mode-forked';\nexport const REPOSITORY_FORKED = 'fork';\nexport const REPOSITORY_MIRRORED = 'mirror';\nexport const REPOSITORY_NOT_FOUND = 'not-found';\nexport const REPOSITORY_NO_PACKAGE_FILES = 'no-package-files';\nexport const REPOSITORY_RENAMED = 'renamed';\nexport const REPOSITORY_UNINITIATED = 'uninitiated';\n\n/** cause repo to be considered as disabled */\nexport const RepositoryErrors = [\n REPOSITORY_ACCESS_FORBIDDEN,\n REPOSITORY_ARCHIVED,\n REPOSITORY_BLOCKED,\n REPOSITORY_CANNOT_FORK,\n REPOSITORY_DISABLED,\n REPOSITORY_CLOSED_ONBOARDING,\n REPOSITORY_DISABLED_BY_CONFIG,\n REPOSITORY_NO_CONFIG,\n REPOSITORY_EMPTY,\n REPOSITORY_FORK_MISSING,\n REPOSITORY_FORK_MODE_FORKED,\n REPOSITORY_FORKED,\n REPOSITORY_MIRRORED,\n REPOSITORY_NOT_FOUND,\n REPOSITORY_NO_PACKAGE_FILES,\n REPOSITORY_RENAMED,\n REPOSITORY_UNINITIATED,\n] as const;\n\n// Temporary Error\nexport const REPOSITORY_CHANGED = 'repository-changed';\nexport const TEMPORARY_ERROR = 'temporary-error';\nexport const NO_VULNERABILITY_ALERTS = 'no-vulnerability-alerts';\n\nexport const TemporaryErrors = [\n REPOSITORY_CHANGED,\n TEMPORARY_ERROR,\n NO_VULNERABILITY_ALERTS,\n] as const;\n\n// Manager Error\nexport const MANAGER_LOCKFILE_ERROR = 'lockfile-error';\nexport const FILE_ACCESS_VIOLATION_ERROR = 'file-access-violation-error';\n\n// Host error\nexport const EXTERNAL_HOST_ERROR = 'external-host-error';\nexport const IGNORABLE_HOST_ERROR = 'ignorable-host-error';\nexport const HOST_DISABLED = 'host-disabled';\n\n// Worker Error\nexport const WORKER_FILE_UPDATE_FAILED = 'update-failure';\n\n// PR Error\nexport const PR_ALREADY_IN_MERGE_QUEUE = 'pr-already-in-merge-queue';\n\n// Bundler Error\nexport const BUNDLER_INVALID_CREDENTIALS = 'bundler-credentials';\n\n// Unknown Error\nexport const UNKNOWN_ERROR = 'unknown-error';\n\n// PATH Error\nexport const INVALID_PATH = 'invalid-path';\n\n// PAGE NOT FOUND\nexport const PAGE_NOT_FOUND_ERROR = 'page-not-found';\n\n// Missing API required credentials\nexport const MISSING_API_CREDENTIALS = 'missing-api-credentials';\n\n/** Logger not initialized */\nexport const LOGGER_NOT_INITIALIZED = 'logger-not-initialized';\n"],"mappings":";AACA,MAAa,iCAAiC;AAC9C,MAAa,6BAA6B;AAE1C,MAAa,eAAe,CAC1B,gCACA,0BACF;AAGA,MAAa,gCAAgC;AAC7C,MAAa,2BAA2B;AACxC,MAAa,sBAAsB;AACnC,MAAa,oCAAoC;AACjD,MAAa,qBAAqB;AAClC,MAAa,+BAA+B;AAC5C,MAAa,yBAAyB;AAEtC,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,oBAAoB;AACjC,MAAa,yBAAyB;AACtC,MAAa,yBAAyB;AACtC,MAAa,yBAAyB;AACtC,MAAa,2BAA2B;AACxC,MAAa,6BAA6B;AAC1C,MAAa,2BAA2B;AACxC,MAAa,6BAA6B;AAE1C,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,8BAA8B;AAC3C,MAAa,sBAAsB;AACnC,MAAa,qBAAqB;AAClC,MAAa,yBAAyB;AACtC,MAAa,sBAAsB;AACnC,MAAa,+BAA+B;AAC5C,MAAa,gCAAgC;AAC7C,MAAa,uBAAuB;AACpC,MAAa,mBAAmB;AAChC,MAAa,0BAA0B;AACvC,MAAa,8BAA8B;AAC3C,MAAa,oBAAoB;AACjC,MAAa,sBAAsB;AACnC,MAAa,uBAAuB;AACpC,MAAa,8BAA8B;AAC3C,MAAa,qBAAqB;AAClC,MAAa,yBAAyB;;AAGtC,MAAa,mBAAmB;CAC9B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,qBAAqB;AAClC,MAAa,kBAAkB;AAC/B,MAAa,0BAA0B;AAEvC,MAAa,kBAAkB;CAC7B;CACA;CACA;AACF;AAGA,MAAa,yBAAyB;AACtC,MAAa,8BAA8B;AAG3C,MAAa,sBAAsB;AACnC,MAAa,uBAAuB;AACpC,MAAa,gBAAgB;AAG7B,MAAa,4BAA4B;AAGzC,MAAa,4BAA4B;AAGzC,MAAa,8BAA8B;AAG3C,MAAa,gBAAgB;AAG7B,MAAa,eAAe;AAG5B,MAAa,uBAAuB;AAGpC,MAAa,0BAA0B;;AAGvC,MAAa,yBAAyB"}
|
|
@@ -16,6 +16,7 @@ query($owner: String!, $name: String!, $user: String) {
|
|
|
16
16
|
mergeCommitAllowed
|
|
17
17
|
rebaseMergeAllowed
|
|
18
18
|
squashMergeAllowed
|
|
19
|
+
mergeQueue { id }
|
|
19
20
|
defaultBranchRef {
|
|
20
21
|
name
|
|
21
22
|
target {
|
|
@@ -68,6 +69,24 @@ query(
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
`;
|
|
72
|
+
const repoMergeQueueQuery = `
|
|
73
|
+
query($owner: String!, $name: String!, $branch: String!) {
|
|
74
|
+
repository(owner: $owner, name: $name) {
|
|
75
|
+
mergeQueue(branch: $branch) {
|
|
76
|
+
id
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
const prIsInMergeQueueQuery = `
|
|
82
|
+
query($owner: String!, $name: String!, $number: Int!) {
|
|
83
|
+
repository(owner: $owner, name: $name) {
|
|
84
|
+
pullRequest(number: $number) {
|
|
85
|
+
isInMergeQueue
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
`;
|
|
71
90
|
const enableAutoMergeMutation = `
|
|
72
91
|
mutation EnablePullRequestAutoMerge(
|
|
73
92
|
$pullRequestId: ID!,
|
|
@@ -90,6 +109,6 @@ mutation EnablePullRequestAutoMerge(
|
|
|
90
109
|
}
|
|
91
110
|
`;
|
|
92
111
|
//#endregion
|
|
93
|
-
export { enableAutoMergeMutation, getIssuesQuery, repoInfoQuery };
|
|
112
|
+
export { enableAutoMergeMutation, getIssuesQuery, prIsInMergeQueueQuery, repoInfoQuery, repoMergeQueueQuery };
|
|
94
113
|
|
|
95
114
|
//# sourceMappingURL=graphql.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","names":[],"sources":["../../../../lib/modules/platform/github/graphql.ts"],"sourcesContent":["export const repoInfoQuery = `\nquery($owner: String!, $name: String!, $user: String) {\n repository(owner: $owner, name: $name) {\n id\n sshUrl\n isFork\n parent {\n nameWithOwner\n }\n isArchived\n nameWithOwner\n hasIssuesEnabled\n hasVulnerabilityAlertsEnabled\n autoMergeAllowed\n mergeCommitAllowed\n rebaseMergeAllowed\n squashMergeAllowed\n defaultBranchRef {\n name\n target {\n oid\n }\n }\n issues(\n orderBy: { field: UPDATED_AT, direction: DESC },\n filterBy: { createdBy: $user },\n first: 5\n ) {\n nodes {\n number\n state\n title\n body\n updatedAt\n }\n }\n }\n}\n`;\n\nexport const getIssuesQuery = `\nquery(\n $owner: String!,\n $name: String!,\n $user: String,\n $count: Int,\n $cursor: String\n) {\n repository(owner: $owner, name: $name) {\n issues(\n orderBy: { field: UPDATED_AT, direction: DESC },\n filterBy: { createdBy: $user },\n first: $count,\n after: $cursor\n ) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n number\n state\n title\n body\n updatedAt\n }\n }\n }\n}\n`;\n\nexport const enableAutoMergeMutation = `\nmutation EnablePullRequestAutoMerge(\n $pullRequestId: ID!,\n $mergeMethod: PullRequestMergeMethod!,\n $commitHeadline: String,\n $commitBody: String,\n) {\n enablePullRequestAutoMerge(\n input: {\n pullRequestId: $pullRequestId,\n mergeMethod: $mergeMethod,\n commitHeadline: $commitHeadline,\n commitBody: $commitBody,\n }\n ) {\n pullRequest {\n number\n }\n }\n}\n`;\n"],"mappings":";AAAA,MAAa,gBAAgB
|
|
1
|
+
{"version":3,"file":"graphql.js","names":[],"sources":["../../../../lib/modules/platform/github/graphql.ts"],"sourcesContent":["export const repoInfoQuery = `\nquery($owner: String!, $name: String!, $user: String) {\n repository(owner: $owner, name: $name) {\n id\n sshUrl\n isFork\n parent {\n nameWithOwner\n }\n isArchived\n nameWithOwner\n hasIssuesEnabled\n hasVulnerabilityAlertsEnabled\n autoMergeAllowed\n mergeCommitAllowed\n rebaseMergeAllowed\n squashMergeAllowed\n mergeQueue { id }\n defaultBranchRef {\n name\n target {\n oid\n }\n }\n issues(\n orderBy: { field: UPDATED_AT, direction: DESC },\n filterBy: { createdBy: $user },\n first: 5\n ) {\n nodes {\n number\n state\n title\n body\n updatedAt\n }\n }\n }\n}\n`;\n\nexport const getIssuesQuery = `\nquery(\n $owner: String!,\n $name: String!,\n $user: String,\n $count: Int,\n $cursor: String\n) {\n repository(owner: $owner, name: $name) {\n issues(\n orderBy: { field: UPDATED_AT, direction: DESC },\n filterBy: { createdBy: $user },\n first: $count,\n after: $cursor\n ) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n number\n state\n title\n body\n updatedAt\n }\n }\n }\n}\n`;\n\nexport const repoMergeQueueQuery = `\nquery($owner: String!, $name: String!, $branch: String!) {\n repository(owner: $owner, name: $name) {\n mergeQueue(branch: $branch) {\n id\n }\n }\n}\n`;\n\nexport const prIsInMergeQueueQuery = `\nquery($owner: String!, $name: String!, $number: Int!) {\n repository(owner: $owner, name: $name) {\n pullRequest(number: $number) {\n isInMergeQueue\n }\n }\n}\n`;\n\nexport const enableAutoMergeMutation = `\nmutation EnablePullRequestAutoMerge(\n $pullRequestId: ID!,\n $mergeMethod: PullRequestMergeMethod!,\n $commitHeadline: String,\n $commitBody: String,\n) {\n enablePullRequestAutoMerge(\n input: {\n pullRequestId: $pullRequestId,\n mergeMethod: $mergeMethod,\n commitHeadline: $commitHeadline,\n commitBody: $commitBody,\n }\n ) {\n pullRequest {\n number\n }\n }\n}\n`;\n"],"mappings":";AAAA,MAAa,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyC7B,MAAa,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+B9B,MAAa,sBAAsB;;;;;;;;;AAUnC,MAAa,wBAAwB;;;;;;;;;AAUrC,MAAa,0BAA0B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { PLATFORM_RATE_LIMIT_EXCEEDED, PLATFORM_UNKNOWN_ERROR, REPOSITORY_ACCESS_FORBIDDEN, REPOSITORY_ARCHIVED, REPOSITORY_BLOCKED, REPOSITORY_CANNOT_FORK, REPOSITORY_CHANGED, REPOSITORY_EMPTY, REPOSITORY_FORKED, REPOSITORY_FORK_MISSING, REPOSITORY_NOT_FOUND, REPOSITORY_RENAMED } from "../../../constants/error-messages.js";
|
|
2
|
+
import { PLATFORM_RATE_LIMIT_EXCEEDED, PLATFORM_UNKNOWN_ERROR, PR_ALREADY_IN_MERGE_QUEUE, REPOSITORY_ACCESS_FORBIDDEN, REPOSITORY_ARCHIVED, REPOSITORY_BLOCKED, REPOSITORY_CANNOT_FORK, REPOSITORY_CHANGED, REPOSITORY_EMPTY, REPOSITORY_FORKED, REPOSITORY_FORK_MISSING, REPOSITORY_NOT_FOUND, REPOSITORY_RENAMED } from "../../../constants/error-messages.js";
|
|
3
3
|
import { getEnv } from "../../../util/env.js";
|
|
4
4
|
import { regEx } from "../../../util/regex.js";
|
|
5
5
|
import { GlobalConfig } from "../../../config/global.js";
|
|
@@ -27,10 +27,10 @@ import { repoFingerprint } from "../util.js";
|
|
|
27
27
|
import { smartTruncate } from "../utils/pr-body.js";
|
|
28
28
|
import { coerceRestPr, githubApi, mapMergeStartegy } from "./common.js";
|
|
29
29
|
import { remoteBranchExists } from "./branch.js";
|
|
30
|
-
import { enableAutoMergeMutation, getIssuesQuery, repoInfoQuery } from "./graphql.js";
|
|
30
|
+
import { enableAutoMergeMutation, getIssuesQuery, repoInfoQuery, repoMergeQueueQuery } from "./graphql.js";
|
|
31
31
|
import { GithubIssueCache } from "./issue.js";
|
|
32
32
|
import { massageMarkdownLinks } from "./massage-markdown-links.js";
|
|
33
|
-
import { getPrCache, updatePrCache } from "./pr.js";
|
|
33
|
+
import { getPrCache, isPrInMergeQueue, updatePrCache } from "./pr.js";
|
|
34
34
|
import { getAppDetails, getUserDetails, getUserEmail } from "./user.js";
|
|
35
35
|
import { getRepoUrl, warnIfDefaultGitAuthorEmail } from "./utils.js";
|
|
36
36
|
import { isArray, isNonEmptyObject, isNonEmptyString } from "@sindresorhus/is";
|
|
@@ -41,6 +41,7 @@ var github_exports = /* @__PURE__ */ __exportAll({
|
|
|
41
41
|
addAssignees: () => addAssignees,
|
|
42
42
|
addLabels: () => addLabels,
|
|
43
43
|
addReviewers: () => addReviewers,
|
|
44
|
+
assertPrNotInMergeQueue: () => assertPrNotInMergeQueue,
|
|
44
45
|
commitFiles: () => commitFiles,
|
|
45
46
|
createFork: () => createFork,
|
|
46
47
|
createPr: () => createPr,
|
|
@@ -316,7 +317,8 @@ async function initRepo({ repository, forkCreation, forkOrg, forkToken, gitUrl,
|
|
|
316
317
|
repository,
|
|
317
318
|
cloneSubmodules,
|
|
318
319
|
cloneSubmodulesFilter,
|
|
319
|
-
ignorePrAuthor: GlobalConfig.get("ignorePrAuthor")
|
|
320
|
+
ignorePrAuthor: GlobalConfig.get("ignorePrAuthor"),
|
|
321
|
+
mergeQueueEnabled: {}
|
|
320
322
|
};
|
|
321
323
|
const opts = find({
|
|
322
324
|
hostType: "github",
|
|
@@ -334,6 +336,7 @@ async function initRepo({ repository, forkCreation, forkOrg, forkToken, gitUrl,
|
|
|
334
336
|
infoQuery = infoQuery.replace(/\n\s*hasIssuesEnabled\s*\n/, "\n");
|
|
335
337
|
}
|
|
336
338
|
if (platformConfig.isGhe && semver.satisfies(platformConfig.gheVersion, "<3.9.0")) infoQuery = infoQuery.replace(/\n\s*hasVulnerabilityAlertsEnabled\s*\n/, "\n");
|
|
339
|
+
if (platformConfig.isGhe && semver.satisfies(platformConfig.gheVersion, "<3.12.0")) infoQuery = infoQuery.replace(/\n\s*mergeQueue\s*\{\s*id\s*\}\s*\n/, "\n");
|
|
337
340
|
const res = await githubApi.requestGraphql(infoQuery, {
|
|
338
341
|
variables: {
|
|
339
342
|
owner: config.repositoryOwner,
|
|
@@ -382,6 +385,7 @@ async function initRepo({ repository, forkCreation, forkOrg, forkToken, gitUrl,
|
|
|
382
385
|
config.autoMergeAllowed = repo.autoMergeAllowed;
|
|
383
386
|
config.hasIssuesEnabled = repo.hasIssuesEnabled;
|
|
384
387
|
config.hasVulnerabilityAlertsEnabled = repo.hasVulnerabilityAlertsEnabled;
|
|
388
|
+
config.mergeQueueEnabled[config.defaultBranch] = isNonEmptyObject(repo.mergeQueue);
|
|
385
389
|
const recentIssues = GithubIssue.array().catch([]).parse(res?.data?.repository?.issues?.nodes);
|
|
386
390
|
GithubIssueCache.addIssuesToReconcile(recentIssues);
|
|
387
391
|
} catch (err) /* v8 ignore next -- initRepo error mapping needs failure shapes not mocked in specs */ {
|
|
@@ -1232,6 +1236,50 @@ async function createPr({ sourceBranch, targetBranch, prTitle: title, prBody: ra
|
|
|
1232
1236
|
cachePr(result);
|
|
1233
1237
|
return result;
|
|
1234
1238
|
}
|
|
1239
|
+
async function isMergeQueueEnabled(baseBranch) {
|
|
1240
|
+
const cachedResult = config.mergeQueueEnabled[baseBranch];
|
|
1241
|
+
if (cachedResult !== void 0) return cachedResult;
|
|
1242
|
+
if (platformConfig.isGhe && semver.satisfies(platformConfig.gheVersion, "<3.12.0")) {
|
|
1243
|
+
config.mergeQueueEnabled[baseBranch] = false;
|
|
1244
|
+
return false;
|
|
1245
|
+
}
|
|
1246
|
+
let result = true;
|
|
1247
|
+
try {
|
|
1248
|
+
const res = await githubApi.requestGraphql(repoMergeQueueQuery, {
|
|
1249
|
+
variables: {
|
|
1250
|
+
owner: config.repositoryOwner,
|
|
1251
|
+
name: config.repositoryName,
|
|
1252
|
+
branch: baseBranch
|
|
1253
|
+
},
|
|
1254
|
+
readOnly: true,
|
|
1255
|
+
count: 1
|
|
1256
|
+
});
|
|
1257
|
+
if (res?.errors) logger.debug({
|
|
1258
|
+
baseBranch,
|
|
1259
|
+
errors: res.errors
|
|
1260
|
+
}, "Failed to fetch merge queue status - assuming merge queue is enabled");
|
|
1261
|
+
else result = isNonEmptyObject(res?.data?.repository?.mergeQueue);
|
|
1262
|
+
} catch (err) {
|
|
1263
|
+
logger.debug({
|
|
1264
|
+
baseBranch,
|
|
1265
|
+
err
|
|
1266
|
+
}, "Error fetching merge queue status - assuming merge queue is enabled");
|
|
1267
|
+
}
|
|
1268
|
+
config.mergeQueueEnabled[baseBranch] = result;
|
|
1269
|
+
return result;
|
|
1270
|
+
}
|
|
1271
|
+
async function assertPrNotInMergeQueue(branchName, baseBranch) {
|
|
1272
|
+
if (!await isMergeQueueEnabled(baseBranch ?? config.defaultBranch)) return;
|
|
1273
|
+
const pr = await findPr({
|
|
1274
|
+
branchName,
|
|
1275
|
+
state: "open"
|
|
1276
|
+
});
|
|
1277
|
+
if (!pr) return;
|
|
1278
|
+
if (await isPrInMergeQueue(githubApi, config.repositoryOwner, config.repositoryName, pr.number)) {
|
|
1279
|
+
logger.debug(`PR #${pr.number} is in the merge queue - aborting push`);
|
|
1280
|
+
throw new Error(PR_ALREADY_IN_MERGE_QUEUE);
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1235
1283
|
async function updatePr({ number: prNo, prTitle: title, prBody: rawBody, addLabels: labelsToAdd, removeLabels, state, targetBranch }) {
|
|
1236
1284
|
logger.debug(`updatePr(${prNo}, ${title}, body)`);
|
|
1237
1285
|
const body = sanitize(rawBody);
|
|
@@ -1443,6 +1491,6 @@ async function commitFiles(config) {
|
|
|
1443
1491
|
return await fetchBranch(branchName);
|
|
1444
1492
|
}
|
|
1445
1493
|
//#endregion
|
|
1446
|
-
export { addAssignees, addLabels, addReviewers, commitFiles, createFork, createPr, deleteLabel, detectGhe, ensureComment, ensureCommentRemoval, ensureIssue, ensureIssueClosing, findFork, findIssue, findPr, getBranchForceRebase, getBranchPr, getBranchStatus, getBranchStatusCheck, getIssue, getIssueList, getJsonFile, getPr, getPrList, getRawFile, getRepos, getVulnerabilityAlerts, github_exports, id, initPlatform, initRepo, isGHApp, listForks, massageMarkdown, maxBodyLength, mergePr, reattemptPlatformAutomerge, resetConfigs, setBranchStatus, tryReuseAutoclosedPr, updatePr };
|
|
1494
|
+
export { addAssignees, addLabels, addReviewers, assertPrNotInMergeQueue, commitFiles, createFork, createPr, deleteLabel, detectGhe, ensureComment, ensureCommentRemoval, ensureIssue, ensureIssueClosing, findFork, findIssue, findPr, getBranchForceRebase, getBranchPr, getBranchStatus, getBranchStatusCheck, getIssue, getIssueList, getJsonFile, getPr, getPrList, getRawFile, getRepos, getVulnerabilityAlerts, github_exports, id, initPlatform, initRepo, isGHApp, listForks, massageMarkdown, maxBodyLength, mergePr, reattemptPlatformAutomerge, resetConfigs, setBranchStatus, tryReuseAutoclosedPr, updatePr };
|
|
1447
1495
|
|
|
1448
1496
|
//# sourceMappingURL=index.js.map
|