Skip to content

nv-gha-runners/get-pr-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

get-pr-info

This composite action is intended to be used in workflows that run on pull-request/<PR_NUMBER> branches.

It will extract the pull-request number from the branch name and use it to fetch information about the corresponding pull-request from GitHub's API.

The JSON object returned by this composite action is described here: https://docs.github.com/en/rest/pulls/pulls#get-a-pull-request.

Example Usage

name: Get PR Info Demo

on:
  push:
    branches:
      - "pull-request/[0-9]+"

jobs:
  main_job:
    runs-on: ubuntu-latest
    steps:
      - id: get-pr-info
        uses: nv-gha-runners/get-pr-info@main
      - run: echo "${BASE_BRANCH}"
        env:
          BASE_BRANCH: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.ref }}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published