Skip to content

Commit

Permalink
Merge branch 'gh-pages' of github.com:emeryberger/CSrankings into gh-…
Browse files Browse the repository at this point in the history
…pages

* 'gh-pages' of github.com:emeryberger/CSrankings: (800 commits)
  Update University of Texas at Dallas (#8042)
  Update csrankings-m.csv (#8039)
  Update Stony Brook University (#8033)
  Update Univ. of California - Riverside (#8032)
  Updates.
  Updated DBLP.
  Update csrankings-l.csv (#8037)
  Added Technion CS faculty (removed faculty from other departments) (#8035)
  Update University of Southern California (#8029)
  Add new Universidade de Lisboa faculty member (#7549)
  Updated Emory CS (#7776)
  Updates.
  Update University of Chicago (#7983)
  Update Brown University (#7982)
  Update Duke University (#8004)
  Add 4 new TTU CS Faulty in Fall 2024 (#7867)
  Multiple updates to Oregon State University (#7751)
  Update Zhejiang University Members (#7925)
  Update faculty at RIT (#7916)
  Added new CS faculty at Shandong University (#7801)
  ...

# Conflicts:
#	csrankings-x.csv
  • Loading branch information
ChristopherLu committed Nov 25, 2024
2 parents 12a1ae6 + 01ef20e commit ba3e824
Show file tree
Hide file tree
Showing 66 changed files with 56,729 additions and 16,048 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/commit_validation.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Commit Validation

on:
push:

pull_request:

permissions: read-all

jobs:
commit_validation:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -35,5 +35,20 @@ jobs:
env:
DIFF: ${{ steps.git-diff-action.outputs.json-diff-path }}
run: |
pip install -r requirements.txt
python validate_commit.py $DIFF
upload:
runs-on: ubuntu-latest

steps:
- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number.txt
- uses: actions/upload-artifact@v4
with:
name: pr_number.txt
path: pr/
72 changes: 72 additions & 0 deletions .github/workflows/handle_validation_result.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Handle Validation Result

on:
workflow_run:
workflows: ["Commit Validation"]
types: [completed]

permissions:
actions: read
contents: read
issues: write
pull-requests: write
# needed because gh cli fetches unnecessary extra data
repository-projects: read

jobs:
handle-validation-result:
runs-on: ubuntu-latest
steps:
- name: 'Download PR number artifact'
uses: actions/github-script@v6
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr_number.txt"
})[0];
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr_number.zip`, Buffer.from(download.data));
- name: 'Unzip artifact'
run: unzip pr_number.zip

- name: Mark unstale if success
if: ${{ github.event.workflow_run.conclusion == 'success' }}
run: |
export PR_NUMBER=$(cat pr_number.txt)
echo "In repo $GH_REPO on PR $PR_NUMBER"
if gh pr view -R"$GH_REPO" "$PR_NUMBER" --json labels | grep stale ; then
echo "No longer stale"
gh pr edit -R"$GH_REPO" "$PR_NUMBER" --remove-label stale
gh pr comment -R"$GH_REPO" "$PR_NUMBER" --body 'The validity checks are now passing. Thank you.'
else
echo "Was already not stale"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.event.repository.full_name }}

- name: Make comment and mark stale if failed
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
run: |
export PR_NUMBER=$(cat pr_number.txt)
echo "In repo $GH_REPO on PR $PR_NUMBER"
echo "Mark as stale"
gh pr edit -R"$GH_REPO" "$PR_NUMBER" --add-label stale
gh pr comment -R"$GH_REPO" "$PR_NUMBER" --body 'The validity checks failed. Please look at the logs (click the red X) and correct the errors. Your PR will be closed automatically in 2 days if not fixed.'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.event.repository.full_name }}
26 changes: 26 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Close stale PRs'

on:
workflow_dispatch:

schedule:
- cron: '30 1 * * *'

permissions:
contents: read
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-pr-label: 'stale'
stale-pr-message: 'This PR is stale because it has been open for 90 days with no activity. It will be closed in 2 days if there is no further activity.'
close-pr-message: 'This PR is being closed due to inactivity.'
days-before-pr-stale: 90
days-before-pr-close: 2
days-before-issue-stale: -1
days-before-issue-close: -1
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ faculty-affiliations.csv homepages.csv scholar.csv csrankings.csv: csrankings-*.
clean-csrankings:
@echo "Cleaning."
@$(PYTHON) util/clean-csrankings.py
@$(PYTHON) util/sort-csv-files.py
@echo "Done."

home-pages: faculty-affiliations.csv homepages.csv
Expand Down
Loading

0 comments on commit ba3e824

Please sign in to comment.