@gitbeaker/core 34.7.0 → 35.0.0

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/index.es.js CHANGED
@@ -2649,8 +2649,19 @@ var Lint = /** @class */ (function (_super) {
2649
2649
  return _super !== null && _super.apply(this, arguments) || this;
2650
2650
  }
2651
2651
  Lint.prototype.lint = function (content, options) {
2652
+ // Perform CI file linting without context.
2653
+ // See https://docs.gitlab.com/ee/api/lint.html#validate-the-ci-yaml-configuration
2654
+ // This API doesn't work for CI files that contain `local` includes. Use `lintWithNamespace` instead.
2652
2655
  return RequestHelper.post()(this, 'ci/lint', __assign({ content: content }, options));
2653
2656
  };
2657
+ // TODO: Figure out a better way of writing this to not be limited by the typing.
2658
+ Lint.prototype.lintWithNamespace = function (projectId, content, options) {
2659
+ // Perform CI file linting in the context of a specific project namespace.
2660
+ // See https://docs.gitlab.com/ee/api/lint.html#validate-a-ci-yaml-configuration-with-a-namespace
2661
+ // This API is useful when the CI file being linted has `local` includes, which requires project
2662
+ // context to be understood.
2663
+ return RequestHelper.post()(this, "projects/".concat(projectId, "/ci/lint"), __assign({ content: content }, options));
2664
+ };
2654
2665
  return Lint;
2655
2666
  }(BaseResource));
2656
2667