mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
feat: revise handling of team reviewers
This commit is contained in:
parent
91b6c0aa50
commit
1c9f3a221f
5 changed files with 53 additions and 20 deletions
10
src/utils.ts
10
src/utils.ts
|
@ -16,6 +16,16 @@ export function getStringAsArray(str: string): string[] {
|
|||
.filter(x => x !== '')
|
||||
}
|
||||
|
||||
export function stripOrgPrefixFromTeams(teams: string[]): string[] {
|
||||
return teams.map(team => {
|
||||
const slashIndex = team.lastIndexOf('/')
|
||||
if (slashIndex > 0) {
|
||||
return team.substring(slashIndex + 1)
|
||||
}
|
||||
return team
|
||||
})
|
||||
}
|
||||
|
||||
export function getRepoPath(relativePath?: string): string {
|
||||
let githubWorkspacePath = process.env['GITHUB_WORKSPACE']
|
||||
if (!githubWorkspacePath) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue