Read project identifier in asana service

This commit is contained in:
Manuel Bouza
2019-03-28 16:53:33 +01:00
parent 1f8bc33830
commit 63dfd464d9
2 changed files with 12 additions and 1 deletions

View File

@@ -31,3 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.0.22] - 2019-03-28
### Changed
- 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

View File

@@ -15,7 +15,14 @@ export default {
document
.querySelector(".ItemRow--focused textarea")
?.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": {