Auto: يضيف إنشاء الملصقات تسميات افتراضية غير مرغوب فيها

تم إنشاؤها على ٢٢ أبريل ٢٠٢١  ·  15تعليقات  ·  مصدر: intuit/auto

صف الخلل
عندما أقوم بتشغيل npx auto create-labels ولدي تكوين تسمية معين محدد في الحزمة الخاصة بي ، أتوقع أن يتم إنشاء تلك الملصقات فقط ، وليس التسميات الافتراضية الإضافية المحددة بواسطة auto. كان هذا هو الحال ولكن في مكان ما على طول الخط توقف عن العمل بشكل صحيح.

لإعادة إنتاج

باستخدام التكوين التالي:

"auto": {
    "baseBranch": "master",
    "prereleaseBranches": [
      "next"
    ],
    "plugins": [
      [
        "npm",
        {
          "legacyAuth": true,
          "setRcToken": false
        }
      ],
      "released",
      "microsoft-teams"
    ],
    "shipit": {
      "noChangelog": true
    },
    "labels": [
      {
        "name": "breaking",
        "changelogTitle": "🚨  Breaking Changes",
        "description": "Backwards incompatible enhancement or feature.",
        "releaseType": "major",
        "color": "#c5000b"
      },
      {
        "name": "feature",
        "changelogTitle": "🚀  Features",
        "description": "A new feature.",
        "releaseType": "minor",
        "color": "#00ff00"
      },
      {
        "name": "build",
        "changelogTitle": "📦  Build Process",
        "description": "Changes to the build process.",
        "releaseType": "patch",
        "color": "#4a4a4a"
      },
      {
        "name": "chore",
        "changelogTitle": "🏗  Miscellaneous",
        "description": "Additional, uncategorized changes.",
        "releaseType": "patch",
        "color": "#ff00ff",
        "default": true
      },
      {
        "name": "ci",
        "changelogTitle": "🔖  Continuous Integration",
        "description": "Changes to CI configuration files and scripts.",
        "releaseType": "patch",
        "color": "#f1a60e"
      },
      {
        "name": "docs",
        "changelogTitle": "📖  Documentation",
        "description": "Documentation updates and changes.",
        "releaseType": "patch",
        "color": "#870048"
      },
      {
        "name": "fix",
        "changelogTitle": "🐛  Bug Fixes",
        "description": "A bug fix.",
        "releaseType": "patch",
        "color": "#6000ff"
      },
      {
        "name": "perf",
        "changelogTitle": "⚡️  Performance",
        "description": "A code change that improves performance.",
        "releaseType": "patch",
        "color": "#00e4ff"
      },
      {
        "name": "refactor",
        "changelogTitle": "♻️  Refactoring",
        "description": "A code change that neither fixes a bug nor adds a feature.",
        "releaseType": "patch",
        "color": "#00b58d"
      },
      {
        "name": "revert",
        "changelogTitle": "🚧  Reverting",
        "description": "Reverts a previous commit.",
        "releaseType": "patch",
        "color": "#ff9000"
      },
      {
        "name": "style",
        "changelogTitle": "🎨  Style",
        "description": "Code style (white-space, formatting, missing semi-colons, etc).",
        "releaseType": "patch",
        "color": "#0051d8"
      },
      {
        "name": "test",
        "changelogTitle": "✅  Testing",
        "description": "Adding missing tests or correcting existing tests.",
        "releaseType": "patch",
        "color": "#127f00"
      },
      {
        "name": "upgrade",
        "changelogTitle": "⚙️  Dependencies",
        "description": "Dependency upgrades.",
        "releaseType": "minor",
        "color": "#00787f"
      }
    ]
  }

هذا هو الناتج:

Created labels: breaking, feature, build, chore, ci, docs, fix, perf, refactor, revert, style, test, upgrade, major, minor, patch, skip-release, internal, documentation, tests, dependencies, performance, released, prerelease

سلوك متوقع

سيتم إنشاء التسميات الموضحة في التكوين أعلاه فقط. أي شيء بعد التسمية upgrade في قائمة المخرجات أعلاه غير مرغوب فيه ويجب عدم إنشائه.

