|
| 1 | +name: Project Automation |
| 2 | + |
| 3 | +on: |
| 4 | + issues: |
| 5 | + types: [assigned] |
| 6 | + pull_request: |
| 7 | + types: [opened, closed] |
| 8 | + |
| 9 | +jobs: |
| 10 | + update-project: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + steps: |
| 14 | + # Depuración de eventos para validar los datos recibidos |
| 15 | + - name: Debug GitHub event |
| 16 | + run: echo "${{ toJson(github.event) }}" |
| 17 | + |
| 18 | + # Mover el issue a "In Progress" cuando sea asignado |
| 19 | + - name: Move issue to "In Progress" |
| 20 | + if: ${{ github.event.action == 'assigned' }} |
| 21 | + uses: leonsteinhaeuser/project-beta-automations@v2.1.0 |
| 22 | + with: |
| 23 | + gh_token: ${{ secrets.SECRET_TOKEN }} |
| 24 | + user: juanppdev |
| 25 | + project_id: 15 # ID del proyecto |
| 26 | + resource_node_id: ${{ github.event.issue.node_id }} |
| 27 | + status_value: "In Progress" |
| 28 | + |
| 29 | + # Mover el PR a "In Review" cuando se abra un pull request |
| 30 | + - name: Move PR to "In Review" |
| 31 | + if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} |
| 32 | + uses: leonsteinhaeuser/project-beta-automations@v2.1.0 |
| 33 | + with: |
| 34 | + gh_token: ${{ secrets.SECRET_TOKEN }} |
| 35 | + user: juanppdev |
| 36 | + project_id: 15 # ID del proyecto |
| 37 | + resource_node_id: ${{ github.event.pull_request.node_id }} |
| 38 | + status_value: "In Review" |
| 39 | + |
| 40 | + # Mover el PR a "Done" cuando sea cerrado y mergeado |
| 41 | + - name: Move PR to "Done" |
| 42 | + if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true }} |
| 43 | + uses: leonsteinhaeuser/project-beta-automations@v2.1.0 |
| 44 | + with: |
| 45 | + gh_token: ${{ secrets.SECRET_TOKEN }} |
| 46 | + user: juanppdev |
| 47 | + project_id: 15 # ID del proyecto |
| 48 | + resource_node_id: ${{ github.event.pull_request.node_id }} |
| 49 | + status_value: "Done" |
0 commit comments