-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.53 KB
/
project_management.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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
permissions: write-all
steps:
- name: Checkout do repositório
uses: actions/checkout@v2
- name: Executar script GitHub
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const repo = 'discord_bot';
const projectNumber = 2;
// Atribuir issue ao projeto
await github.projects.createCard({
column_id: projectNumber,
content_id: 22,
content_type: "Issue",
});