Skip to content

Commit

Permalink
Debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
Piedone committed Nov 26, 2022
1 parent 81af569 commit 2dcd3db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if ($Response.StatusCode -ne 200)
}

$content = $Response | ConvertFrom-Json
Write-Output $content
$labelFound = $content.labels.Where(
{
$PSItem.name -eq 'merge-if-checks-succeed' -or $PSItem.name -eq 'merge-and-resolve-jira-issue-if-checks-succeed'
Expand Down
32 changes: 16 additions & 16 deletions .github/actions/auto-merge-pull-request/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ runs:
$response = Invoke-WebRequest $url -Headers $headers -Method Get
Test-Mergeability $response
- name: Merge Pull Request
if: steps.check-mergeability.outputs.is-mergeable == 'true'
shell: pwsh
run: |
$url = "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/merge"
$headers = @{"Authorization" = "Bearer ${{ env.GITHUB_TOKEN }}"; "Accept" = "application/vnd.github+json"}
Invoke-WebRequest $url -Headers $headers -Method Put
#- name: Merge Pull Request
# if: steps.check-mergeability.outputs.is-mergeable == 'true'
# shell: pwsh
# run: |
# $url = "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/merge"
# $headers = @{"Authorization" = "Bearer ${{ env.GITHUB_TOKEN }}"; "Accept" = "application/vnd.github+json"}
# Invoke-WebRequest $url -Headers $headers -Method Put

- name: Remove Label
if: steps.check-mergeability.outputs.is-mergeable == 'true'
# v1.1.1
uses: mondeja/remove-labels-gh-action@9c39e92024101ccb2473aeee441d4923adf58089
with:
token: ${{ env.GITHUB_TOKEN }}
labels: |
merge-and-resolve-jira-issue-if-checks-succeed
merge-if-checks-succeed
#- name: Remove Label
# if: steps.check-mergeability.outputs.is-mergeable == 'true'
# # v1.1.1
# uses: mondeja/remove-labels-gh-action@9c39e92024101ccb2473aeee441d4923adf58089
# with:
# token: ${{ env.GITHUB_TOKEN }}
# labels: |
# merge-and-resolve-jira-issue-if-checks-succeed
# merge-if-checks-succeed

0 comments on commit 2dcd3db

Please sign in to comment.