Skip to content

Commit

Permalink
Fix linting and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DewaldV committed Feb 8, 2021
1 parent d6084e1 commit 71d7f2e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ However, for organizations, GitHub Apps are [a more appropriate automation solut

```yml
jobs:
job:
runs-on: ubuntu-18.04
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
# Optional (defaults to the current repository).
# repository: owner/repo
- name: Use token
env:
TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
echo "The generated token is masked: ${TOKEN}"
job:
runs-on: ubuntu-18.04
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
org: myorg
- name: Use token
env:
TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
echo "The generated token is masked: ${TOKEN}"
```
4 changes: 2 additions & 2 deletions src/fetch-installation-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { createAppAuth } from "@octokit/auth-app";

export const fetchInstallationToken = async ({
appId,
privateKey,
org,
privateKey,
}: Readonly<{
appId: string;
privateKey: string;
org: string;
privateKey: string;
}>): Promise<string> => {
const app = createAppAuth({ appId, privateKey });
const authApp = await app({ type: "app" });
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const run = async () => {

const installationToken = await fetchInstallationToken({
appId,
privateKey,
org,
privateKey,
});

setSecret(installationToken);
Expand Down

0 comments on commit 71d7f2e

Please sign in to comment.