Skip to content

Commit

Permalink
Merge pull request #24 from Robso-creator/issue-20
Browse files Browse the repository at this point in the history
feat: automatic project management
  • Loading branch information
Robso-creator authored Jan 30, 2024
2 parents ab5d3f2 + d21bb4e commit 10ba4f3
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/project_management.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on:
issues:
types:
- opened

jobs:
issue-assignee:
runs-on: ubuntu-latest
steps:
- name: Assignee
uses: actions/github-script@v3
with:
github-token: ${{ secrets.ISSUES }}
script: |
const assignee = 'Robso-creator';
const issueNumber = context.payload.issue.number;
const repo = context.repo.repo;
try {
await github.issues.addAssignees({
owner: context.repo.owner,
repo: repo,
issue_number: issueNumber,
assignees: [assignee],
});
console.log(`Responsável ${assignee} atribuído à issue #${issueNumber}`);
} catch (error) {
console.error('Erro ao atribuir responsável à issue:', error.message);
process.exit(1);
}

0 comments on commit 10ba4f3

Please sign in to comment.