fix: improve misleading authorizer log message for non-Lambda authorizers #3752
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Pull Request Labeler" | |
| on: | |
| pull_request_target: | |
| types: [opened] | |
| jobs: | |
| apply-file-based-labels: | |
| permissions: | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/labeler@v6 | |
| with: | |
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | |
| apply-internal-external-label: | |
| needs: apply-file-based-labels | |
| if: ${{ always() }} | |
| permissions: | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Apply internal/external label | |
| id: label_step | |
| uses: actions/github-script@v8 | |
| with: | |
| github-token: ${{secrets.GITHUB_TOKEN}} | |
| script: | | |
| const maintainers = [ | |
| 'aws-sam-cli-bot', | |
| 'seshubaws', 'valerena', | |
| 'Vandita2020', 'roger-zhangg', | |
| 'vicheey', 'bnusunny', 'tobixlea', | |
| 'reedham-aws', 'licjun', 'dependabot[bot]' | |
| ]; | |
| if (maintainers.includes(context.payload.sender.login)) { | |
| await github.rest.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['pr/internal'] | |
| }); | |
| core.setOutput("external", "false"); | |
| } else { | |
| await github.rest.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['pr/external', 'stage/needs-triage'] | |
| }); | |
| core.setOutput("external", "true"); | |
| } | |
| - name: Send Slack Notification for External PR | |
| if: steps.label_step.outputs.external == 'true' | |
| uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2 | |
| env: | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| SLACK_TITLE: 'PR Created: ${{ github.event.pull_request.title }} by ${{ github.event.pull_request.user.login }}' | |
| SLACK_FOOTER: '' | |
| MSG_MINIMAL: true | |
| SLACK_MESSAGE: '${{ github.event.pull_request.html_url }}' |