-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #642 from onflow/546-feature-remove-background-col…
…our-change-on-dev-builds
- Loading branch information
Showing
8 changed files
with
174 additions
and
49 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Get the current branch name | ||
BRANCH_NAME=$(git symbolic-ref --short HEAD) | ||
|
||
# Extract issue number from branch name (assuming format like "546-feature-remove-background-colour") | ||
ISSUE_NUMBER=$(echo $BRANCH_NAME | grep -o '^[0-9]\+') | ||
|
||
# Get the current commit message | ||
COMMIT_MSG=$(cat "$1") | ||
|
||
# Only append "Closes #issue" if: | ||
# 1. Issue number exists in the branch name | ||
# 2. It's not already in the commit message | ||
if [[ ! -z "$ISSUE_NUMBER" && ! "$COMMIT_MSG" =~ "Closes #$ISSUE_NUMBER" ]]; then | ||
echo "$COMMIT_MSG" > "$1" | ||
echo "" >> "$1" # Add a blank line | ||
echo "Closes #$ISSUE_NUMBER" >> "$1" | ||
fi |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Set environment badge based on branch | ||
|
||
export const setEnvironmentBadge = () => { | ||
const deploymentEnv = process.env.DEPLOYMENT_ENV; | ||
|
||
if (deploymentEnv === 'production') { | ||
// No badge for production | ||
chrome.action.setBadgeText({ text: '' }); | ||
} else if (deploymentEnv === 'staging') { | ||
chrome.action.setBadgeText({ text: 'stg' }); | ||
} else if (deploymentEnv === 'development') { | ||
chrome.action.setBadgeText({ text: 'dev' }); | ||
} else { | ||
chrome.action.setBadgeText({ text: 'lcl' }); | ||
} | ||
chrome.action.setBadgeBackgroundColor({ color: '#121212' }); | ||
}; |
This file contains 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
This file contains 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