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

LIBAAEC-33 Modify PR template body and create github actions to add Jira issue #476

Merged
merged 20 commits into from
Feb 11, 2025
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
20f7c1f
Modify PR template body and create github action to add Jira issue
Janell-Huyck Oct 16, 2024
0cf7ee4
Add github action to update PR title
Janell-Huyck Oct 16, 2024
c69562e
Fix Github automation error
Janell-Huyck Oct 16, 2024
076c5f9
Break up large run blocks in github actions, fix flaky test
Janell-Huyck Oct 16, 2024
e947b22
Update github action to use new Environment file
Janell-Huyck Oct 16, 2024
54153d5
Fix flaky tests
Janell-Huyck Oct 16, 2024
ea7f73b
Correct multiple title updates
Janell-Huyck Oct 16, 2024
4a3f005
Fix syntax error of unclosed if/else statement in yml file
Janell-Huyck Oct 16, 2024
334111c
Simplify adding jira issue, add clarifying comments, fix errors
Janell-Huyck Oct 16, 2024
605fc65
fix flaky test
Janell-Huyck Oct 16, 2024
4cb6a1c
Make template github action run when commits are pushed
Janell-Huyck Oct 16, 2024
d184b2c
Correct 'Check if Jira link exists in PR body' task
Janell-Huyck Oct 24, 2024
392d4a5
Safely load PR body using jq
Janell-Huyck Oct 28, 2024
fab9edb
Add workflow file for jira-pr-updater
Janell-Huyck Nov 22, 2024
040e494
Update to Rails 6.1.7.10
Janell-Huyck Nov 25, 2024
87aa1c8
Update to Rails 6.1.7.10
Janell-Huyck Nov 25, 2024
b7d79bc
Add brakeman.ignore file to ignore brakeman warning for Rails 6.1.7.10
Janell-Huyck Nov 27, 2024
451819b
Merge branch 'qa' into LIBAAEC-33-update-pr-template
Janell-Huyck Jan 23, 2025
981cd02
Add .bundler-audit file to ignore warnings that need Rails 7
Janell-Huyck Jan 23, 2025
d574d55
Merge branch 'qa' into LIBAAEC-33-update-pr-template
Janell-Huyck Jan 27, 2025
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
Prev Previous commit
Next Next commit
Add github action to update PR title
Janell-Huyck committed Nov 27, 2024
commit 0cf7ee47e701d40463f5f6d2e4d5ecb3f7d4fabc
34 changes: 34 additions & 0 deletions .github/workflows/update-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Update PR Title with Jira Issue

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
update-pr-title:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Extract Jira Issue from Branch Name
run: |
branch_name=$(echo "${{ github.event.pull_request.head.ref }}" | grep -oE 'LIBAAEC-[0-9]+')
if [ -z "$branch_name" ]; then
echo "No Jira issue found in branch name."
exit 0
fi
current_title="${{ github.event.pull_request.title }}"
new_title="$branch_name $current_title"

# Check if the current title already contains the Jira issue
if [[ "$current_title" =~ $branch_name ]]; then
echo "PR title already contains the Jira issue."
exit 0
fi

# Update the PR title using GitHub API
echo "Updating PR title to: $new_title"
curl -s -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-d "{\"title\":\"$new_title\"}" \
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}"