IPROTO-341 Transcode json array root object #33
Workflow file for this run
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: Dependabot Jira | |
on: | |
pull_request_target: | |
branches: | |
- 4.6.x | |
- main | |
types: | |
- opened | |
- reopened | |
jobs: | |
jira: | |
if: github.actor == 'dependabot[bot]' && !contains(github.event.pull_request.labels.*.name, 'github_actions') && startsWith(github.event.pull_request.title, 'Bump') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
repository: infinispan/infinispan | |
- name: Jira Summary | |
run: echo SUMMARY=$(echo "${{ github.event.pull_request.title }}" | grep -oP '(?<=Bump )(.*)(?=from)|(?<=to )(.*)' | tr -d '\n') >> $GITHUB_ENV | |
- name: Create or Update Existing Jira | |
run: | | |
source ./bin/jira/upsert.sh | |
echo "JIRA_ISSUE_KEY=${JIRA_ISSUE_KEY}" >> $GITHUB_ENV | |
echo "JIRA_ISSUE_URL=${JIRA_ISSUE_URL}" >> $GITHUB_ENV | |
env: | |
ASSIGNEE: infinispan-bot | |
PROJECT_KEY: IPROTO | |
PULL_REQUEST: ${{ github.event.pull_request.html_url }} | |
SUMMARY: ${{ env.SUMMARY }} | |
TOKEN: ${{ secrets.JIRA_API_TOKEN }} | |
TYPE: Component Upgrade | |
RUNNER_DEBUG: "1" | |
- name: Add comment to PR | |
run: gh pr comment ${{ github.event.pull_request.number }} --body ${{ env.JIRA_ISSUE_URL }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update PR Title main | |
if: ${{ github.base_ref == 'main' }} | |
run: gh pr edit ${{ github.event.pull_request.number }} --title "${{ env.JIRA_ISSUE_KEY }} ${{ github.event.pull_request.title }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update PR Title | |
if: startsWith(github.event.pull_request.title, 'Bump') | |
run: gh pr edit ${{ github.event.pull_request.number }} --title "${{ env.JIRA_ISSUE_KEY }} ${{ github.event.pull_request.title }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set PR Milestone | |
id: milestone | |
run: | | |
sudo apt-get install xmlstarlet | |
MVN_VERSION=$(xmlstarlet sel -t -m _:project -v _:version pom.xml) | |
export MAJOR_VERSION=${MVN_VERSION%.*.*} | |
gh pr edit ${{ github.event.pull_request.number }} --milestone "$(./bin/jira/get_milestone.sh)" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PROJECT_KEY: ISPN | |
TOKEN: ${{ secrets.JIRA_API_TOKEN }} | |
- name: Approve PR for auto-merge | |
run: gh pr merge --auto --rebase ${{ github.event.pull_request.number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |