Coder Social home page Coder Social logo

strawberry-graphql / get-pr-info-action Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 1.0 30 KB

Action to get information about a PR (also when the PR is merged to the main branch)

License: MIT License

JavaScript 100.00%
hacktoberfest hacktoberfest2021

get-pr-info-action's Introduction

Get PR info action

This GitHub action allows to get information about a PR. It also works when merging a PR into the main branch.

We use this action to send a tweet containing the PR's contributor name.

Inputs

This action requires no inputs. But it needs the GitHub access token to be able to get information about the PR and the contributor.

Outputs

  • has-pr: Wether this commit has a PR associated with it or not
  • pr-number: The PR number
  • contributor-name: The name of the contributor, it falls back to the contributor's username if the name is not set.
  • contributor-username: The username of the contributor.
  • contributor-twitter-username: The twitter username of the contributor.
  • repository-name : The name of the base repository

Example usage

name: Get PR info

on:
  pull_request:

jobs:
  get-contributor-info:
    name: Get PR info
    runs-on: ubuntu-latest

    outputs:
      contributor-name: ${{ steps.get-info.outputs.contributor-name }}
      contributor-username: ${{ steps.get-info.outputs.contributor-username }}
      contributor-twitter-username: ${{ steps.get-info.outputs.contributor-twitter-username }}

    steps:
      - uses: actions/checkout@v2
      - name: Get PR info
        id: get-info
        uses: strawberry-graphql/get-pr-info-action@v1
        env:
          ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

get-pr-info-action's People

Contributors

estyxx avatar patrick91 avatar pre-commit-ci[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

estyxx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.