Skip to content

fix: bump to create-typescript-app@2 with transitions action #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 26 additions & 33 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
{
"badgeTemplate": "\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"👪 All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg\" /></a>",
"commit": false,
"commitConvention": "angular",
"commitType": "docs",
"contributors": [
{
"login": "JoshuaKGoldberg",
"name": "Josh Goldberg ✨",
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
"profile": "http://www.joshuakgoldberg.com/",
"contributions": [
"code",
"content",
"doc",
"ideas",
"infra",
"maintenance",
"projectManagement",
"tool",
"bug"
]
}
],
"contributorsPerLine": 7,
"contributorsSortAlphabetically": true,
"files": [
"README.md"
],
"imageSize": 100,
"projectName": "get-github-auth-token",
"projectOwner": "JoshuaKGoldberg",
"repoHost": "https://github.com",
"repoType": "github"
"badgeTemplate": "\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"👪 All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg\" /></a>",
"contributors": [
{
"login": "JoshuaKGoldberg",
"name": "Josh Goldberg ✨",
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
"profile": "http://www.joshuakgoldberg.com/",
"contributions": [
"code",
"content",
"doc",
"ideas",
"infra",
"maintenance",
"projectManagement",
"tool",
"bug"
]
}
],
"contributorsSortAlphabetically": true,
"projectName": "get-github-auth-token",
"projectOwner": "JoshuaKGoldberg",
"repoType": "github",
"commitConvention": "angular"
}

6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Thanks for your interest in contributing to `get-github-auth-token`! 💖
Thanks for your interest in contributing to `get-github-auth-token`! 🪙

> After this page, see [DEVELOPMENT.md](./DEVELOPMENT.md) for local development instructions.

Expand Down Expand Up @@ -93,5 +93,5 @@ Please do ping the maintainer who merged your PR if that doesn't happen within 2
## Emojis & Appreciation

If you made it all the way to the end, bravo dear user, we love you.
Please include your favorite emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.
💖 is a good starter if you're not sure which to use.
Please include an emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.
🪙 is a good starter if you're not sure which to use.
6 changes: 3 additions & 3 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation):

```shell
git clone https://github.com/<your-name-here>/get-github-auth-token
git clone https://github.com/(your-name-here)/get-github-auth-token
cd get-github-auth-token
pnpm install
```
Expand Down Expand Up @@ -43,7 +43,7 @@ Each should be shown in VS Code, and can be run manually on the command-line:

- `pnpm lint` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files
- `pnpm lint:knip` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports
- `pnpm lint:md` ([Markdownlint](https://github.com/DavidAnson/markdownlint): Checks Markdown source files
- `pnpm lint:md` ([Markdownlint](https://github.com/DavidAnson/markdownlint)): Checks Markdown source files
- `pnpm lint:packages` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the `pnpm-lock.yml` file
- `pnpm lint:spelling` ([cspell](https://cspell.org)): Spell checks across all source files

Expand All @@ -55,7 +55,7 @@ For example, ESLint can be run with `--fix` to auto-fix some lint rule complaint
pnpm run lint --fix
```

Note that you'll likely need to run `pnpm build` before `pnpm lint` so that lint rules which check the file system can pick up on any built files.
Note that you'll need to run `pnpm build` before `pnpm lint` so that lint rules which check the file system can pick up on any built files.

## Testing

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/02-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
label: Documentation Report Checklist
options:
- label: I have pulled the latest `main` branch of the repository.
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/03-feature.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
label: Feature Request Checklist
options:
- label: I have pulled the latest `main` branch of the repository.
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/04-tooling.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
label: Tooling Report Checklist
options:
- label: I have tried restarting my IDE and the issue persists.
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- 👋 Hi, thanks for sending a PR to get-github-auth-token! 💖.
<!-- 👋 Hi, thanks for sending a PR to get-github-auth-token! 🪙
Please fill out all fields below and make sure each item is true and [x] checked.
Otherwise we may not be able to review your PR. -->

Expand Down
4 changes: 1 addition & 3 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ name: Prepare

runs:
steps:
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
cache: pnpm
Expand Down
36 changes: 36 additions & 0 deletions .github/actions/transition/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
description: Runs create-typescript-app in transition mode

name: Transition

runs:
steps:
- uses: ./.github/actions/prepare
- run: npx create-typescript-app
shell: bash
- id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: The Friendly Bingo Bot <[email protected]>
commit_message: Check in changes from re-running npx create-typescript-app
commit_user_email: [email protected]
commit_user_name: The Friendly Bingo Bot
- if: steps.auto-commit-action.outputs.changes_detected == 'true'
uses: mshick/add-pr-comment@v2
with:
issue: ${{ github.event.pull_request.number }}
message: >-
🤖 Beep boop! I ran `npx create-typescript-app` and it updated some
files.

I went ahead and checked those changes into this PR for you. Please
review the latest commit to see if you want to merge it.

Cheers!
— _The Friendly Bingo Bot_ 💝

> ℹ️ These automatic commits keep your repository up-to-date with new
versions of
[create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).
If you want to opt out, delete your
`.github/workflows/cta-transitions.yml` file.
using: composite
10 changes: 7 additions & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"automerge": true,
"extends": ["config:best-practices", "replacements:all"],
"extends": [
":preserveSemverRanges",
"config:best-practices",
"replacements:all"
],
"ignoreDeps": ["codecov/codecov-action"],
"internalChecksFilter": "strict",
"labels": ["dependencies"],
"minimumReleaseAge": "3 days",
"minimumReleaseAge": "7 days",
"patch": { "enabled": false },
"postUpdateOptions": ["pnpmDedupe"]
}
16 changes: 0 additions & 16 deletions .github/workflows/build.yml

This file was deleted.

77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm build
- run: node lib/index.js
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm lint
lint_knip:
name: Lint Knip
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm lint:knip
lint_markdown:
name: Lint Markdown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm lint:md
lint_packages:
name: Lint Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm lint:packages
lint_spelling:
name: Lint Spelling
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm lint:spelling
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm format --list-different
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm run test --coverage
- env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: always()
uses: codecov/codecov-action@v3
type_check:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm tsc

name: CI

on:
pull_request: ~
push:
branches:
- main
26 changes: 26 additions & 0 deletions .github/workflows/cta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
jobs:
transition:
name: Transition
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
token: ${{ secrets.ACCESS_TOKEN }}
- id: check
if: (github.actor == 'JoshuaKGoldberg' || github.actor == 'renovate[bot]') && startsWith(github.head_ref, 'renovate/') && contains(github.event.pull_request.title, 'create-typescript-app')
uses: ./.github/actions/transition
- if: steps.check.outcome == 'skipped'
run: echo 'Skipping transition mode because the PR does not appear to be an automated or owner-created update to create-typescript-app.'

name: CTA

on:
pull_request:
branches:
- main

permissions:
pull-requests: write
15 changes: 0 additions & 15 deletions .github/workflows/lint-knip.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/lint-markdown.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/lint-packages.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/lint-spelling.yml

This file was deleted.

Loading