Feature/b2 cfront 5763 #1
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: Update-link | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
jobs: | |
replace-link: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Add build link to body | |
id: body_with_build_link | |
uses: frabert/[email protected] | |
with: | |
pattern: '%BRANCH_BUILD%' | |
string: ${{ github.event.pull_request.body }} | |
replace-with: ${{ github.head_ref }} | |
- name: Prepare jira branch name | |
id: prepared_jira_branch_name | |
uses: frabert/[email protected] | |
with: | |
pattern: '(feature|fix|hotfix)\/' | |
string: ${{ github.head_ref }} | |
replace-with: '' | |
- name: Add jira link to body | |
id: body_with_jira_link | |
uses: frabert/[email protected] | |
with: | |
pattern: '%JIRA%' | |
string: ${{ steps.body_with_stand_link.outputs.replaced }} | |
replace-with: ${{ steps.prepared_jira_branch_name.outputs.replaced }} | |
- name: PR body replace | |
uses: AsasInnab/pr-body-action@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
body: ${{ steps.body_with_jira_link.outputs.replaced }} |