Skip to content

Commit

Permalink
Merge pull request #14 from standardrb/clean-out-repo
Browse files Browse the repository at this point in the history
Repo clean-up
  • Loading branch information
searls authored Jun 17, 2024
2 parents 1cb8ade + 3a3431b commit a2edf02
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 241 deletions.
25 changes: 0 additions & 25 deletions .all-contributorsrc

This file was deleted.

36 changes: 0 additions & 36 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

16 changes: 0 additions & 16 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/rubocop.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test.yml

This file was deleted.

22 changes: 7 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# Changelog
# CHANGELOG

## [Unreleased](https://github.com/andrewmcodes/standardrb-action/tree/HEAD)
## 0.0.3 - 0.0.5

[Full Changelog](https://github.com/andrewmcodes/standardrb-action/compare/v0.0.2...HEAD)
* Changes lost to the sands of time, because this file wasn't kept up to date.
* Feel free to review the [commit log](https://github.com/standardrb/standard-ruby-action/commits/main/)

**Merged pull requests:**

- Update incorrect project name in README [\#8](https://github.com/andrewmcodes/standardrb-action/pull/8) ([martinemde](https://github.com/martinemde))
- Add changelog generator [\#6](https://github.com/andrewmcodes/standardrb-action/pull/6) ([andrewmcodes](https://github.com/andrewmcodes))

## [v0.0.2](https://github.com/andrewmcodes/standardrb-action/tree/v0.0.2) (2019-11-07)
## 0.0.2

[Full Changelog](https://github.com/andrewmcodes/standardrb-action/compare/v0.0.1...v0.0.2)

Expand All @@ -20,10 +16,6 @@
- docs: add andrewmcodes as a contributor [\#2](https://github.com/andrewmcodes/standardrb-action/pull/2) ([allcontributors[bot]](https://github.com/apps/allcontributors))
- Update issue templates [\#1](https://github.com/andrewmcodes/standardrb-action/pull/1) ([andrewmcodes](https://github.com/andrewmcodes))

## [v0.0.1](https://github.com/andrewmcodes/standardrb-action/tree/v0.0.1) (2019-11-07)

[Full Changelog](https://github.com/andrewmcodes/standardrb-action/compare/1c89e16f1ed4ca0d42fbc84b93f925f6a8d83da9...v0.0.1)


## 0.0.1

\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
* Initial release
10 changes: 0 additions & 10 deletions CONTRIBUTING.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Andrew Mason
Copyright (c) 2024, Test Double Inc., 2019 Andrew Mason

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
102 changes: 48 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,77 @@

A GitHub Action to run [StandardRB](https://github.com/standardrb/standard) against your code and create annotations in the GitHub UI.

- [:white\_check\_mark: Standard Ruby Action](#white_check_mark-standard-ruby-action)
- [:page\_facing\_up: Introduction](#page_facing_up-introduction)
- [:bulb: Usage](#bulb-usage)
- [:package: Example Workflow](#package-example-workflow)
- [:warning: Gotchas](#warning-gotchas)
- [:camera\_flash: Screenshots](#camera_flash-screenshots)
- [:bookmark: Changelog](#bookmark-changelog)
- [:sos: Contributing](#sos-contributing)
- [:rotating\_light: Code of Conduct](#rotating_light-code-of-conduct)
- [✨ Contributors](#-contributors)
**[Status as of 6/17/2024: it's possible that the workflow may not work for most (or all) users. We're investigating.]**

## :page_facing_up: Introduction
## Usage

GitHub Actions are an amazing new tool that can dramatically improve productivity while using the GitHub platform. While it is not hard to write a custom GitHub action to run StandardRB on your codebase, this action takes that functionality one step further using the checks API. After the StandardRB Linter Action runs StandardRB against your code, it will create annotations that you can easily view, matched up with the offending code.
### Creating a Standard Ruby workflow:

Since GitHub actions and the checks API are continually changing, it is possible that there will be breaking API changes that affect this action. If so, please open an issue and I will look into it as soon as I can.

## :bulb: Usage

Add the following to your GitHub action workflow to use StandardRB Linter Action:
To separate Standard Ruby linting and formatting from your main test suite, you
can add it in a standalone workflow:

```yaml
- name: StandardRB Linter
uses: standardrb/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_BUNDLE_VERSION: true # anything else (or omitting) will run the current version instead of your projects version
```
### :package: Example Workflow
Here is an example workflow file incorporating StandardRB Linter Action:
```yaml
name: StandardRB
name: Standard Ruby
on: [push]
jobs:
build:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- uses: actions/checkout@v4
- name: StandardRB Linter
- name: Standard Ruby
uses: standardrb/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_BUNDLE_VERSION: true
```

## :warning: Gotchas
### Adding to an existing workflow:

Due to the GitHub Check Runs API, we can only return 50 annotations per run. See [here](https://developer.github.com/v3/checks/runs/#output-object) for more info.
You can add the following to your existing GitHub Action workflow:

## :camera_flash: Screenshots
```yaml
- name: Standard Ruby
uses: standardrb/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_BUNDLE_VERSION: true
```

![StandardRB Action Checks Overview](screenshots/check-overview.png)
![StandardRB Action File Annotation](screenshots/file-annotation.png)
This will require you to add these permissions (after specifying the operating system via `runs_on`):

```yaml
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
```

## Options

These can be set under `env:` in the Standard Ruby action step.

If you've installed the `standard` gem to your project with Bundler, then you
probably want to run the same version in this action. Under the action, set:

## :bookmark: Changelog
```yaml
USE_BUNDLE_VERSION: true
```

[View our Changelog](/CHANGELOG.md)
Omitting this value or setting it to anything else will instead execute
`gem install standard` and run the latest version of Standard Ruby.

## :sos: Contributing
## Screenshots

[Contributing Guide](/CONTRIBUTING.md)
![StandardRB Action Checks Overview](screenshots/check-overview.png)
![StandardRB Action File Annotation](screenshots/file-annotation.png)

## :rotating_light: Code of Conduct
## Code of Conduct

This project follows Test Double's [code of
conduct](https://testdouble.com/code-of-conduct) for all community interactions,
Expand All @@ -77,18 +81,8 @@ code reviews, pull requests, and GitHub issues. If violations occur, Test Double
will take any action they deem appropriate for the infraction, up to and
including blocking a user from the organization's repositories.

## ✨ Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
<table>
<tr>
<td align="center"><a href="https://github.com/andrewmcodes/"><img src="https://avatars1.githubusercontent.com/u/18423853?v=4" width="100px;" alt="Andrew Mason"/><br /><sub><b>Andrew Mason</b></sub></a><br /><a href="#infra-andrewmcodes" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/andrewmcodes/standardrb-action/commits?author=andrewmcodes" title="Documentation">📖</a> <a href="https://github.com/andrewmcodes/standardrb-action/commits?author=andrewmcodes" title="Code">💻</a></td>
</tr>
</table>
<!-- ALL-CONTRIBUTORS-LIST:END -->
## Acknowledgements

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
A big thanks to [Andrew Mason](https://github.com/andrewmcodes) for kicking off
this project as
[andrewmcodes/standardrb-acction](https://github.com/andrewmcodes/standardrb-action)!
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: 'StandardRB Action'
description: 'A GitHub Action that lints your Ruby code with StandardRB!'
author: 'Andrew Mason <andrewmcodes@protonmail.com>'
name: 'Standard Ruby'
description: 'A GitHub Action that lints your Ruby code with Standard Ruby'
author: 'Justin Searls <searls@gmail.com>'
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down
29 changes: 0 additions & 29 deletions bin/standardrb

This file was deleted.

Binary file removed screenshots/standardrb-action.png
Binary file not shown.

0 comments on commit a2edf02

Please sign in to comment.