Skip to content

Commit

Permalink
fix: update new-implementation.yml to run for first time implementors…
Browse files Browse the repository at this point in the history
… only
  • Loading branch information
nikhilkalburgi authored Sep 23, 2024
1 parent 014026c commit d5ee854
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/new-implementation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,22 @@ jobs:
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
const { data: pullRequests } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
body: process.env.NEW_TOOL_MESSAGE,
})
state: 'all'
});
const userPRs = pullRequests.filter(pr => pr.user.login === context.actor);
if (userPRs.length === 0) {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: process.env.NEW_TOOL_MESSAGE,
})
}
env:
NEW_TOOL_MESSAGE: |
Hey there 👋!
Expand Down

0 comments on commit d5ee854

Please sign in to comment.