-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into unchecked_value_for_check_box
- Loading branch information
Showing
191 changed files
with
66,993 additions
and
23,670 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": ["@changesets/changelog-github", {"repo": "primer/view_components"}], | ||
"commit": false, | ||
"commit": true, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
|
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,36 @@ | ||
# frozen_string_literal: true | ||
|
||
require "erb_lint/reporters/compact_reporter" | ||
|
||
module ERBLint | ||
module Reporters | ||
# :nodoc: | ||
class GithubReporter < CompactReporter | ||
def preview; end | ||
|
||
def show | ||
processed_files.each do |filename, offenses| | ||
offenses.each do |offense| | ||
puts format_offense(filename, offense) | ||
end | ||
end | ||
end | ||
|
||
private | ||
|
||
def format_offense(filename, offense) | ||
[ | ||
"::error ", | ||
[ | ||
"file=#{filename}", | ||
"line=#{offense.line_number}", | ||
"col=#{offense.column}" | ||
].join(","), | ||
"::", | ||
"#{offense.linter.class.simple_name}: ", | ||
offense.message.to_s | ||
].join | ||
end | ||
end | ||
end | ||
end |
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,9 @@ | ||
css: | ||
- app/components/**/*.pcss | ||
|
||
ruby: | ||
- app/components/**/*.rb | ||
- app/components/**/*.erb | ||
|
||
javascript: | ||
- app/components/**/*.ts |
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: Check for changeset | ||
|
||
on: | ||
pull_request: | ||
types: | ||
# On by default if you specify no types. | ||
- "opened" | ||
- "reopened" | ||
- "synchronize" | ||
# For `skip-label` only. | ||
- "labeled" | ||
- "unlabeled" | ||
|
||
jobs: | ||
check-for-changeset: | ||
name: Check for changeset | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: "Check for changeset" | ||
uses: brettcannon/check-for-changed-files@v1 | ||
with: | ||
file-pattern: ".changeset/*.md" | ||
skip-label: "skip changelog" | ||
failure-message: "No changeset found. If these changes should not result in a new version, apply the ${skip-label} label to this pull request. If these changes should result in a version bump, please add a changeset https://git.io/J6QvQ" |
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
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,15 @@ | ||
name: "Pull Request Labeler" | ||
on: | ||
- pull_request_target | ||
|
||
jobs: | ||
triage: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v4 | ||
with: | ||
sync-labels: true | ||
repo-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 |
---|---|---|
|
@@ -10,14 +10,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: xt0rted/markdownlint-problem-matcher@v1 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 16 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: node-modules-main-${{ hashFiles('yarn.lock') }} | ||
key: node-modules-main-${{ hashFiles('package-lock.json') }} | ||
- name: Get specific changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
|
@@ -30,8 +31,8 @@ jobs: | |
- name: Lint with Markdownlint | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: | | ||
yarn | ||
yarn markdownlint ${{ steps.changed-files.outputs.all_changed_files }} | ||
npm i | ||
npx markdownlint ${{ steps.changed-files.outputs.all_changed_files }} | ||
rubocop: | ||
runs-on: ubuntu-latest | ||
|
@@ -60,7 +61,7 @@ jobs: | |
gem install bundler:2.2.9 | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
bundle exec rubocop ${{ steps.changed-files.outputs.all_changed_files }} | ||
bundle exec rubocop ${{ steps.changed-files.outputs.all_changed_files }} --format github | ||
erblint: | ||
runs-on: ubuntu-latest | ||
|
@@ -86,7 +87,7 @@ jobs: | |
gem install bundler:2.2.9 | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
bundle exec erblint ${{ steps.changed-files.outputs.all_changed_files }} | ||
bundle exec erblint ${{ steps.changed-files.outputs.all_changed_files }} --format github | ||
eslint: | ||
runs-on: ubuntu-latest | ||
|
@@ -99,7 +100,7 @@ jobs: | |
- uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: node-modules-main-${{ hashFiles('yarn.lock') }} | ||
key: node-modules-main-${{ hashFiles('package-lock.json') }} | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
|
@@ -109,5 +110,5 @@ jobs: | |
- name: Lint with ESLint | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: | | ||
yarn | ||
yarn eslint --quiet ${{ steps.changed-files.outputs.all_changed_files }} | ||
npm i | ||
npx eslint --quiet ${{ steps.changed-files.outputs.all_changed_files }} |
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,45 @@ | ||
on: | ||
release: | ||
types: [published] | ||
name: Publish primer_view_components and @primer/view-components | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Setup Ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.1.x" | ||
- name: Bundle install | ||
run: | | ||
gem install bundler:2.2.9 | ||
bundle config path vendor/bundle | ||
bundle install | ||
- name: Create .gem credentials | ||
run: | | ||
mkdir -p $HOME/.gem | ||
cat << EOF > $HOME/.gem/credentials | ||
--- | ||
:rubygems_api_key: ${RUBYGEMS_TOKEN} | ||
EOF | ||
chmod 0600 $HOME/.gem/credentials | ||
env: | ||
RUBYGEMS_TOKEN: ${{ secrets.RUBYGEMS_TOKEN_SHARED }} | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
- name: Create .npmrc | ||
run: | | ||
cat << EOF > "$HOME/.npmrc" | ||
//registry.npmjs.org/:_authToken=$NPM_TOKEN | ||
EOF | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }} | ||
- name: NPM install | ||
run: | | ||
npm i | ||
- name: Publish Gem | ||
run: bundle exec rake release | ||
- name: Publish NPM | ||
run: npm publish --access public |
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,5 @@ | ||
{ | ||
"explorer.fileNesting.patterns": { | ||
"*.rb": "${basename}.rb, ${basename}.html.erb, ${basename}.ts, ${basename}.pcss" | ||
} | ||
} |
Oops, something went wrong.