eslint-plugin-github-actions-2 1.0.5 → 1.0.6

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/plugin.cjs CHANGED
@@ -39,7 +39,7 @@ var yamlParser = __toESM(require("yaml-eslint-parser"), 1);
39
39
  var package_default = {
40
40
  $schema: "https://www.schemastore.org/package.json",
41
41
  name: "eslint-plugin-github-actions-2",
42
- version: "1.0.5",
42
+ version: "1.0.6",
43
43
  private: false,
44
44
  description: "ESLint plugin for GitHub Actions workflow quality, reliability, and security rules.",
45
45
  keywords: [
@@ -6913,6 +6913,7 @@ var require_dependabot_labels_default = rule68;
6913
6913
  // dist/rules/require-dependabot-open-pull-requests-limit.js
6914
6914
  var rule69 = {
6915
6915
  create(context) {
6916
+ const reportedGroupNames = /* @__PURE__ */ new Set();
6916
6917
  return {
6917
6918
  Program() {
6918
6919
  const root = getDependabotRoot(context);
@@ -6921,6 +6922,30 @@ var rule69 = {
6921
6922
  }
6922
6923
  for (const update of getDependabotUpdateEntries(root)) {
6923
6924
  const limitPair = getMappingPair(update.mapping, "open-pull-requests-limit");
6925
+ if (update.multiEcosystemGroup !== null) {
6926
+ if (limitPair !== null) {
6927
+ context.report({
6928
+ data: {
6929
+ updateLabel: getDependabotUpdateLabel(update)
6930
+ },
6931
+ messageId: "unsupportedOpenPullRequestsLimitOnGroupedUpdate",
6932
+ node: limitPair.key
6933
+ });
6934
+ }
6935
+ const groupMapping = getDependabotReferencedGroup(root, update);
6936
+ const groupLimitPair = groupMapping === null ? null : getMappingPair(groupMapping, "open-pull-requests-limit");
6937
+ if (groupLimitPair !== null && !reportedGroupNames.has(update.multiEcosystemGroup)) {
6938
+ reportedGroupNames.add(update.multiEcosystemGroup);
6939
+ context.report({
6940
+ data: {
6941
+ groupName: update.multiEcosystemGroup
6942
+ },
6943
+ messageId: "unsupportedOpenPullRequestsLimitOnGroup",
6944
+ node: groupLimitPair.key
6945
+ });
6946
+ }
6947
+ continue;
6948
+ }
6924
6949
  const limitValue = getScalarNumberValue(limitPair?.value ?? null);
6925
6950
  if (limitValue !== null) {
6926
6951
  continue;
@@ -6943,7 +6968,7 @@ var rule69 = {
6943
6968
  "github-actions.configs.all",
6944
6969
  "github-actions.configs.dependabot"
6945
6970
  ],
6946
- description: "require Dependabot update entries to define `open-pull-requests-limit`.",
6971
+ description: "require standalone Dependabot update entries to define `open-pull-requests-limit`.",
6947
6972
  dialects: ["Dependabot configuration"],
6948
6973
  frozen: false,
6949
6974
  recommended: true,
@@ -6953,7 +6978,9 @@ var rule69 = {
6953
6978
  url: "https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-open-pull-requests-limit"
6954
6979
  },
6955
6980
  messages: {
6956
- missingOpenPullRequestsLimit: "{{updateLabel}} should define `open-pull-requests-limit` so Dependabot pull request volume is explicitly controlled."
6981
+ missingOpenPullRequestsLimit: "{{updateLabel}} should define `open-pull-requests-limit` so Dependabot pull request volume is explicitly controlled.",
6982
+ unsupportedOpenPullRequestsLimitOnGroup: "Multi-ecosystem group '{{groupName}}' should not define `open-pull-requests-limit`. Grouped updates already consolidate into a single Dependabot pull request.",
6983
+ unsupportedOpenPullRequestsLimitOnGroupedUpdate: "{{updateLabel}} uses `multi-ecosystem-group` and should not define `open-pull-requests-limit`. Grouped updates already consolidate into a single Dependabot pull request."
6957
6984
  },
6958
6985
  schema: [],
6959
6986
  type: "suggestion"