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

actions-git

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

actions-git

github actions git library functions

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

actions-git

Library for git related functions

Usage

headSHA()

The value of GITHUB_SHA cannot be relied on as always being the head SHA. For instance if the event triggering a build is of the type pull_request, then the GITHUB_SHA will point to the SHA of the merge commit not the head of the PR branch. This is the case even if actions/checkout is told to checkout the PR branch. This function calls out to git to get the actual head SHA.

import * as git from '@tradeshift/actions-git'

const sha = await git.headSHA()

FAQs

Package last updated on 14 Jun 2021

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