Files
shields/services/github/github-issue-detail-redirect.service.js
dependabot-preview[bot] d732b937c9 Build(deps-dev): bump prettier from 1.17.1 to 1.18.2 (#3580)
* Build(deps-dev): bump prettier from 1.17.1 to 1.18.2

Bumps [prettier](https://github.com/prettier/prettier) from 1.17.1 to 1.18.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/1.17.1...1.18.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* chore: prettier
2019-06-17 19:15:44 -05:00

23 lines
513 B
JavaScript

'use strict'
const { redirector } = require('..')
const variantMap = {
s: 'state',
u: 'author',
}
module.exports = [
redirector({
category: 'issue-tracking',
route: {
base: 'github',
pattern:
':issueKind(issues|pulls)/detail/:variant(s|u)/:user/:repo/:number([0-9]+)',
},
transformPath: ({ issueKind, variant, user, repo, number }) =>
`/github/${issueKind}/detail/${variantMap[variant]}/${user}/${repo}/${number}`,
dateAdded: new Date('2019-04-04'),
}),
]