-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b5b6bef
Showing
21 changed files
with
2,191 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# These are supported funding model platforms | ||
|
||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: barudakrosul # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: [ | ||
"https://www.trakteer.id/barudakrosul", | ||
] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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,25 @@ | ||
name: Bug report | ||
description: Create a report to help us improve. | ||
labels: | ||
- "bug" | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Describe the bug | ||
description: A clear and concise description of what the bug is. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Expected behavior | ||
description: | ||
A clear and concise description of what you expected to happen. | ||
- type: textarea | ||
attributes: | ||
label: Screenshots / Link Image | ||
description: If applicable, add screenshots to help explain your problem. | ||
placeholder: Paste the screenshots image link as markdown image | ||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: Add any other context about the problem here. |
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,28 @@ | ||
name: Feature request | ||
description: Suggest an idea for this project. | ||
labels: | ||
- "enhancement" | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Is your feature request related to a problem? Please describe. | ||
description: | ||
A clear and concise description of what the problem is. Ex. I'm always | ||
frustrated when [...] | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe the solution you'd like | ||
description: A clear and concise description of what you want to happen. | ||
- type: textarea | ||
attributes: | ||
label: Describe alternatives you've considered | ||
description: | ||
A clear and concise description of any alternative solutions or features | ||
you've considered. | ||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: | ||
Add any other context or screenshots about the feature request here. |
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,21 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for NPM | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 100 | ||
commit-message: | ||
prefix: "build(deps)" | ||
prefix-development: "build(deps-dev)" | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 100 | ||
commit-message: | ||
prefix: "build(deps)" | ||
prefix-development: "build(deps-dev)" |
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,32 @@ | ||
queue_rules: | ||
- name: dep-update | ||
batch_size: 100 | ||
batch_max_wait_time: 30 min | ||
queue_conditions: | ||
- author = dependabot[bot] | ||
|
||
pull_request_rules: | ||
- name: Automatic approve for Dependabot pull requests | ||
conditions: | ||
- author = dependabot[bot] | ||
actions: | ||
review: | ||
type: APPROVE | ||
- name: Automatic merge for Dependabot pull requests | ||
conditions: | ||
- author = dependabot[bot] | ||
- "#approved-reviews-by>=1" | ||
actions: | ||
queue: | ||
- name: Automatic approve for GitHub Actions pull requests | ||
conditions: | ||
- author = github-actions[bot] | ||
actions: | ||
review: | ||
type: APPROVE | ||
- name: Automatic merge for GitHub Actions pull requests | ||
conditions: | ||
- author = github-actions[bot] | ||
- "#approved-reviews-by>=1" | ||
actions: | ||
merge: |
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,83 @@ | ||
name: Auto Build All Dependencies and DevDependencies | ||
on: | ||
schedule: | ||
# ┌───────────── minute (0 - 59) | ||
# │ ┌───────────── hour (0 - 23) | ||
# │ │ ┌───────────── day of the month (1 - 31) | ||
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | ||
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | ||
# │ │ │ │ │ | ||
# │ │ │ │ │ | ||
# │ │ │ │ │ | ||
# * * * * * | ||
- cron: "0 0 */7 * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
actions: read | ||
checks: read | ||
contents: write | ||
deployments: read | ||
issues: read | ||
discussions: read | ||
packages: read | ||
pages: read | ||
pull-requests: write | ||
repository-projects: read | ||
security-events: read | ||
statuses: read | ||
|
||
jobs: | ||
autoBuild: | ||
runs-on: ubuntu-latest | ||
name: Auto build deps | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
if: github.repository == 'BarudakRosul/title-case' | ||
|
||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
|
||
# Fix the unsafe repo error which was introduced by the CVE-2022-24765 git patches. | ||
- name: Fix unsafe repo error | ||
run: git config --global --add safe.directory ${{ github.workspace }} | ||
|
||
- name: Run npm install and update | ||
run: | | ||
npm install | ||
npm update --save | ||
env: | ||
CI: true | ||
|
||
- name: Set up Git | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
- name: Push commit to a new branch | ||
run: | | ||
branch="auto_build_and_bump" | ||
message="build(deps): bump all dependencies and devDependencies version" | ||
body=$(printf "## Changes File\n\n\`\`\`diff\n$(git diff)\n\`\`\`\n\n> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>") | ||
if [[ ${#body} >= 65000 ]]; then | ||
body="⚠️ The text diff is too longer, [view changes](https://github.com/BarudakRosul/title-case/pull/${{ github.event.number }}/files)." | ||
fi | ||
if [[ "$(git status --porcelain)" != "" ]]; then | ||
git branch -D ${branch} || true | ||
git checkout -b ${branch} | ||
git add package.json package-lock.json | ||
git commit --message "${message}" | ||
git remote add origin-${branch} "https://github.com/BarudakRosul/title-case.git" | ||
git push --force --quiet --set-upstream origin-${branch} ${branch} | ||
gh pr create --title "${message}" --body "${body}" | ||
fi | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,47 @@ | ||
name: prs cache clean | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
permissions: | ||
actions: write | ||
checks: read | ||
contents: read | ||
deployments: read | ||
issues: read | ||
discussions: read | ||
packages: read | ||
pages: read | ||
pull-requests: read | ||
repository-projects: read | ||
security-events: read | ||
statuses: read | ||
|
||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Cleanup | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
REPO=${{ github.repository }} | ||
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" | ||
echo "Fetching list of cache key" | ||
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) | ||
## Setting this to not fail the workflow while deleting cache keys. | ||
set +e | ||
echo "Deleting caches..." | ||
for cacheKey in $cacheKeysForPR | ||
do | ||
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm | ||
done | ||
echo "Done" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,23 @@ | ||
name: Publish package to NPM.js | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | ||
with: | ||
node-version: "18.x" | ||
registry-url: "https://registry.npmjs.org" | ||
# Defaults to the user or organization that owns the workflow file | ||
scope: "@barudakrosul" | ||
- run: npm install | ||
- run: npm publish --public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,34 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
build: | ||
name: Perform check | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
if: github.repository == 'BarudakRosul/title-case' | ||
|
||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
|
||
- name: Install package | ||
run: npm install | ||
|
||
- name: Testing code | ||
run: npm test |
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 @@ | ||
node_modules/ |
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,3 @@ | ||
.github/ | ||
node_modules/ | ||
image/ |
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,3 @@ | ||
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} | ||
@barudakrosul:registry=https://registry.npmjs.org | ||
always-auth=true |
Oops, something went wrong.