New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@beesley/pr-metadata

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beesley/pr-metadata

A cli tool for reading information about pull requests within github actions.

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
94
increased by944.44%
Maintainers
1
Weekly downloads
 
Created
Source

Build, Test & Publish Main

@beesley/pr-metadata

A tool for reading information about pull requests within github actions. Works as a cli or as a node module. Expects a GITHUB_TOKEN env var to be set.

CLI Usage

npx @beesley/pr-metadata --help
# Options:
#   --help      Show help                                                                       [boolean]
#   --version   Show version number                                                             [boolean]
#   --dirNames  Whether to return directory names instead of file names                         [boolean] [default: false]
#   --json      Whether to return result as a json string                                       [boolean] [default: true]
#   --filter    An array of globs to act as an include filter for where we look for changes     [array]

npx @beesley/pr-metadata
# [".commitlintrc.json","src/__mocks__/mock-context.json","src/__mocks__/push-event.json","src/get-changed-files.test.ts","src/get-changed-files.ts","src/index.ts"]

npx @beesley/pr-metadata --json false
# [
#   '.commitlintrc.json',
#   'src/__mocks__/mock-context.json',
#   'src/__mocks__/push-event.json',
#   'src/get-changed-files.test.ts',
#   'src/get-changed-files.ts',
#   'src/index.ts'
# ]

npx @beesley/pr-metadata --dirNames
# ["bin","src/__mocks__","src"]

npx @beesley/pr-metadata --dirNames --filter '**' --filter '!**/__mocks__/**'
# ["bin","src"]

npx @beesley/pr-metadata --filter 'src/**'
# ["src/__mocks__/mock-context.json","src/__mocks__/push-event.json","src/get-changed-files.test.ts","src/get-changed-files.ts","src/index.ts"]

API

Table of Contents

getChangedFiles

src/get-changed-files.ts:13-17

Uses github actions metadata to get a list of changes files or directories

Parameters
  • json boolean Whether or not to return json
  • dirNames boolean Whether or not to return only directory names
  • filter Array<string>? Filter globs to filter results using

Returns any {(Promise<string | string[]>)} The changed files or directories

FAQs

Package last updated on 22 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc