HamiltonNunesMorais / TesteJava

0 stars 0 forks source link

ver #35

Open HamiltonNunesMorais opened 3 hours ago

HamiltonNunesMorais commented 3 hours ago

https://chatgpt.com/share/673aa964-9728-800f-85d2-ff84c479514d

HamiltonNunesMorais commented 3 hours ago

name: "PR Workflow with ServiceNow Approval"

on: pull_request: branches:

jobs: create-change-request: runs-on: ubuntu-latest

steps:
  - name: Checkout code
    uses: actions/checkout@v3

  - name: Create Change Request in ServiceNow
    uses: your-org/servicenow-action@v1
    with:
      assignment_group: "IT Support"
      short_description: "Change request for PR #${{ github.event.pull_request.number }}"
      client_id: "client-123456"

  - name: Wait for Approval
    uses: your-org/servicenow-action@v1
    with:
      action: "await-approval" # Aguarda aprovação no ServiceNow
      change_request_id: ${{ steps.create-change-request.outputs.cr_id }}

validate-approval: runs-on: ubuntu-latest needs: create-change-request steps:

HamiltonNunesMorais commented 3 hours ago

name: "Custom ServiceNow Action Wrapper" description: "A wrapper for the ServiceNow action to simplify parameter passing."

inputs: assignment_group: description: "The assignment group for the change request." required: true short_description: description: "The short description for the change request." required: true client_id: description: "The client ID related to the change request." required: true

runs: using: "composite" steps: