Skip to content

Commit

Permalink
Merge pull request #1465 from hackforla/1438-fix-issue-gha
Browse files Browse the repository at this point in the history
1438 Fix issue assignment comment GHA
  • Loading branch information
sydneywalcoff authored Jun 26, 2024
2 parents f402592 + a1f1ce6 commit bedb4ff
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 31 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/isssue-assigned.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/issue-assigned.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Issue Assignment Comment

on:
issues:
types: [assigned]

jobs:
issue-assignment-comment:
runs-on: ubuntu-latest

steps:
- name: Issue assignment comment
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const assignees = context.payload.issue.assignees;
for (const assignee of assignees) {
const assigneeUsername = `@${assignee.login}`;
const commentBody = `Hey ${assigneeUsername}! Thanks for taking this issue.
To help keep everyone in the loop, please comment your Estimated Time to Completion (ETC) below!
Thanks again!
`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: commentBody,
});
}

0 comments on commit bedb4ff

Please sign in to comment.