Skip to content

Commit

Permalink
feat: overhaul (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrbrown authored Nov 25, 2024
1 parent 7f0082f commit d6cf115
Show file tree
Hide file tree
Showing 28 changed files with 100,395 additions and 133,500 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* text=auto
* text=auto eol=lf

dist/** -diff linguist-generated=true

Expand Down
34 changes: 26 additions & 8 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: ['github>bfra-me/renovate-config#v3.5.2', 'github>bfra-me/renovate-config:internal.json5#v3.5.2'],
extends: [
'github>bfra-me/renovate-config#v3',
'github>bfra-me/renovate-config:internal.json5#v3',
'github>sanity-io/renovate-config:semantic-commit-type',
'security:openssf-scorecard',
'npm:unpublishSafe',
],
automergeType: 'pr',
packageRules: [
{
matchPackageNames: ['@types/node', 'node', 'nodejs/node'],
Expand All @@ -10,15 +17,26 @@
matchPackageNames: ['npm'],
constraintsFiltering: 'strict',
},
{
matchDepNames: ['python'],
allowedVersions: '<=3.12',
},
{
description: 'Enable SemVer digest pinning of @bfra-me GitHub actions, reusable workflows, and Renovate config presets.',
matchDatasources: ['github-tags'],
matchPackageNames: ['@bfra.me/**', 'bfra-me/**'],
updatePinnedDependencies: false,
},
{
description: 'Enable SemVer digest pinning of @bfra-me GitHub actions, reusable workflows, and Renovate config presets.',
matchDatasources: ['github-tags'],
matchPackageNames: ['@bfra.me/**', 'bfra-me/**'],
matchUpdateTypes: ['major'],
updatePinnedDependencies: true,
},
],
postUpgradeTasks: {
commands: [
'npm install -g [email protected]',
'pnpm install --frozen-lockfile --ignore-scripts',
'git checkout -- .npmrc',
'pnpm run build',
'pnpm run format',
],
commands: ['pnpm bootstrap', 'pnpm fix', 'pnpm build', 'pnpm format'],
executionMode: 'branch',
},
}
4 changes: 2 additions & 2 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ branches:
- name: main
protection:
required_status_checks:
strict: false
contexts: ['Test', 'Release']
strict: true
contexts: ['Test', 'Release', 'Renovate / Renovate']
enforce_admins: true
required_pull_request_reviews: null
restrictions: null
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/app.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
name: GitHub App

'on':
issues:
types:
- opened

permissions:
contents: read

jobs:
issuesOpened:
name: Issues opened
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/ci.yaml → .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
name: CI
name: Main

'on':
push:
branches: [main, 'renovate/**']
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
branches: [main]
types: [opened, ready_for_review, reopened, synchronize]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand Down Expand Up @@ -39,11 +41,10 @@ jobs:
steps:
- id: get-workflow-access-token
name: Get Workflow Access Token
uses: peter-murray/workflow-application-token-action@baa1ef2638c3d9e5967b7c8b86219f8fc919e1bb # v3.0.1
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
permissions: 'contents:write, issues:write, pull_requests:write'
app-id: ${{ secrets.APPLICATION_ID }}
private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
- name: Setup Git user
run: |
git config --global user.email '118100583+bfra-me[bot]@users.noreply.github.com'
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ name: Renovate
branches: ['**']
workflow_dispatch:
inputs:
print_config:
print-config:
description: Log the fully-resolved Renovate config for each repository, plus fully-resolved presets.
required: false
type: boolean
default: false
workflow_run:
workflows: ['Main']
branches: ['main']
types: ['completed']

jobs:
renovate:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
name: Renovate
secrets: inherit
uses: bfra-me/.github/.github/workflows/renovate.yaml@be966e38a1d29304e727870884a145b416efeb3d # v1.8.1
uses: bfra-me/.github/.github/workflows/renovate.yaml@v1
with:
print_config: ${{ inputs.print_config || false }}
print_config: ${{ inputs.print-config || false }}
2 changes: 1 addition & 1 deletion .github/workflows/update-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
update-repo-settings:
name: Update Repo Settings
secrets: inherit
uses: bfra-me/.github/.github/workflows/update-repo-settings.yaml@be966e38a1d29304e727870884a145b416efeb3d # v1.8.1
uses: bfra-me/.github/.github/workflows/update-repo-settings.yaml@v1
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

10 changes: 0 additions & 10 deletions .prettierrc.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node 22.11.0
pnpm 9.14.2
python 3.12.7
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"cSpell.words": ["bfra", "conventionalcommits", "probot"],

"eslint.options": {
"flags": ["unstable_ts_config"]
},

"search.exclude": {
"**/dist": true,
"**/node_modules": true
Expand Down
10 changes: 5 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @param {import('probot').Probot} app
*/
module.exports = (app) => {
app.on('issues.opened', async (context) => {
return context.octokit.issues.createComment(context.issue({body: 'Hello, World!'}));
});
};
export default app => {
app.on('issues.opened', async context => {
return context.octokit.issues.createComment(context.issue({body: 'Hello, World!'}))
})
}
14 changes: 0 additions & 14 deletions dist/195.index.js

This file was deleted.

14 changes: 0 additions & 14 deletions dist/542.index.js

This file was deleted.

14 changes: 0 additions & 14 deletions dist/751.index.js

This file was deleted.

12 changes: 0 additions & 12 deletions dist/file.js

This file was deleted.

12 changes: 0 additions & 12 deletions dist/file1.js

This file was deleted.

Loading

0 comments on commit d6cf115

Please sign in to comment.