Skip to content

Commit 99d109b

Browse files
committed
add github workflows
1 parent e6ce38e commit 99d109b

File tree

8 files changed

+346
-9
lines changed

8 files changed

+346
-9
lines changed

.github/workflows/describe-pr.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Basic PR Description Generation
2+
# Automatically generates AI-powered descriptions for new pull requests
3+
4+
name: Auto-describe PRs
5+
on:
6+
pull_request:
7+
types: [opened]
8+
9+
jobs:
10+
describe:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
steps:
16+
- name: Generate PR Description
17+
uses: augmentcode/describe-pr@v0
18+
with:
19+
augment_session_auth: ${{ secrets.AUGMENT_SESSION_AUTH }}
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
21+
pull_number: ${{ github.event.pull_request.number }}
22+
repo_name: ${{ github.repository }}
23+

.github/workflows/format-check.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Format Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize]
9+
branches:
10+
- main
11+
12+
jobs:
13+
format-check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
19+
- name: Setup Bun
20+
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
21+
with:
22+
bun-version: latest
23+
24+
- name: Install dependencies
25+
run: bun install --frozen-lockfile
26+
27+
- name: Check formatting
28+
run: bun run format:check
29+
30+
- name: Check if files would change
31+
run: |
32+
if ! git diff --exit-code; then
33+
echo "❌ Files are not properly formatted. Run 'bun run format' to fix."
34+
exit 1
35+
else
36+
echo "✅ All files are properly formatted."
37+
fi
38+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# On-Demand PR Description
2+
# Generates descriptions when the "augment_describe" label is added to a PR
3+
4+
name: On-Demand PR Description
5+
on:
6+
pull_request:
7+
types: [labeled]
8+
9+
jobs:
10+
describe:
11+
# Only run when the specific label is added
12+
if: github.event.label.name == 'augment_describe'
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
steps:
18+
- name: Generate PR Description
19+
uses: augmentcode/describe-pr@v0
20+
with:
21+
augment_session_auth: ${{ secrets.AUGMENT_SESSION_AUTH }}
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
pull_number: ${{ github.event.pull_request.number }}
24+
repo_name: ${{ github.repository }}
25+
26+
- name: Remove trigger label
27+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
28+
with:
29+
script: |
30+
// Remove the trigger label after processing
31+
await github.rest.issues.removeLabel({
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
issue_number: context.issue.number,
35+
name: 'augment_describe'
36+
});
37+
38+
- name: Add completion label
39+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
40+
with:
41+
script: |
42+
// Add a label to indicate the description was generated
43+
await github.rest.issues.addLabels({
44+
owner: context.repo.owner,
45+
repo: context.repo.repo,
46+
issue_number: context.issue.number,
47+
labels: ['auto-described']
48+
});
49+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# On-Demand PR Review
2+
# Generates reviews when the "augment_review" label is added to a PR
3+
4+
name: On-Demand PR Review
5+
on:
6+
pull_request:
7+
types: [labeled]
8+
9+
jobs:
10+
review:
11+
# Only run when the specific label is added
12+
if: github.event.label.name == 'augment_review'
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
steps:
18+
- name: Generate PR Review
19+
uses: augmentcode/review-pr@v0
20+
with:
21+
augment_session_auth: ${{ secrets.AUGMENT_SESSION_AUTH }}
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
pull_number: ${{ github.event.pull_request.number }}
24+
repo_name: ${{ github.repository }}
25+
26+
- name: Remove trigger label
27+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
28+
with:
29+
script: |
30+
// Remove the trigger label after processing
31+
await github.rest.issues.removeLabel({
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
issue_number: context.issue.number,
35+
name: 'augment_review'
36+
});
37+
38+
- name: Add completion label
39+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
40+
with:
41+
script: |
42+
// Add a label to indicate the review was generated
43+
await github.rest.issues.addLabels({
44+
owner: context.repo.owner,
45+
repo: context.repo.repo,
46+
issue_number: context.issue.number,
47+
labels: ['auto-reviewed']
48+
});
49+

