Skip to content

Commit a418dc0

Browse files
committed
Merge branch 'main' into widget-richtext
2 parents c8b1c59 + 13afe66 commit a418dc0

File tree

109 files changed

+2588
-779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2588
-779
lines changed

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
label-pr:
8-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
8+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]'
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: netlify/[email protected]

functions/publish.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ exports.handler = async function(event) {
5353
const command = params.get('command');
5454
const userId = params.get('user_id');
5555

56-
const allowedUsers = (process.env.ALLOWED_USERS || '').split(',');
57-
if (!allowedUsers.includes(userId)) {
56+
const allowedUsers = (process.env.ALLOWED_USERS || '')
57+
.split(',')
58+
.map(u => u.trim().toLowerCase());
59+
if (!allowedUsers.includes(userId.toLowerCase())) {
5860
throw new Error(`User '${params.get('user_name')}' is not allowed to run command`);
5961
}
6062

6163
const expectedCommand = process.env.PUBLISH_COMMAND;
62-
if (expectedCommand && expectedCommand == command) {
64+
if (expectedCommand && expectedCommand === command) {
6365
const githubToken = process.env.GITHUB_TOKEN;
6466
const repo = process.env.GITHUB_REPO;
6567
await axios({

0 commit comments

Comments
 (0)