لقطات

معلومات البيئة:

Environment Information:

"auto" version: v10.25.1
"git"  version: v2.29.2
"node" version: v12.13.0

✔ Labels configured on GitHub project

سياق إضافي

bug released

التعليق الأكثر فائدة

@ reintroducing أنا أحب هذا الخيار كثيرا! الافتراضي يمكن فقط إنشاء تسميات محددة. علامة جديدة لتضمين الآخرين واستخدام منطق الكتابة الفوقية. سيكون هذا تغييرًا جذريًا في السلوك بالرغم من ذلك. ماذا عن المقابل --no-include-defaults ؟

ال 15 كومينتر

كنت على وشك تقديم نفس المشكلة. المستندات غير واضحة بشأن تجاوز التصنيفات الافتراضية. هل هناك طريقة للقول إنني أريد فقط تلك التسميات المحددة في التكوين وليس هناك علامات افتراضية؟

يوجد خيار overwrite في تكوين التسمية الذي سيتجاوز التصنيف الافتراضي المطابق. IDK إذا كان سيعمل مع تسميات zon-semver. هل يمكنك تجربة ذلك؟ إذا لم تكن المستندات واضحة بما فيه الكفاية حول هذا الأمر أكثر من استعداد لقبول العلاقات العامة

hipstersmoothie عند النظر إلى https://intuit.github.io/auto/docs/generated/create-labels لا أرى أي شيء من هذا القبيل. أين المستندات المتعلقة بهذا الخيار؟

hipstersmoothie لذا بالنظر إلى تلك المستندات ، أعتقد أنني غير واضح بشأن وظيفة هذا الخيار. أفترض أنه إذا أضفت ذلك إلى كل تصنيف من تسمياتي في التكوين الخاص بي ، فسيتم استبدال الملصقات major و minor و patch بملصقاتي ، لكن لا يتم مسح الآخرين التي يتم إنشاؤها بالإضافة إلى هؤلاء. أعتقد أن الإضافة الجيدة ستكون إضافة خيار إلى الأمر create labels الذي يقول include-defaults وضبطه على true / false (صحيح بشكل افتراضي إذا كنت تريد الحفاظ على التوافق مع الإصدارات السابقة). أفكار؟

أنا أتفق معreintroducing. لقد علمت بخيار overwrite ، لكن الأمر يتعلق فقط بضبط الملصقات الافتراضية إذا فهمتها بشكل صحيح. نريد خيارًا لإنشاء _ فقط_ التسميات التي قمنا بتكوينها.

@ reintroducing أنا أحب هذا الخيار كثيرا! الافتراضي يمكن فقط إنشاء تسميات محددة. علامة جديدة لتضمين الآخرين واستخدام منطق الكتابة الفوقية. سيكون هذا تغييرًا جذريًا في السلوك بالرغم من ذلك. ماذا عن المقابل --no-include-defaults ؟

hipstersmoothie نعم ، آسف لم يكن توضيحي واضحًا ، كنت أقترح نفس الشيء ولكن في الاتجاه المعاكس وسيكون هذا صحيحًا افتراضيًا ، لول ، لتجنب حدوث تغيير مفاجئ. لك أكثر نظافة ويتوافق بشكل أفضل مع كيفية تنفيذ جميع الخيارات الأخرى. انا كلى لها!

قد لا أضطر إلى الوصول إلى هذا حتى نهاية الأسبوع. إذا قمت بإرسال PR ، فسوف أراجع المطالبات ودمجها

لقد حاولت إصلاحه: https://github.com/intuit/auto/pull/1966 ، لكن بطريقة مختلفة قليلاً. انظر الشرح هناك.


: صاروخ: تم إصدار الإصدار في v10.26.0 : صاروخ:

adierkenshipstersmoothielaughedelic أنا فقط حاولت الترقية إلى هذا، وأنا رؤية المشكلة التالية في CI حيث نخلق الكناري تلقائيا على PR الجديدة:

