Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting SLACK_WEBHOOK_URL from organization secret breaks build #211

Open
armNH opened this issue Jul 11, 2022 · 1 comment
Open

Setting SLACK_WEBHOOK_URL from organization secret breaks build #211

armNH opened this issue Jul 11, 2022 · 1 comment

Comments

@armNH
Copy link

armNH commented Jul 11, 2022

Setting SLACK_WEBHOOK_URL from organization secrets leads to faild build with message: An HTTP protocol error occurred: statusCode = 302

Log:
Run 8398a7/action-slack@v3
with:
status: custom
fields: workflow,job,commit,repo,ref,author,took
custom_payload: {
attachments: [{
title: :construction: BUILDING: ${process.env.AS_WORKFLOW},
color: 'warning',
text: ${process.env.AS_JOB} (${process.env.AS_COMMIT}) of ${process.env.AS_REPO}@${process.env.AS_REF} by ${process.env.AS_AUTHOR},
}]
}

author_name: 8398a7@action-slack
github_token: ***

env:
SLACK_WEBHOOK_URL: ***
Error: An HTTP protocol error occurred: statusCode = 302

Workflow command:

  • name: Notify BUILD START to Slack
    uses: 8398a7/action-slack@v3
    with:
    status: custom
    fields: workflow,job,commit,repo,ref,author,took
    custom_payload: |
    {
    attachments: [{
    title: :construction: BUILDING: ${process.env.AS_WORKFLOW},
    color: 'warning',
    text: ${process.env.AS_JOB} (${process.env.AS_COMMIT}) of ${process.env.AS_REPO}@${process.env.AS_REF} by ${process.env.AS_AUTHOR},
    }]
    }
    env:
    SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK}}
    if: always()

If i set the same secret on the repository than it works as expected and there is no error.

@epicguy
Copy link

epicguy commented Sep 14, 2024

Just FYI: I got the same error response:

An HTTP protocol error occurred: statusCode = 302

when I had accidently included a leading space while cut-n-pasting the slack URL in as my secret.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants