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

Linkify commits - fixes #233 #234

Merged
merged 1 commit into from Feb 13, 2018
Merged

Linkify commits - fixes #233 #234

merged 1 commit into from Feb 13, 2018

Conversation

SamVerschueren
Copy link
Collaborator

@SamVerschueren SamVerschueren commented Feb 7, 2018

This PR implements #233. Feedback welcome. It also links the issues inside the commit.

screen shot 2018-02-08 at 07 49 48

@@ -10,3 +13,27 @@ exports.readPkg = () => {

return pkg;
};

exports.linkifyIssues = (url, message) => {
if (!supportsHyperlinks.stdout) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't experience any problems with leaving this out though. But maybe Windows renders the control characters...

package.json Outdated
@@ -9,7 +9,7 @@
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
"test": "FORCE_HYPERLINK=1 xo && ava"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is to make sure the hyperlinks test also works in terminals which doesn't support hyperlinks.

This made me wonder, should AVA have a env setting in package.json like this? It just popped up when I had to do this.

{
    "ava": {
        "env": {
            "FORCE_HYPERLINK": 1
        }
    }
}

@SamVerschueren
Copy link
Collaborator Author

This is odd, I enforce the hyperlinks but travis seems to fail...

@SamVerschueren
Copy link
Collaborator Author

Alright, was my own fault :). Should be ok now.

@sindresorhus sindresorhus merged commit 263b0c3 into master Feb 13, 2018
@sindresorhus sindresorhus deleted the iss233 branch February 13, 2018 05:06
@sindresorhus
Copy link
Owner

✨This is super useful :)

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.

None yet

2 participants