-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (43 loc) · 1.73 KB
/
main.yml
File metadata and controls
49 lines (43 loc) · 1.73 KB
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
name: Project Automation
on:
issues:
types: [assigned]
pull_request:
types: [opened, closed]
jobs:
update-project:
runs-on: ubuntu-latest
steps:
# Depuración de eventos para validar los datos recibidos
- name: Debug GitHub event
run: echo "${{ toJson(github.event) }}"
# Mover el issue a "In Progress" cuando sea asignado
- name: Move issue to "In Progress"
if: ${{ github.event.action == 'assigned' }}
uses: leonsteinhaeuser/project-beta-automations@v2.1.0
with:
gh_token: ${{ secrets.SECRET_TOKEN }}
user: juanppdev
project_id: 15 # ID del proyecto
resource_node_id: ${{ github.event.issue.node_id }}
status_value: "In Progress"
# Mover el PR a "In Review" cuando se abra un pull request
- name: Move PR to "In Review"
if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }}
uses: leonsteinhaeuser/project-beta-automations@v2.1.0
with:
gh_token: ${{ secrets.SECRET_TOKEN }}
user: juanppdev
project_id: 15 # ID del proyecto
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "In Review"
# Mover el PR a "Done" cuando sea cerrado y mergeado
- name: Move PR to "Done"
if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true }}
uses: leonsteinhaeuser/project-beta-automations@v2.1.0
with:
gh_token: ${{ secrets.SECRET_TOKEN }}
user: juanppdev
project_id: 15 # ID del proyecto
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "Done"