8000 Create pr.yaml · github/CodeSearchNet@45eec62 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 11, 2023. It is now read-only.

Commit 45eec62

Browse files
author
Hamel Husain
authored
Create pr.yaml
1 parent dbb2e64 commit 45eec62

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/pr.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Benchmark Greeting
2+
on: pull_request
3+
types: [opened]
4+
5+
# split into two jobs so it runs in parallel, even if a little redundant
6+
jobs:
7+
make_comment:
8+
if: contains(github.event.pull_request.body, 'This pull request represents a submission to the codesearchnet benchmark.')
9+
runs-on: ubuntu-latest
10+
steps:
11+
12+
- name: Build Test Container
13+
run: |
14+
URI=https://api.github.com
15+
API_VERSION=v3
16+
API_HEADER="Accept: application/vnd.github.${API_VERSION}+json"
17+
AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"
18+
MESSAGE="@${USER} Thank you for your benchmark submission! Can you please tell us a little bit about your approach and how you trained your models etc? What modifications, if any did you make on the baseline models provided in this repository? Thanks!"
19+
# Create a comment with APIv3 # POST /repos/:owner/:repo/issues/:issue_number/comments
20+
curl -XPOST -sSL \
21+
-d "{\"body\": \"$MESSAGE\"}" \
22+
-H "${AUTH_HEADER}" \
23+
-H "${API_HEADER}" \
24+
"${URI}/repos/${GITHUB_REPOSITORY}/issues/${ISSUE_NUMBER}/comments"
25+
env:
26+
USER: ${{ github.event.pull_request.user.login }}
27+
ISSUE_NUMBER: ${{ github.event.pull_request.number }}
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)
0