[Nomination] Nour Majdoub #278
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
| name: "Auto-Comment on Nomination Issues" | |
| on: | |
| issues: | |
| types: [opened] | |
| jobs: | |
| comment-on-issue: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Add Welcome Comment Based on Program | |
| uses: actions/github-script@v6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const issue = context.payload.issue; | |
| const labels = issue.labels.map(label => label.name.toLowerCase()); | |
| const issueNumber = issue.number; | |
| const repoOwner = context.repo.owner; | |
| const repoName = context.repo.repo; | |
| let programName = "PyTorch Foundation Program"; | |
| let programDocs = "https://github.com/pytorch-fdn/foundation-programs"; | |
| let commentBody = ""; | |
| if (labels.includes("ambassador")) { | |
| programName = "PyTorch Ambassador Program"; | |
| programDocs = "https://github.com/pytorch-fdn/ambassador-program/blob/main/README.md"; | |
| commentBody = [ | |
| `π Thank you for submitting a nomination for the **${programName}**! π`, | |
| "", | |
| "Your nomination is currently under review. A team member will evaluate the submission and update the status accordingly.", | |
| "", | |
| "πΉ **Review Process & Next Steps:**", | |
| "1οΈβ£ Initial Review β The nomination will be reviewed by the team.", | |
| "2οΈβ£ Scoring & Selection β Reviewers will assign scores based on eligibility and impact.", | |
| "3οΈβ£ One-on-One Review β If shortlisted, the nominee will have a session with the Executive Director.", | |
| "4οΈβ£ Final Decision β Selected ambassadors will receive an **official invitation**. β ", | |
| "", | |
| `π Program Details: [View Documentation](${programDocs})`, | |
| "", | |
| "π¬ Have questions? Please submit a [Feedback or Inquiry](https://github.com/pytorch-fdn/foundation-initiative/issues/new?template=feedback.yml) and reference this nomination issue number.", | |
| "", | |
| "Thank you for helping grow the PyTorch community! π" | |
| ].join("\n\n"); | |
| } else if (labels.includes("speakers-bureau")) { | |
| programName = "Speakers Bureau Program"; | |
| programDocs = "https://github.com/pytorch-fdn/foundation-programs/blob/main/speakers-bureau/README.md"; | |
| commentBody = [ | |
| `π Thank you for submitting a nomination for the **${programName}**! π€`, | |
| "", | |
| "Your nomination is currently being reviewed. A team member will evaluate the speakerβs background, proposed topics, and fit for upcoming events.", | |
| "", | |
| `π Program Details: [View Documentation](${programDocs})`, | |
| "", | |
| "π¬ Have questions? Please submit a [Feedback or Inquiry](https://github.com/pytorch-fdn/foundation-initiative/issues/new?template=feedback.yml) and reference this issue.", | |
| "", | |
| "We appreciate your effort to support PyTorch education and visibility worldwide! π" | |
| ].join("\n\n"); | |
| } else if (labels.includes("ospo-outreach")) { | |
| programName = "OSPO Outreach Program"; | |
| programDocs = "https://github.com/pytorch-fdn/foundation-programs/blob/main/ospo-outreach/README.md"; | |
| commentBody = [ | |
| `π Thank you for your submission to the **${programName}**! π§ͺ`, | |
| "", | |
| "Your outreach proposal is under review. The team will evaluate the research goals, scope, and alignment with PyTorch Foundation priorities.", | |
| "", | |
| `π Program Details: [View Documentation](${programDocs})`, | |
| "", | |
| "π¬ Have questions? Please submit a [Feedback or Inquiry](https://github.com/pytorch-fdn/foundation-initiative/issues/new?template=feedback.yml) and reference this issue.", | |
| "", | |
| "Thank you for advancing open-source AI and ML innovation with us! π€" | |
| ].join("\n\n"); | |
| } else { | |
| commentBody = [ | |
| `π Thank you for submitting to the **${programName}**!`, | |
| "", | |
| `Your submission is under review. Please refer to our [documentation](${programDocs}) for next steps.`, | |
| "", | |
| "If you have questions, submit a [Feedback Issue](https://github.com/pytorch-fdn/foundation-initiative/issues/new?template=feedback.yml) and include this issue number." | |
| ].join("\n\n"); | |
| } | |
| await github.rest.issues.createComment({ | |
| owner: repoOwner, | |
| repo: repoName, | |
| issue_number: issueNumber, | |
| body: commentBody | |
| }); |