Read project identifier in asana service
This commit is contained in:
@@ -31,3 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [1.0.22] - 2019-03-28
|
## [1.0.22] - 2019-03-28
|
||||||
### Changed
|
### Changed
|
||||||
- Change the default value of subdomain to `unset` to have a well-formed URL.
|
- Change the default value of subdomain to `unset` to have a well-formed URL.
|
||||||
|
|
||||||
|
## [1.0.23] - 2019-03-28
|
||||||
|
### Added
|
||||||
|
- Read project identifier from Asana project title
|
||||||
|
|||||||
@@ -15,7 +15,14 @@ export default {
|
|||||||
document
|
document
|
||||||
.querySelector(".ItemRow--focused textarea")
|
.querySelector(".ItemRow--focused textarea")
|
||||||
?.textContent?.trim() ||
|
?.textContent?.trim() ||
|
||||||
document.querySelector(".SingleTaskPane textarea")?.textContent?.trim()
|
document.querySelector(".SingleTaskPane textarea")?.textContent?.trim(),
|
||||||
|
projectId: document => {
|
||||||
|
const match = document
|
||||||
|
.querySelector(".ProjectPageHeader-projectName")
|
||||||
|
?.textContent?.trim()
|
||||||
|
?.match(/^\[(\w+)\]/)
|
||||||
|
return match && match[1]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"github-pr": {
|
"github-pr": {
|
||||||
|
|||||||
Reference in New Issue
Block a user