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

Fixed invalid custom scopes #203

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fixed invalid custom scopes #203

wants to merge 2 commits into from

Conversation

XPoet
Copy link

@XPoet XPoet commented Aug 3, 2022

No description provided.

@XPoet
Copy link
Author

XPoet commented Aug 3, 2022

#201

Copy link
Member

@leonardoanalista leonardoanalista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this Pr still needed after we merged #201 ?

@XPoet
Copy link
Author

XPoet commented Sep 2, 2022

yes. thx.

@w-t-w
Copy link

w-t-w commented Sep 19, 2022

still have this problem~

@@ -146,6 +146,9 @@ Here are the options you can set in your `.cz-config.js`:
}
```
* **allowCustomScopes**: {boolean, default false}: adds the option `custom` to scope selection so you can still type a scope if you need.
* **allowEmptyScopes**: {boolean, default false}: allow non-selection or not to fill in the scopes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think allowEmptyScopes default should be true because it makes it easier for people to use this tool. What are your thoughts?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we make allowEmptyScopes default true, would that be a breaking change? No problems if so, we just need to make the commit text have:

BREAKING CHANGES: 
- describe the breaking change
- steps to upgrade

}
return false; // no breaking changes allowed unless specifed
);
// no breaking changes allowed unless specifed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may not need this comment anymore with the direct function return.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you can remove comments

@@ -17,15 +17,21 @@ const addTicketNumber = (ticketNumber, config) => {
return `${ticketNumber.trim()} `;
};

const addScope = (scope, config) => {
const addScope = (scope, customScope, config) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could even consider calling this addScopeIfNeeded

@XPoet
Copy link
Author

XPoet commented Sep 23, 2022

still have this problem~

@w-t-w
Look here
#201 (comment)

@xiumubai
Copy link

why my scope cat working?

messages: { type: '请选择提交类型(必选):', // scope: '请输入文件修改范围(可选):', customScope: '请输入修改范围(可选):', subject: '请简要描述提交(必填):', // body: '请输入详细描述(可选,待优化去除,跳过即可):', // breaking: 'List any BREAKING CHANGES (optional):\n', footer: '请输入要关闭的issue(待优化去除,跳过即可):', confirmCommit: '确认使用以上信息提交?(y/n/e/h)' },
image

@linpengteng
Copy link

invalid custom scopes, Maybe inquirer filterIfRunnable function. look #212

@wangrongding
Copy link

Is it difficult to solve the problem that my custom scope cannot be entered? Why hasn't it been fixed for such a long time? 🥲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants