Skip to content

Commit a1bc9db

Browse files
committed
Updates README for style and readability
1 parent 4ecc722 commit a1bc9db

1 file changed

Lines changed: 38 additions & 17 deletions

File tree

README.md

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# OmniAuth GitHub Enterprise Cloud with Data Residency
22

3-
This is an OmniAuth strategy for authenticating with a [GitHub Enterprise Cloud with Data Residency](https://docs.github.com/en/enterprise-cloud@latest/admin/data-residency/about-github-enterprise-cloud-with-data-residency) host.
3+
This is an OmniAuth strategy for authenticating with a [GitHub Enterprise Cloud with Data Residency][1] host.
44

5-
It extends the [Official OmniAuth GitHub strategy](https://github.com/omniauth/omniauth-github/) in the following ways:
6-
- Since this version of GitHub has strict tenant boundaries, therefore the configuration options require a `enterprise_subdomain` option
7-
- While the official strategy has configuration options for either github.com or an [enterprise version](https://github.com/omniauth/omniauth-github/blob/master/README.md#github-enterprise-usage) (including a Data Residency version), this strategy allows for using the two strategies side by side
5+
It extends the [Official OmniAuth GitHub strategy][2] in the following ways:
6+
7+
- Since this version of GitHub has strict tenant boundaries,
8+
therefore the configuration options require a `enterprise_subdomain` option
9+
- While the official strategy has configuration options for either github.com or an
10+
[enterprise version][3] (including a Data Residency version),
11+
this strategy allows for using the two strategies side by side
812

913
To use it, you'll need to sign up for an OAuth2 Application ID and Secret
10-
on the [developer settings view](https://github.com/settings/developers) in GitHub.
14+
on the [developer settings view][4] in GitHub.
1115

1216
## Installation
1317

@@ -19,9 +23,9 @@ gem 'omniauth-github-with-data-residency', '~> 0.0.1'
1923

2024
### Options
2125

22-
You are required to pass an `enterprise_subdomain` inside an `enterprise_options` options hash to build the correct client URLs.
26+
You are required to pass an `enterprise_subdomain` inside an `enterprise_options` options hash to build the correct client URLs.
2327

24-
For example, `enterprise_options: {enterprise_subdomain: "my-domain"}` will then expand to:
28+
For example, `enterprise_options: {enterprise_subdomain: "my-domain"}` will then expand to:
2529

2630
```ruby
2731

@@ -31,12 +35,13 @@ For example, `enterprise_options: {enterprise_subdomain: "my-domain"}` will then
3135

3236
```
3337

34-
The `enterprise_options` are initially set in the setup phase, and you can use hooks to update strategy options before the request and callback phases.
38+
The `enterprise_options` are initially set in the setup phase,
39+
and you can use hooks to update strategy options before the request and callback phases.
3540

3641
Static: you can set `enterprise_options` statically by adding to the options hash.
3742

38-
Dynamic: you can pass a proc (or another callable object) or a rack endpoint into the `setup` option. This is useful if you need to pull the subdomain from a request.
39-
43+
Dynamic: you can pass a proc (or another callable object) or a rack endpoint into the `setup` option.
44+
This is useful if you need to pull the subdomain from a request.
4045

4146
### Basic Rails Usage with Devise
4247

@@ -59,35 +64,39 @@ config.omniauth :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_CLIENT_SECRET'], s
5964
config.omniauth :github_data_residency, ENV['GITHUB_ENTERPRISE_CLIENT_ID'], ENV['GITHUB_ENTERPRISE_CLIENT_SECRET'], scope: "user:email,read:user", setup: SETUP_PROC
6065
```
6166

62-
You can use the [setup phase](https://github.com/omniauth/omniauth/wiki/Setup-Phase) to dynamically configure the `enterprise_subdomain` option for the request and callback phases.
67+
You can use the [setup phase][5] to dynamically configure the `enterprise_subdomain` option for the request and callback phases.
6368

6469
## Development
6570

6671
### Setup
6772

68-
This project uses [mise](http://mise.jdx.dev/) to manage dependencies like the required Ruby version. The provided setup script uses mise by default to install Ruby before installing gems and other dependencies.
73+
This project uses [mise][6] to manage dependencies like the required Ruby version.
74+
The provided setup script uses mise by default to install Ruby before installing gems and other dependencies.
6975

7076
After checking out the repository, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
7177

7278
### Local installation
7379

74-
To install this gem onto your local machine, run `bundle exec rake install`.
80+
To install this gem onto your local machine, run `bundle exec rake install`.
7581

7682
### Release
7783

78-
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`. This command will create a git tag for the version, push git commits and the newly created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
84+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`.
85+
This command will create a git tag for the version, push git commits and the newly created tag, and push the `.gem` file to [rubygems.org][7].
7986

8087
### Documentation
8188

82-
You can check the documentation with [Vale](https://vale.sh/docs). For example, run `vale sync && vale --config=./.vale.ini README.md` to install styles and check the README file.
89+
You can lint markdown with the following command: `bundle exec mdl *.md`. You can override styles in `md_styles.rb`. See [mdl_configuration][11] for more.
90+
91+
You can check the documentation content with [Vale][8]. For example, run `vale sync && vale --config=./.vale.ini README.md` to install styles and check the README file.
8392

8493
You can validate include links with this command: `lychee --no-progress --include-fragments --verbose *.md`
8594

86-
[Vale](https://vale.sh/) and [Lychee](https://lychee.cli.rs/) are optional and not included in the [mise.toml](./mise.toml) configuration file.
95+
[Vale][9] and [Lychee][10] are optional and not included in the [mise.toml](./mise.toml) configuration file.
8796

8897
## Contributing
8998

90-
Bug reports and pull requests are welcome on GitHub at https://github.com/packfiles/omniauth-github-data-residency.
99+
Bug reports and pull requests are welcome on GitHub at <https://github.com/packfiles/omniauth-github-data-residency>.
91100

92101
## License
93102

@@ -96,3 +105,15 @@ The gem is available as open source under the terms of the [MIT License](https:/
96105
---
97106

98107
Made with :heart: by [Packfiles :package:](https://packfiles.io)
108+
109+
[1]: https://docs.github.com/en/enterprise-cloud@latest/admin/data-residency/about-github-enterprise-cloud-with-data-residency
110+
[2]: https://github.com/omniauth/omniauth-github/
111+
[3]: https://github.com/omniauth/omniauth-github/blob/master/README.md#github-enterprise-usage
112+
[4]: https://github.com/settings/developers
113+
[5]: https://github.com/omniauth/omniauth/wiki/Setup-Phase
114+
[6]: http://mise.jdx.dev/
115+
[7]: https://rubygems.org
116+
[8]: https://vale.sh/docs
117+
[9]: https://vale.sh/
118+
[10]: https://lychee.cli.rs/
119+
[11]: https://github.com/markdownlint/markdownlint/blob/main/docs/configuration.md

0 commit comments

Comments
 (0)