Update layout.tsx #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Auto PR Creation and Comment" | |
on: | |
push: | |
branches: | |
- main # Set to your default branch | |
jobs: | |
auto-pr-create-and-comment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install GitHub CLI | |
run: sudo apt-get update && sudo apt-get install -y gh | |
- name: Setup GitHub CLI | |
run: gh auth login --with-token ${{ secrets.GITHUB_TOKEN }} | |
- name: Create PR with Comment | |
run: | | |
ticket=$(echo ${{ github.ref }} | grep -o 'ITP-[0-9]*') | |
pr_url=$(gh pr create --base main --head ${{ github.ref }} --title "PR for $ticket" --body "Link to the ticket: [JIRA Ticket](https://arc-solutions.atlassian.net/browse/$ticket)" --repo ${{ github.repository }} --json url -q '.url') | |
echo "Created PR: $pr_url" |