Screen Shot 2021-04-29 at 2 32 48 PM

تجدر الإشارة إلى أن التكوين الفعلي موجود في ملف packs / auto / config.json وتم تمديده في جذر الريبو الخاص بنا باستخدام ما يلي:

"auto": {
    "extends": "./packages/auto/config.json"
  },

ومع ذلك ، كان هذا يعمل بشكل جيد قبل التحديث إلى أحدث إصدار.

هذا هو ملف config.json الكامل:

{
  "baseBranch": "master",
  "noDefaultLabels": true,
  "prereleaseBranches": ["next"],
  "plugins": [
    [
      "npm",
      {
        "legacyAuth": true,
        "setRcToken": false
      }
    ],
    "released",
    "microsoft-teams"
  ],
  "shipit": {
    "noChangelog": true
  },
  "labels": [
    {
      "name": "breaking",
      "changelogTitle": "🚨  Breaking Changes",
      "description": "Backwards incompatible enhancement or feature.",
      "releaseType": "major",
      "color": "#c5000b"
    },
    {
      "name": "feature",
      "changelogTitle": "🚀  Features",
      "description": "A new feature.",
      "releaseType": "minor",
      "color": "#00ff00"
    },
    {
      "name": "build",
      "changelogTitle": "📦  Build Process",
      "description": "Changes to the build process.",
      "releaseType": "patch",
      "color": "#4a4a4a"
    },
    {
      "name": "chore",
      "changelogTitle": "🏗  Miscellaneous",
      "description": "Additional, uncategorized changes.",
      "releaseType": "patch",
      "color": "#ff00ff",
      "default": true
    },
    {
      "name": "ci",
      "changelogTitle": "🔖  Continuous Integration",
      "description": "Changes to CI configuration files and scripts.",
      "releaseType": "patch",
      "color": "#f1a60e"
    },
    {
      "name": "docs",
      "changelogTitle": "📖  Documentation",
      "description": "Documentation updates and changes.",
      "releaseType": "patch",
      "color": "#870048"
    },
    {
      "name": "fix",
      "changelogTitle": "🐛  Bug Fixes",
      "description": "A bug fix.",
      "releaseType": "patch",
      "color": "#6000ff"
    },
    {
      "name": "perf",
      "changelogTitle": "⚡️  Performance",
      "description": "A code change that improves performance.",
      "releaseType": "patch",
      "color": "#00e4ff"
    },
    {
      "name": "refactor",
      "changelogTitle": "♻️  Refactoring",
      "description": "A code change that neither fixes a bug nor adds a feature.",
      "releaseType": "patch",
      "color": "#00b58d"
    },
    {
      "name": "revert",
      "changelogTitle": "🚧  Reverting",
      "description": "Reverts a previous commit.",
      "releaseType": "patch",
      "color": "#ff9000"
    },
    {
      "name": "style",
      "changelogTitle": "🎨  Style",
      "description": "Code style (white-space, formatting, missing semi-colons, etc).",
      "releaseType": "patch",
      "color": "#0051d8"
    },
    {
      "name": "test",
      "changelogTitle": "✅  Testing",
      "description": "Adding missing tests or correcting existing tests.",
      "releaseType": "patch",
      "color": "#127f00"
    },
    {
      "name": "upgrade",
      "changelogTitle": "⚙️  Dependencies",
      "description": "Dependency upgrades.",
      "releaseType": "minor",
      "color": "#00787f"
    }
  ]
}

هل من الممكن أن يتم إضافة الخيار الجديد إلى المدقق وبكل بساطة؟ https://github.com/intuit/auto/blob/main/packages/core/src/types.ts#L54

هل من الممكن أن يتم إضافة الخيار الجديد إلى المدقق وبكل بساطة؟ https://github.com/intuit/auto/blob/main/packages/core/src/types.ts#L54

هذا يبدو منطقيا! لم أكن أعرف عن ذلك.

@ إعادة تقديم أضفته هنا: https://github.com/intuit/auto/pull/1971. لكني لا أعرف ما إذا كان ينبغي إضافته في أي مكان آخر.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات