mirror of
https://github.com/rlespinasse/github-slug-action.git
synced 2026-06-11 17:13:04 +00:00
feat: expose GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT
This commit is contained in:
4
dist/index.js
vendored
4
dist/index.js
vendored
@@ -116,6 +116,7 @@ const GITHUB_BASE_REF_SLUG_URL = 'GITHUB_BASE_REF_SLUG_URL';
|
||||
const GITHUB_SHA_SHORT = 'GITHUB_SHA_SHORT';
|
||||
const GITHUB_EVENT_REF_SLUG = 'GITHUB_EVENT_REF_SLUG';
|
||||
const GITHUB_EVENT_REF_SLUG_URL = 'GITHUB_EVENT_REF_SLUG_URL';
|
||||
const GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT = 'GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT';
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
@@ -126,6 +127,9 @@ function run() {
|
||||
core.exportVariable(GITHUB_EVENT_REF_SLUG, slug_1.slugref(eventData.ref));
|
||||
core.exportVariable(GITHUB_EVENT_REF_SLUG_URL, slug_1.slugurlref(eventData.ref));
|
||||
}
|
||||
else if (eventData.hasOwnProperty('pull_request')) {
|
||||
core.exportVariable(GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT, slug_1.shortsha(eventData.pull_request.head.sha));
|
||||
}
|
||||
}
|
||||
exportSlug(GITHUB_REPOSITORY, GITHUB_REPOSITORY_SLUG);
|
||||
exportSlugUrl(GITHUB_REPOSITORY, GITHUB_REPOSITORY_SLUG_URL);
|
||||
|
||||
Reference in New Issue
Block a user