Skip to content

Commit

Permalink
Update resyntax-autofixer.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfirth authored Sep 18, 2024
1 parent f5266e3 commit 61f8347
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/resyntax-autofixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
with:
app-id: ${{ vars.RESYNTAX_APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.generate-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Checkout code
uses: actions/checkout@v3.6.0
# See https://github.com/actions/checkout/issues/118.
Expand Down Expand Up @@ -53,8 +58,8 @@ jobs:
const commitMessageTitle = "Automated Resyntax fixes";
const commitMessage = commitMessageTitle + "\n\n" + commitMessageBody;
await writeFile('/tmp/resyntax-commit-message.txt', commitMessage);
await exec.exec('git config user.name "Resyntax CI"');
await exec.exec('git config user.email "${{ vars.RESYNTAX_APP_ACCOUNT_ID }}+resyntax-ci[bot]@users.noreply.github.com"');
await exec.exec('git config user.name "${{ steps.generate-token.outputs.app-slug }}[bot]"');
await exec.exec('git config user.email "${{ steps.get-user-id.outputs.user-id }}+${{ steps.generate-token.outputs.app-slug }}[bot]@users.noreply.github.com"');
await exec.exec('git commit --all --file=/tmp/resyntax-commit-message.txt');
await exec.exec('git push --set-upstream origin autofix-${{ github.run_number }}-${{ github.run_attempt }}');
await github.rest.pulls.create({
Expand Down

0 comments on commit 61f8347

Please sign in to comment.