Skip to content

Commit

Permalink
Added PR id inputt
Browse files Browse the repository at this point in the history
  • Loading branch information
goruha committed Aug 28, 2024
1 parent 4461e02 commit d06d759
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ references: []

# How to use this project
usage: |-
### By SHA
```yaml
on:
push:
Expand Down Expand Up @@ -62,6 +64,41 @@ usage: |-
closed_at: ${{ steps.pr.outputs.closed_at }}
labels: ${{ steps.pr.outputs.labels }}
```
### By ID
```yaml
on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]
jobs:
pr:
name: PR Info
runs-on: ubuntu-latest
steps:
- uses: cloudposse-github-actions/get-pr@main
id: pr
with:
id: ${{ github.event.number }}
outputs:
base: ${{ fromJSON(steps.pr.outputs.pr).base.sha }}
head: ${{ fromJSON(steps.pr.outputs.pr).head.sha }}
found: ${{ steps.pr.outputs.found }}
json: ${{ steps.pr.outputs.json }}
number: ${{ steps.pr.outputs.number }}
title: ${{ steps.pr.outputs.title }}
body: ${{ steps.pr.outputs.body }}
url: ${{ steps.pr.outputs.url }}
created_at: ${{ steps.pr.outputs.created_at }}
merged_at: ${{ steps.pr.outputs.merged_at }}
closed_at: ${{ steps.pr.outputs.closed_at }}
labels: ${{ steps.pr.outputs.labels }}
```
include:
- "docs/github-action.md"

Expand Down

0 comments on commit d06d759

Please sign in to comment.