-
Notifications
You must be signed in to change notification settings - Fork 738
新增对moemail的支持 #17
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
Closed
+1,858
−88
Closed
新增对moemail的支持 #17
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
673e4e3
Add MoEmail API email generation and verification support
Copilot ae9219e
Refine MoEmail URL and timestamp parsing
Copilot bb7f8cf
Tighten MoEmail constants and pagination thresholds
Copilot aad2516
Polish MoEmail auto naming and logging labels
Copilot 6fdea5d
Harden MoEmail code parsing and mailbox naming
Copilot 79a6f13
feat: 添加 AI 自动审查工作流及相关脚本,支持 PR 自动处理和合并
QLHazyCoder 59c089f
Update background.js
black-zero358 c145b24
Fix moemail expiry parsing for permanent option
Copilot 3080c45
Fix provider label in auto email logs
Copilot 8e76e1b
fix(moemail): support documented config and message fields
black-zero358 beaafcb
docs(readme): align auto email flow with provider support
black-zero358 95189f5
Merge pull request #1 from black-zero358/copilot/add-moemail-api-support
black-zero358 4f6e179
chore(merge): sync upstream master
black-zero358 54f3fa9
Merge remote-tracking branch 'origin/master'
black-zero358 a7a037b
fix(step7): harden verification code resend flow
black-zero358 ca1ed16
fix(step4): prioritize safe verification submit controls
black-zero358 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,57 @@ | ||
| name: AI 自动审查 PR | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| branches: | ||
| - master | ||
| - dev | ||
| types: | ||
| - opened | ||
| - edited | ||
| - synchronize | ||
| - reopened | ||
| - ready_for_review | ||
|
|
||
| concurrency: | ||
| group: ai-pr-review-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| review-and-merge: | ||
| if: ${{ !github.event.pull_request.draft }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| contents: write | ||
| issues: write | ||
| pull-requests: write | ||
| steps: | ||
| - name: 检出当前基准分支上的工作流文件 | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.base.ref }} | ||
| fetch-depth: 1 | ||
| persist-credentials: false | ||
|
|
||
| - name: 执行 AI 审查并处理 dev 合并 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
| OPENAI_API_BASE_URL: ${{ vars.OPENAI_API_BASE_URL }} | ||
| OPENAI_MODEL: ${{ vars.OPENAI_MODEL }} | ||
| OPENAI_REVIEW_REASONING_EFFORT: ${{ vars.OPENAI_REVIEW_REASONING_EFFORT }} | ||
| AI_REVIEW_MERGE_METHOD: ${{ vars.AI_REVIEW_MERGE_METHOD }} | ||
| AI_REVIEW_SKIP_AUTHORS: ${{ vars.AI_REVIEW_SKIP_AUTHORS }} | ||
| AI_REVIEW_TRUSTED_ASSOCIATIONS: ${{ vars.AI_REVIEW_TRUSTED_ASSOCIATIONS }} | ||
| AI_REVIEW_MAX_FILES: ${{ vars.AI_REVIEW_MAX_FILES }} | ||
| AI_REVIEW_MAX_PATCH_CHARS_PER_FILE: ${{ vars.AI_REVIEW_MAX_PATCH_CHARS_PER_FILE }} | ||
| AI_REVIEW_MAX_PATCH_CHARS_TOTAL: ${{ vars.AI_REVIEW_MAX_PATCH_CHARS_TOTAL }} | ||
| AI_REVIEW_TARGET_BRANCH: dev | ||
| REPO: ${{ github.repository }} | ||
| REPO_OWNER: ${{ github.repository_owner }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| PR_AUTHOR: ${{ github.event.pull_request.user.login }} | ||
| PR_AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }} | ||
| PR_BASE_REF: ${{ github.event.pull_request.base.ref }} | ||
| GITHUB_API_URL: ${{ github.api_url }} | ||
| run: node .github/scripts/ai-pr-review.mjs | ||
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
Oops, something went wrong.
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.
该工作流使用 pull_request_target 且授予 contents/issues/pull-requests 写权限,并会带着仓库 Secrets 运行自动审查+自动合并逻辑;目前没有显式限制仅对同仓库分支 PR 运行(例如 fork PR)。建议在 job 级别增加对 head repo 的校验(如 github.event.pull_request.head.repo.full_name == github.repository 或 !github.event.pull_request.head.repo.fork),并视需要收紧默认权限,避免外部贡献者触发高权限流程/产生费用或意外合并。