Skip to content

Commit 324bd64

Browse files
committed
chore: Migrate to oxfmt
1 parent 16d992c commit 324bd64

9 files changed

Lines changed: 404 additions & 30 deletions

File tree

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: "CodeQL"
1+
name: 'CodeQL'
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88
schedule:
99
- cron: '43 8 * * 4'
1010

@@ -14,13 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- name: Checkout repository
18-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
- name: Checkout repository
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1919

20-
- name: Initialize CodeQL
21-
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4
22-
with:
23-
languages: javascript
20+
- name: Initialize CodeQL
21+
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4
22+
with:
23+
languages: javascript
2424

25-
- name: Perform CodeQL Analysis
26-
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4
25+
- name: Perform CodeQL Analysis
26+
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4

.oxfmtrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"semi": false,
4+
"trailingComma": "all",
5+
"singleQuote": true,
6+
"printWidth": 120,
7+
"tabWidth": 2,
8+
"ignorePatterns": []
9+
}

.oxlintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"rules": {
1515
"no-console": "off",
1616
"func-style": "off",
17-
"no-eq-null": "off",
17+
"no-eq-null": "off"
1818
},
1919
"overrides": [
2020
{

.prettierrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Right now this only handles the organization membership, it **does not** touch t
1616
### Collect the secrets
1717

1818
1. [Add a custom attribute on the users](https://support.google.com/a/answer/6208725?hl=en#zippy=%2Cadd-a-new-custom-attribute)
19-
2019
1. Go to https://admin.google.com/ac/customschema
2120
1. Enter
2221
- Category: `Accounts`
@@ -28,7 +27,6 @@ Right now this only handles the organization membership, it **does not** touch t
2827
- no. of values: `multi-value`
2928

3029
1. [Add values to custom attributes for the users](https://support.google.com/a/answer/6208725?hl=en#add_value)
31-
3230
1. Go to https://admin.google.com/ac/users
3331
1. Click a user to edit them
3432
1. Click 'user information'
@@ -37,10 +35,8 @@ Right now this only handles the organization membership, it **does not** touch t
3735
1. Click Save
3836

3937
1. [Make a gcp project](https://console.cloud.google.com/projectcreate)
40-
4138
1. Enable the [Admin SDK API](https://console.cloud.google.com/apis/library/admin.googleapis.com?q=workspace%20admin&id=d0a160dd-c410-4fd0-a951-c47e05309cb9)
4239
1. [Create credentials](https://console.cloud.google.com/apis/credentials/wizard?project=githubusermanager)
43-
4440
- Which API are you using?: `Admin SDK API`
4541
- Are you planning to use this API with App Engine or Compute Engine: `no`
4642
- Service account name: `githubusermanager`
@@ -49,9 +45,7 @@ Right now this only handles the organization membership, it **does not** touch t
4945
- Click `Continue`, then confirm `CREATE WITHOUT ROLE`
5046
- Edit the user, Click `Enable G Suite domain-wide delegation`
5147
- Product name for the consent screen: `githubusermanager`
52-
5348
1. [Delegate domain-wide authority to your service account](https://developers.google.com/admin-sdk/directory/v1/guides/delegation)
54-
5549
- https://admin.google.com/ac/owl/domainwidedelegation
5650
- Client ID: `client id from user`
5751
- OAuth scopes:

action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ inputs:
3939
description: 'Comma separated list of user ids to totally ignore always, useful for owners of an org you do not want accidentally removed'
4040
required: false
4141
runs:
42-
using: "composite"
42+
using: 'composite'
4343
steps:
4444
- name: Run
4545
run: |
@@ -69,4 +69,3 @@ runs:
6969
GITHUB_INSTALLATION_ID: ${{ inputs.github-installation-id }}
7070
GITHUB_PRIVATE_KEY: ${{ inputs.github-private-key }}
7171
IGNORED_USERS: ${{ inputs.ignored-users }}
72-

index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ export async function run(): Promise<void> {
2626

2727
if (usersNotInGithub.size > 0) {
2828
console.log(`Users not in github: ${[...usersNotInGithub].join(', ')}`)
29-
if (config.addUsers) {await addUsersToGitHubOrg(usersNotInGithub)}
29+
if (config.addUsers) {
30+
await addUsersToGitHubOrg(usersNotInGithub)
31+
}
3032
}
3133

3234
const exitCode = usersNotInGoogle.size > 0 || usersNotInGithub.size > 0 ? config.exitCodeOnMissmatch : 0
@@ -36,4 +38,6 @@ export async function run(): Promise<void> {
3638
}
3739

3840
// istanbul ignore next
39-
if (import.meta.url.endsWith(process.argv[1])) {run()}
41+
if (import.meta.url.endsWith(process.argv[1])) {
42+
run()
43+
}

0 commit comments

Comments
 (0)