-
Notifications
You must be signed in to change notification settings - Fork 149
Update procedure to configure git #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -89,7 +89,7 @@ jobs: | |||||||||||
| - run: echo "committer string is ${{ steps.committer.outputs.string }}" | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| ### Configure git CLI for an app's bot user | ||||||||||||
| ### Configure gh/git CLI for an app's bot user | ||||||||||||
|
|
||||||||||||
| ```yaml | ||||||||||||
| on: [pull_request] | ||||||||||||
|
|
@@ -104,6 +104,7 @@ jobs: | |||||||||||
| # required | ||||||||||||
| app-id: ${{ vars.APP_ID }} | ||||||||||||
| private-key: ${{ secrets.PRIVATE_KEY }} | ||||||||||||
| permission-contents: write | ||||||||||||
| - name: Get GitHub App User ID | ||||||||||||
| id: get-user-id | ||||||||||||
| run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" | ||||||||||||
|
|
@@ -112,7 +113,9 @@ jobs: | |||||||||||
| - run: | | ||||||||||||
| git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' | ||||||||||||
| git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com' | ||||||||||||
| # git commands like commit work using the bot user | ||||||||||||
| echo "${{ steps.app-token.outputs.token }}" | gh auth login --with-token | ||||||||||||
| gh auth setup-git | ||||||||||||
|
Comment on lines
+116
to
+117
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I don't think the login step is necessary. How about this? I think
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is necessary to setup both
|
||||||||||||
| # git commands like commit and push work using the bot user | ||||||||||||
| - run: | | ||||||||||||
| git add . | ||||||||||||
| git commit -m "Auto-generated changes" | ||||||||||||
|
|
||||||||||||
Uh oh!
There was an error while loading. Please reload this page.