-
Notifications
You must be signed in to change notification settings - Fork 39
Add maintainer workflow for automated gh-aw upgrades #55
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8b89bd3
Initial plan
Copilot bb7c8ba
Add maintainer workflow for gh-aw upgrades
Copilot bc13223
Fix workflow instructions and documentation
Copilot e7a30f4
Remove maintainer documentation (internal workflow)
Copilot ba594eb
Move setup instructions to front matter steps
Copilot a05b7bd
Add repository_dispatch trigger support
Copilot 74cedae
Simplify gh-aw installation steps
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| --- | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: read-all | ||
|
|
||
| network: defaults | ||
|
|
||
| safe-outputs: | ||
| create-pull-request: | ||
| draft: false | ||
| create-issue: | ||
| title-prefix: "${{ github.workflow }}" | ||
|
|
||
| tools: | ||
| github: | ||
| toolset: [all] | ||
| edit: true | ||
| web-fetch: | ||
| bash: [ ":*" ] | ||
|
|
||
| timeout_minutes: 30 | ||
|
|
||
| --- | ||
|
|
||
| # Agentic Workflow Maintainer | ||
|
|
||
| Your name is "${{ github.workflow }}". Your job is to upgrade the workflows in the GitHub repository `${{ github.repository }}` to the latest version of gh-aw. | ||
|
|
||
| ## Steps to follow: | ||
|
|
||
| 1. **Fetch the latest gh-aw changes**: | ||
| - Use the GitHub tools to fetch the CHANGELOG.md or release notes from the `githubnext/gh-aw` repository | ||
| - Review and understand the interesting changes, breaking changes, and new features in the latest version | ||
| - Pay special attention to any migration guides or upgrade instructions | ||
|
|
||
| 2. **Install the latest gh-aw CLI extension**: | ||
| - Run `gh extension install githubnext/gh-aw || gh extension upgrade githubnext/gh-aw` to install or upgrade to the latest version | ||
| - Verify the installation by running `gh aw version` to check the current version | ||
|
|
||
| 3. **Check the current workflows**: | ||
| - List all workflow markdown files in the `workflows/` directory | ||
| - Understand which workflows need to be compiled | ||
|
|
||
| 4. **Attempt to recompile the workflows**: | ||
| - Clean up any existing `.lock.yml` files: `find workflows -name "*.lock.yml" -type f -delete` | ||
| - Run `gh aw compile --validate` on each workflow file in the `workflows/` directory | ||
| - Note any compilation errors or warnings | ||
|
|
||
| 5. **Fix compilation errors if they occur**: | ||
| - If there are compilation errors, analyze them carefully | ||
| - Review the gh-aw changelog and new documentation you fetched earlier | ||
| - Identify what changes are needed in the workflow files to make them compatible with the new version | ||
| - Make the necessary changes to the workflow markdown files to fix the errors | ||
| - Re-run `gh aw compile --validate` to verify the fixes work | ||
| - Iterate until all workflows compile successfully or you've exhausted reasonable fix attempts | ||
|
|
||
| 6. **Create appropriate outputs**: | ||
| - **If all workflows compile successfully**: Create a pull request with the title "Upgrade workflows to latest gh-aw version" containing: | ||
| - All updated workflow files | ||
| - Any generated `.lock.yml` files | ||
| - A detailed description of what changed, referencing the gh-aw changelog | ||
| - A summary of any manual fixes that were needed | ||
|
|
||
| - **If there are compilation errors you cannot fix**: Create an issue with the title "Failed to upgrade workflows to latest gh-aw version" containing: | ||
| - The specific compilation errors you encountered | ||
| - What you tried to fix them | ||
| - Links to relevant sections of the gh-aw changelog or documentation | ||
| - The version of gh-aw you were trying to upgrade to | ||
|
|
||
| ## Important notes: | ||
| - Always check the gh-aw changelog first to understand breaking changes | ||
| - Test each fix by running `gh aw compile --validate` before moving to the next error | ||
| - Include context and reasoning in your PR or issue descriptions | ||
| - If you create a PR, make sure it includes all necessary changes for the workflows to compile | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot move these instructions as steps in the front matter. No need to update since this is a new container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the setup instructions (checkout repository, install gh CLI, install gh-aw extension) to the front matter
steps:section. The AI agent instructions are now simplified since the environment is pre-configured. Commit ba594eb.