Skip to content
Open
Show file tree
Hide file tree
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
22 changes: 22 additions & 0 deletions .github/workflows/review-build-url-v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Post Review Build URL to PR
on:
pull_request:
types: [opened]
jobs:
example:
name: Post to PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: get-branch-name-sanitized
name: Sanitize branch name
shell: bash
run: echo "::set-output name=branch::$(jq --raw-output .pull_request.head.ref "$GITHUB_EVENT_PATH" | tr -cd '[a-zA-Z0-9]-' | cut -b 1-40)"
- name: Post Review Build URL
if: startsWith(steps.get-branch-name-sanitized.outputs.branch, 'feature')
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "Branch name is correct"
check_for_duplicate_msg: true
17 changes: 17 additions & 0 deletions .github/workflows/review-build-url.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

name: Post Review Build URL to PR
on:
pull_request:
types: [opened]
jobs:
branch_name:
runs-on: ubuntu-latest
name: Branch Name
steps:
- uses: actions/checkout@v2
with:
branch_pattern: 'feature'
comment_for_invalid_branch_name: 'This branch name is not following the standards. Name should start with feature/'
fail_if_invalid_branch_name: 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}