Skip to content

feat(workflow): receive invitation for a trial task#1149

Merged
georgeciubotaru merged 11 commits intoholdex:mainfrom
Ananta98:feature/github-action
Mar 12, 2026
Merged

feat(workflow): receive invitation for a trial task#1149
georgeciubotaru merged 11 commits intoholdex:mainfrom
Ananta98:feature/github-action

Conversation

@Ananta98
Copy link
Contributor

@Ananta98 Ananta98 commented Mar 3, 2026

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

    • Added an automated workflow that comments on new issues with submission instructions and reopens linked issues and posts follow-ups when related PRs are merged.
  • Documentation

    • Added two user-facing message templates: one guiding applicants on how to submit their profile and one confirming merged profile PRs with next steps.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds 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

Cohort / File(s) Summary
Workflow
​.github/workflows/application-flow.yml
New workflow "Application Flow" with two jobs: ask-for-pr (on issue opened) posts a comment (loads template, substitutes placeholders) and attempts to add job-application label; reopen-issue (on PR merged) extracts referenced issue numbers (supports resolves/closes, #n and full URLs), deduplicates, reopens each issue, and posts a follow-up comment.
Message templates
​.github/workflows/application-follow-up-body.md, ​.github/workflows/application-merged-body.md
New markdown templates for the comment bodies: instructions for profile JSON submission and merged-PR follow-up directing to the trial task.

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
Loading
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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • zolotokrylin
  • markholdex
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: a GitHub Actions workflow that sends trial task invitations after profile PR merge, directly addressing the linked issue #1148.
Linked Issues check ✅ Passed The implementation fully addresses all three objectives from #1148: prompts candidates for profile submission, reopens issues post-merge, and sends trial task follow-up messages.
Out of Scope Changes check ✅ Passed All changes are scoped to the workflow automation requirements. Files added are workflow configuration and message templates directly tied to #1148 objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan for PR comments
  • Generate coding plan

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Ananta98 Ananta98 force-pushed the feature/github-action branch from 1b205a6 to 9334440 Compare March 3, 2026 13:52
@Ananta98 Ananta98 changed the title feat(workflow): add github action feat(workflow): add github action application job Mar 4, 2026
@Ananta98 Ananta98 changed the title feat(workflow): add github action application job feat(workflow): github action job application Mar 4, 2026
@Ananta98 Ananta98 force-pushed the feature/github-action branch from c4d6332 to c6ac295 Compare March 4, 2026 12:50
@Ananta98
Copy link
Contributor Author

Ananta98 commented Mar 4, 2026

Progress:
image
image

@Ananta98 Ananta98 force-pushed the feature/github-action branch from a561d05 to 17cc661 Compare March 4, 2026 14:10
@Ananta98 Ananta98 force-pushed the feature/github-action branch from 17cc661 to 0d62012 Compare March 4, 2026 14:15
@Ananta98 Ananta98 marked this pull request as ready for review March 4, 2026 14:16
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7ff91eb and 0d62012.

📒 Files selected for processing (1)
  • .github/workflows/application-flow.yml

@holdex
Copy link

holdex bot commented Mar 4, 2026

Time Submission Status

Member Status Time Action Last Update
Ananta98 ✅ Submitted 9h Update time Mar 12, 2026, 1:35 PM
zolotokrylin ✅ Submitted 20min Update time Mar 12, 2026, 1:34 PM
georgeciubotaru ✅ Submitted 5min Update time Mar 12, 2026, 1:37 PM

You can submit time with the command. Example:

@holdex pr submit-time 15m

See available commands to help comply with our Guidelines.

@Ananta98 Ananta98 marked this pull request as draft March 4, 2026 14:30
@Ananta98 Ananta98 marked this pull request as ready for review March 4, 2026 14:37
@tiffmyaaw tiffmyaaw requested a review from zolotokrylin March 4, 2026 17:18
@Ananta98 Ananta98 marked this pull request as draft March 5, 2026 04:01
@Ananta98 Ananta98 marked this pull request as draft March 5, 2026 04:01
@Ananta98
Copy link
Contributor Author

Ananta98 commented Mar 5, 2026

I will refine solution based on code rabbit suggestions. fix this night in WIB time.

@Ananta98
Copy link
Contributor Author

Ananta98 commented Mar 5, 2026

Progress resolves based on coderabbit suggestion
image

@Ananta98 Ananta98 marked this pull request as ready for review March 5, 2026 12:42
Copy link
Member

@zolotokrylin zolotokrylin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rejecting because of the PR title. Please refer to our PR Naming guidelines.

@zolotokrylin
Copy link
Member

@holdex pr submit-time 20m

@Ananta98 Ananta98 marked this pull request as draft March 6, 2026 04:13
@Ananta98 Ananta98 changed the title feat(workflow): github action job application feat(workflow): automate trial task assignment workflow Mar 6, 2026
@Ananta98 Ananta98 changed the title feat(workflow): automate trial task assignment workflow feat(workflow): follow up trial task assignment automatically Mar 6, 2026
@Ananta98 Ananta98 marked this pull request as ready for review March 6, 2026 13:11
@Ananta98
Copy link
Contributor Author

Ananta98 commented Mar 6, 2026

@zolotokrylin ready to review
image

@Ananta98 Ananta98 requested a review from zolotokrylin March 6, 2026 13:12
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between e91ee89 and c454c04.

📒 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

@Ananta98 Ananta98 marked this pull request as draft March 6, 2026 13:23
@Ananta98
Copy link
Contributor Author

Ananta98 commented Mar 6, 2026

Sorry still fix issue number

@Ananta98 Ananta98 marked this pull request as ready for review March 6, 2026 13:33
@Ananta98
Copy link
Contributor Author

Ananta98 commented Mar 6, 2026

Ready to review @zolotokrylin now

@zolotokrylin zolotokrylin changed the title feat(workflow): follow up trial task assignment automatically feat(workflow): recieve trial task assignment automatically Mar 6, 2026
@zolotokrylin zolotokrylin changed the title feat(workflow): recieve trial task assignment automatically feat(workflow): recieve invitation for a trial task Mar 6, 2026
@zolotokrylin
Copy link
Member

How can I test it, @Ananta98 ?

@Ananta98
Copy link
Contributor Author

Ananta98 commented Mar 6, 2026

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

@Ananta98
Copy link
Contributor Author

Ananta98 commented Mar 7, 2026

Hi @zolotokrylin, how about the test for this PR?

@zolotokrylin
Copy link
Member

@georgeciubotaru, please review this PR. Thanks!

@Ananta98
Copy link
Contributor Author

Hi @georgeciubotaru how about the review for this PR? Thank you

@georgeciubotaru georgeciubotaru changed the title feat(workflow): recieve invitation for a trial task feat(workflow): receive invitation for a trial task Mar 12, 2026
Copy link
Contributor

@georgeciubotaru georgeciubotaru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my question

@Ananta98
Copy link
Contributor Author

Progress:
image
Result:
image
image

@Ananta98
Copy link
Contributor Author

@georgeciubotaru I've checked using mi it works. I more agree with you because we need to handle more edge cases

@georgeciubotaru
Copy link
Contributor

@holdex pr submit-time 5m

@georgeciubotaru georgeciubotaru merged commit d2baa1f into holdex:main Mar 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem: trial task assignment requires manual follow up

3 participants