mirror of
https://github.com/clangd/clangd.git
synced 2025-01-19 03:25:53 +00:00
19 lines
467 B
JavaScript
19 lines
467 B
JavaScript
|
const core = require('@actions/core');
|
||
|
const last = require('last-successful-gh-commit').default;
|
||
|
try {
|
||
|
var parts = core.getInput('repo').split('/', 2);
|
||
|
last({
|
||
|
owner: parts[0],
|
||
|
name: parts[1],
|
||
|
token: core.getInput('token'),
|
||
|
})
|
||
|
.then(commit => core.setOutput('sha', commit.node.oid))
|
||
|
.catch(error => {
|
||
|
console.error(error);
|
||
|
core.setFailed(error.message);
|
||
|
});
|
||
|
} catch (error) {
|
||
|
console.error(error);
|
||
|
core.setFailed(error.message);
|
||
|
}
|