Skip to content

build(deps-dev): bump @commitlint/cli from 18.5.0 to 18.6.0 #170

build(deps-dev): bump @commitlint/cli from 18.5.0 to 18.6.0

build(deps-dev): bump @commitlint/cli from 18.5.0 to 18.6.0 #170

Workflow file for this run

# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
#
# https://frontside.com/blog/2020-05-26-github-actions-pull_request/#how-do-workflows-trigger-on-pull_request
#
# | type | description |
# | ---------------------- | ----------------------------------------------------- |
# | assigned | a user is assigned to the pull request |
# | unassigned | a user is unassigned from the pull request |
# | labeled | a label is applied to the pull request |
# | unlabeled | a label is removed from the pull request |
# | opened | pull request is created |
# | edited | title, body, or the base branch of the PR is modified |
# | closed | pull request is closed (as opposed to merged) |
# | reopened | closed pull request is reopened |
# | synchronize | commit(s) pushed to the pull request |
# | ready_for_review | pull request is taken out from draft mode |
# | locked | pull request is locked |
# | unlocked | pull request is unlocked |
# | review_requested | request a user for review |
# | review_request_removed | remove request from user for review |
name: Pull Request
on:
pull_request:
# defaults to opened, synchronize, reopened
types: [opened, synchronize, reopened, closed, edited]
jobs:
pull-request:
runs-on: ubuntu-latest
steps:
- name: github.event_name
run: echo '${{ github.event_name }}'
- name: github.base_ref (target branch)
run: echo '${{ github.base_ref }}'
- name: github.head_ref (source branch)
run: echo '${{ github.head_ref }}'
- name: github.event.pull_request.title (PR title)
if: github.event_name == 'pull_request'
run: echo '${{ github.event.pull_request.title }}'
- name: github.event.number (PR number)
if: github.event_name == 'pull_request'
run: echo '${{ github.event.number }}'
- name: github.event.action (activity type)
run: echo '${{ github.event.action }}'
- name: github.event.pull_request
if: github.event_name == 'pull_request'
run: echo '${{ toJson(github.event.pull_request) }}'
continue-on-error: true
pull-request-comment:
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#example-setting-permissions-for-a-specific-job
permissions:
pull-requests: write
steps:
# https://github.com/actions/github-script#comment-on-an-issue
- name: Add comment to opened PR
if: github.event.action == 'opened'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '👋 Thanks for reporting!'
})
# https://cli.github.com/manual/gh_pr_comment
- name: Checkout
uses: actions/checkout@v4
- name: Add comment to PR
run: gh pr comment ${{ github.event.number }} --body '[Hi from GitHub CLI](https://cli.github.com/manual/gh_pr_comment)'
env:
GITHUB_TOKEN: ${{ github.token }}
pull-request-merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: PR merged
run: echo 'PR merged'
- name: github.event.pull_request
run: echo '${{ toJson(github.event.pull_request) }}'
continue-on-error: true