-
-
Notifications
You must be signed in to change notification settings - Fork 358
feat: add GitHub Action to auto-update project_structure.txt #496
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
Changes from 3 commits
a4f0f29
153a4dc
5785984
461766e
b025fc3
499af73
28e4893
37a48bb
b67d193
ca2a9be
cd03350
bbf022a
d3d17bd
cba2b74
424a1f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Greet Contributors | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened] | ||
| pull_request: | ||
| types: [opened] | ||
|
|
||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| greet: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Print GitHub context | ||
| run: echo "${{ toJson(github) }}" | ||
|
|
||
| - name: Send greeting message for issues | ||
| if: github.event_name == 'issues' | ||
| uses: actions-ecosystem/action-create-comment@v1.4.0 | ||
| continue-on-error: true | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| repo: ${{ github.repository }} | ||
| number: ${{ github.event.issue.number }} | ||
| body: | | ||
| Hi @${{ github.event.issue.user.login }}! | ||
| Thanks for opening this issue, would you like to work on this? | ||
|
|
||
| - name: Send greeting message for PRs | ||
| if: github.event_name == 'pull_request' | ||
| uses: actions-ecosystem/action-create-comment@v1.4.0 | ||
| continue-on-error: true | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| repo: ${{ github.repository }} | ||
| number: ${{ github.event.pull_request.number }} | ||
| body: | | ||
| Hi @${{ github.event.pull_request.user.login }}! 🎉 | ||
| Thanks for opening this pull request. We appreciate your contribution. | ||
|
|
||
| - name: Log completion | ||
| run: | | ||
| echo "Greeting workflow completed successfully" | ||
| echo "Event type: ${{ github.event_name }}" |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,25 @@ | ||||||||||||||||||||
| name: Auto Update Project Structure | ||||||||||||||||||||
|
|
||||||||||||||||||||
| on: | ||||||||||||||||||||
| push: | ||||||||||||||||||||
| branches: | ||||||||||||||||||||
| - main | ||||||||||||||||||||
|
|
||||||||||||||||||||
| jobs: | ||||||||||||||||||||
| update-project-structure: | ||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||
| steps: | ||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||
| uses: actions/checkout@v3 | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Generate project_structure.txt | ||||||||||||||||||||
| run: | | ||||||||||||||||||||
| tree -a -I 'node_modules|.git|build|.dart_tool|*.lock|*.pyc' > project_structure.txt | ||||||||||||||||||||
|
||||||||||||||||||||
| - name: Generate project_structure.txt | |
| run: | | |
| tree -a -I 'node_modules|.git|build|.dart_tool|*.lock|*.pyc' > project_structure.txt | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y tree | |
| - name: Generate project_structure.txt | |
| run: | | |
| tree -a -I 'node_modules|.git|build|.dart_tool|*.lock|*.pyc' > project_structure.txt |
🤖 Prompt for AI Agents
In .github/workflows/update-project-structure.yml at lines 15 to 17, the
workflow uses the `tree` command which is not pre-installed on the
`ubuntu-latest` runner, causing the step to fail. Fix this by adding a step
before this to install `tree` using `sudo apt-get update && sudo apt-get install
-y tree`, or replace the `tree` command with a pure Git alternative like `git
ls-files` to generate the project structure without external dependencies.
Uh oh!
There was an error while loading. Please reload this page.