.github/workflows/pr-review.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Basic PR Review Generation
2+
# Automatically generates AI-powered reviews for new pull requests
3+
4+
name: Auto-review PRs
5+
on:
6+
pull_request:
7+
types: [opened]
8+
9+
jobs:
10+
review:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
steps:
16+
- name: Generate PR Review
17+
uses: augmentcode/review-pr@v0
18+
with:
19+
augment_session_auth: ${{ secrets.AUGMENT_SESSION_AUTH }}
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
21+
pull_number: ${{ github.event.pull_request.number }}
22+
repo_name: ${{ github.repository }}
23+

.github/workflows/release.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
with:
20+
fetch-depth: 0
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Setup Bun
24+
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
25+
with:
26+
bun-version: latest
27+
28+
- name: Install dependencies
29+
run: bun install
30+
31+
- name: Type check
32+
run: bun run typecheck
33+
34+
- name: Extract version from tag
35+
id: version
36+
run: |
37+
TAG_NAME=${GITHUB_REF#refs/tags/}
38+
VERSION=${TAG_NAME#v}
39+
MAJOR_VERSION=$(echo $VERSION | cut -d. -f1)
40+
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
41+
echo "version=$VERSION" >> $GITHUB_OUTPUT
42+
echo "major_version=v$MAJOR_VERSION" >> $GITHUB_OUTPUT
43+
44+
- name: Verify package.json version matches tag
45+
run: |
46+
PACKAGE_VERSION=$(jq -r '.version' package.json)
47+
if [ "$PACKAGE_VERSION" != "${{ steps.version.outputs.version }}" ]; then
48+
echo "❌ Version mismatch: package.json has $PACKAGE_VERSION but tag is ${{ steps.version.outputs.version }}"
49+
exit 1
50+
fi
51+
echo "✅ Version verified: $PACKAGE_VERSION"
52+
53+
- name: Update major version tag
54+
run: |
55+
git config --global user.name "github-actions[bot]"
56+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
57+
git tag -f "${{ steps.version.outputs.major_version }}" -m "Release ${{ steps.version.outputs.major_version }} (latest)"
58+
git push origin "${{ steps.version.outputs.major_version }}" --force
59+
60+
- name: Create GitHub Release
61+
run: |
62+
# Create release body content
63+
RELEASE_BODY=$(cat << 'EOF'
64+
## Release ${{ steps.version.outputs.tag_name }}
65+
66+
### Quick Usage
67+
```yaml
68+
- uses: augmentcode/augment-agent@${{ steps.version.outputs.tag_name }}
69+
with:
70+
augment_api_token: ${{ secrets.AUGMENT_API_TOKEN }}
71+
augment_api_url: ${{ vars.AUGMENT_API_URL }}
72+
github_token: ${{ secrets.GITHUB_TOKEN }}
73+
instruction_file: /tmp/instruction.txt
74+
```
75+
76+
### Major Version Tag
77+
You can also use the major version tag for automatic updates:
78+
```yaml
79+
- uses: augmentcode/augment-agent@${{ steps.version.outputs.major_version }}
80+
```
81+
82+
### Documentation
83+
- 📖 [Full Documentation](https://github.com/augmentcode/augment-agent#readme)
84+
- 🚀 [Quick Start Guide](https://github.com/augmentcode/augment-agent#quick-start)
85+
- ⚙️ [Configuration Options](https://github.com/augmentcode/augment-agent#inputs)
86+
- 💡 [Example Workflows](https://github.com/augmentcode/augment-agent#example-workflows)
87+
EOF
88+
)
89+
90+
# Create the release using GitHub REST API
91+
echo "📡 Creating GitHub release..."
92+
RESPONSE=$(curl -s -w "%{http_code}" -L \
93+
-X POST \
94+
-H "Accept: application/vnd.github+json" \
95+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
96+
-H "X-GitHub-Api-Version: 2022-11-28" \
97+
https://api.github.com/repos/${{ github.repository }}/releases \
98+
-d "$(jq -n \
99+
--arg tag_name "${{ steps.version.outputs.tag_name }}" \
100+
--arg name "Release ${{ steps.version.outputs.tag_name }}" \
101+
--arg body "${RELEASE_BODY}" \
102+
'{
103+
"tag_name": $tag_name,
104+
"target_commitish": "main",
105+
"name": $name,
106+
"body": $body,
107+
"draft": false,
108+
"prerelease": false
109+
}')")
110+
111+
# Extract HTTP status code (last 3 characters)
112+
HTTP_CODE="${RESPONSE: -3}"
113+
RESPONSE_BODY="${RESPONSE%???}"
114+
115+
# Check if the request was successful
116+
if [ "$HTTP_CODE" -eq 201 ]; then
117+
echo "✅ Successfully created release ${{ steps.version.outputs.tag_name }}"
118+
119+
# Extract and display the release URL if available
120+
RELEASE_URL=$(echo "$RESPONSE_BODY" | jq -r '.html_url // empty')
121+
if [ -n "$RELEASE_URL" ]; then
122+
echo "🔗 Release URL: $RELEASE_URL"
123+
fi
124+
125+
echo "🎉 Release process completed successfully!"
126+
else
127+
echo "❌ Failed to create release. HTTP status: $HTTP_CODE"
128+
echo "Response: $RESPONSE_BODY"
129+
exit 1
130+
fi
131+

.github/workflows/test-action.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Test Augment Agent Action
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
7+
jobs:
8+
test-action:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
14+
- name: Test Augment Agent
15+
uses: ./
16+
with:
17+
augment_session_auth: ${{ secrets.AUGMENT_SESSION_AUTH }}
18+
instruction: "Say hello"
19+

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Auggie is Augment’s agentic coding CLI that runs in your terminal. It understa
66

77
Learn more in the Augment Docs:
88

9-
- Overview: https://docs.augmentcode.com/cli/overview
10-
- Custom Commands Examples: https://docs.augmentcode.com/cli/custom-commands-examples
9+
- Overview: [Introducing Auggie CLI](https://docs.augmentcode.com/cli/overview)
10+
- Custom Commands Examples: [Custom Slash Commands Examples](https://docs.augmentcode.com/cli/custom-commands-examples)
1111

1212
## Quick start
1313

@@ -56,21 +56,26 @@ See example command templates in `.augment/commands/` and the docs page linked a
5656

5757
Use our official GitHub Actions to improve PR quality automatically:
5858

59-
- Review PR: https://github.com/augmentcode/review-pr
60-
- Describe PR: https://github.com/augmentcode/describe-pr
59+
- Review PR: [augmentcode/review-pr](https://github.com/augmentcode/review-pr)
60+
- Describe PR: [augmentcode/describe-pr](https://github.com/augmentcode/describe-pr)
6161

6262
Examples:
6363

64-
- Review PR workflow example: https://github.com/augmentcode/review-pr#example-usage
65-
- Describe PR workflow example: https://github.com/augmentcode/describe-pr#example-usage
64+
- Review PR workflow example: [example usage](https://github.com/augmentcode/review-pr#example-usage)
65+
- Describe PR workflow example: [example usage](https://github.com/augmentcode/describe-pr#example-usage)
6666

6767
Add the workflows under `.github/workflows/` in your repository.
6868

69+
## Feedback and bug reports
70+
71+
- In Auggie or the IDE agent, use `/feedback` to send feedback or report bugs directly with helpful context.
72+
- Alternatively, open a GitHub issue using our templates (Bug report / Feature request) from the Issues tab.
73+
6974
## Community
7075

71-
- Support: https://support.augmentcode.com/
72-
- Discord: https://augmentcode.com/discord
76+
- Support: [Support Portal](https://support.augmentcode.com/)
77+
- Discord: [Join our Discord](https://discord.com/invite/zvU8DAwxvt)
7378

7479
## Privacy and data usage
7580

76-
See Augment’s policies at https://augmentcode.com/legal and product docs for latest details.
81+
See Augment’s policies at [augmentcode.com/legal](https://augmentcode.com/legal) and product docs for latest details.

0 commit comments

Comments
 (0)