feat(workflow): receive invitation for a trial task#1149
feat(workflow): receive invitation for a trial task#1149georgeciubotaru merged 11 commits intoholdex:mainfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds a new GitHub Actions workflow "Application Flow" that comments on newly opened application issues with PR submission instructions and, when a profile PR is merged, parses referenced issue numbers, reopens those issues, and posts follow-up comments. Adds two message templates used by the workflow. Changes
Sequence Diagram(s)sequenceDiagram
rect rgba(0,128,255,0.5)
participant Issue as Issue Created
participant Actions as GitHub Actions (ask-for-pr)
participant API as GitHub REST API
end
Issue->>Actions: issue.opened event
Actions->>API: POST comment with PR submission instructions
Actions->>API: POST add label "job-application"
API-->>Actions: success / error (logged)
Actions-->>Issue: comment posted
sequenceDiagram
rect rgba(0,128,0,0.5)
participant PR as PR Merged
participant Actions as GitHub Actions (reopen-issue)
participant Parser as Regex Parser
participant API as GitHub REST API
end
PR->>Actions: pull_request.closed (merged)
Actions->>Parser: extract issue numbers from PR body (resolves/closes, `#n` or URL)
Parser-->>Actions: deduplicated issue list
loop per issue
Actions->>API: PATCH reopen issue
API-->>Actions: success / error (logged)
Actions->>API: POST follow-up comment
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan for PR comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1b205a6 to
9334440
Compare
c4d6332 to
c6ac295
Compare
a561d05 to
17cc661
Compare
17cc661 to
0d62012
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/application-flow.yml:
- Around line 50-63: The current regex accepts external GitHub issue URLs but
github.rest.issues.update always targets context.repo, so change the
parsing/filtering to only collect issue numbers that refer to this repository:
update the regex/matching logic (symbols: regex, matches) to capture optional
owner and repo parts and then filter matches before building issueNumbers so you
only include entries where either the match is a bare number/#123 or the
captured owner === context.repo.owner and repo === context.repo.repo; then
proceed to call github.rest.issues.update (symbol: github.rest.issues.update,
issue_number loop) only for those filtered issue numbers.
- Around line 44-67: The workflow reopens linked issues (issueNumbers loop using
github.rest.issues.update) but never posts the required “proceed with trial
task” comment; after a successful reopen inside the try block (immediately after
calling github.rest.issues.update), call github.rest.issues.createComment for
that issue_number to post the trial-task prompt (e.g., a clear message asking
the contributor if they want to proceed with the trial task), and handle any
comment errors in the catch or a nested try/catch so failures to comment are
logged but do not break the loop.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 60791f80-72df-4dfe-9043-25ae0691d798
📒 Files selected for processing (1)
.github/workflows/application-flow.yml
Time Submission Status
You can submit time with the command. Example: See available commands to help comply with our Guidelines. |
|
I will refine solution based on code rabbit suggestions. fix this night in WIB time. |
zolotokrylin
left a comment
There was a problem hiding this comment.
Rejecting because of the PR title. Please refer to our PR Naming guidelines.
|
@holdex pr submit-time 20m |
|
@zolotokrylin ready to review |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/application-follow-up-body.md:
- Line 1: The sentence "adds a JSON file with your profile under
profile-submission.json" is ambiguous; replace it with a clear instruction that
specifies both the expected filename and the exact location (path) to create it.
Locate the string "adds a JSON file with your profile under
profile-submission.json" and change it to an explicit directive such as "add a
JSON file named profile-submission.json inside a directory named
profile-submission at the repository root" or, if you expect a single file,
"create a file named profile-submission.json at the repository root" so
contributors know whether to create a file or a directory and where to place it.
- Line 1: The template substitution leaves `${issue.number}` un-replaced; update
the substitution chain where the template string is processed in
application-flow.yml (the code that currently replaces `${candidate}`) to also
replace `${issue.number}` using the runtime issue number
(context.payload.issue.number), e.g. chain another .replace call converting the
number to a string so the PR body shows the actual issue number rather than the
literal `${issue.number}`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7aa8bcde-58b0-4751-8306-08253ace2ced
📒 Files selected for processing (3)
.github/workflows/application-flow.yml.github/workflows/application-follow-up-body.md.github/workflows/application-merged-body.md
✅ Files skipped from review due to trivial changes (1)
- .github/workflows/application-merged-body.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/application-flow.yml
|
Sorry still fix issue number |
|
Ready to review @zolotokrylin now |
|
How can I test it, @Ananta98 ? |
|
You can try to simulate it by creating an issue and a pr on my forked repo https://github.com/Ananta98/trial. I've added description how to test it |
|
Hi @zolotokrylin, how about the test for this PR? |
|
@georgeciubotaru, please review this PR. Thanks! |
|
Hi @georgeciubotaru how about the review for this PR? Thank you |
|
@georgeciubotaru I've checked using |
|
@holdex pr submit-time 5m |







resolves: #1148
How to replicate:
a) Create a new issue in my forked repository:
https://github.com/Ananta98/trial
b) Create a new branch in the forked repository and make some changes.
c) Then create a PR to the forked repository with the description:
"resolves: (issue number)".
d) Merge the PR into main and check the GitHub bot action in the issue.
Summary by CodeRabbit
Chores
Documentation