Skip to content

Commit

Permalink
feat: automatic project management
Browse files Browse the repository at this point in the history
  • Loading branch information
Robso-creator committed Jan 30, 2024
1 parent ab5d3f2 commit c9bb9ca
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/project_management.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
on:
issues:
types:
- opened
push:

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'; // Substitua pelo nome do responsável
# const issueNumber = 22;
# const repo = context.repo.repo;
#
# try {
# // Atribuir o responsável à issue
# 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);
# }

add-to-project:
runs-on: ubuntu-latest
steps:
- name: Configure Issue
uses: actions/github-script@v3
with:
github-token: ${{ secrets.ISSUE }}
script: |
const projectId = '2';
const columnName = 'Backlog'; // Substitua pelo nome da coluna do seu projeto
const issueNumber = 20;
const repo = context.repo.repo;
// Obter lista de projetos no repositório
const projects = await github.projects.listForRepo({
owner: context.repo.owner,
repo: repo,
});
console.log(projects)

0 comments on commit c9bb9ca

Please sign in to comment.