Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct the paths to certification files in all apps #480

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions scripts/create_issue_branch.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
gh issue list --assignee "@me" --state "open"
$issues = gh issue list --state "open" --assignee "@me" --json number,title | ConvertFrom-Json
$issueIDs = $issues | ForEach-Object { $_.number }

$value = Read-Host "Please enter an ID value of the issue."

if ([int]::TryParse($value, [ref]$null)) {
if ($issueIDs -contains [int]$value) {
$selectedIssue = $issues | Where-Object { $_.number -eq [int]$value }
$selectedIssueNumber = $selectedIssue.number
$selectedIssueTitle = $selectedIssue.title
Write-Output "Creating branch for the issue number: '$selectedIssueNumber', title: '$selectedIssueTitle'"
gh issue develop $value --base dev --checkout
Write-Output "Pushing the branch to remote"
git push -u origin $(git branch --show-current)
Write-Output "Creating a draft pull request into 'dev'"
gh pr create --base dev --head $(git branch --show-current) --title "$selectedIssueTitle" --body "closes #$selectedIssueNumber" --draft
git add .
git commit -m "Create draft PR for #$selectedIssueNumber"
git push
Write-Output "Sync local and remote branches"
git pull origin $(git branch --show-current)
} else {
Write-Output "Error: The issue ID '$value' does not exist in the list of open issues."
exit 1
}
} else {
Write-Output "Error: The value '$value' is not a valid numeric value."
exit 1
}
Loading