Skip to content

Commit

Permalink
Update pr-validation.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ppatel1604 authored May 25, 2024
1 parent 21cad1d commit 30e4abc
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,24 @@ jobs:
const description = ${{ steps.validation.outputs.PR_STATUS }} ? "PR title is valid." : `PR title is invalid. Ensure it matches the pattern: ${regex}`;
const prNumber = context.payload.pull_request.number;
const commitSha = context.payload.pull_request.head.sha;
const runId = context.runId;
const repoOwner = context.repo.owner;
const repoName = context.repo.repo;
const contextName = process.env.GITHUB_WORKFLOW;
const workflowRun = await github.actions.getWorkflowRun({
owner: repoOwner,
repo: repoName,
run_id: runId
});
console.log(workflowRun.data);
// Create a status check
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
owner: repoOwner,
repo: repoName,
sha: commitSha,
state: state,
context: contextName,
Expand Down

0 comments on commit 30e4abc

Please sign in to comment.