github-url-detection 10.2.1 → 10.2.2
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/distribution/index.js +1 -1
- package/package.json +1 -1
package/distribution/index.js
CHANGED
|
@@ -41,7 +41,7 @@ var isDiscussionList = (url = location) => getRepo(url)?.path === "discussions"
|
|
|
41
41
|
var isPR = (url = location) => /^pull\/\d+/.test(getRepo(url)?.path) && !isPRConflicts(url);
|
|
42
42
|
var isPRConflicts = (url = location) => /^pull\/\d+\/conflicts/.test(getRepo(url)?.path);
|
|
43
43
|
var isPRList = (url = location) => url.pathname === "/pulls" || getRepo(url)?.path === "pulls";
|
|
44
|
-
var isPRCommit = (url = location) => /^pull\/\d+\/commits\/[\da-f]{
|
|
44
|
+
var isPRCommit = (url = location) => /^pull\/\d+\/(commits|changes)\/[\da-f]{7,40}$/.test(getRepo(url)?.path);
|
|
45
45
|
var isPRCommit404 = () => isPRCommit() && document.title.startsWith("Commit range not found \xB7 Pull Request");
|
|
46
46
|
var isPRFile404 = () => isPRFiles() && document.title.startsWith("Commit range not found \xB7 Pull Request");
|
|
47
47
|
var isPRConversation = (url = location) => /^pull\/\d+$/.test(getRepo(url)?.path);
|