Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/conference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,41 @@ jobs:
labels: |
report
automated pr
add_comment:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ env.GITHUB_TOKEN }}

- name: Setup Python environment
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install dependencies
run: pip install PyGithub PyYAML pre-commit

- name: Run script
env:
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
run: |
python _conferences
pre-commit run --all-files --show-diff-on-failure

- name: Add comment to the issue
uses: actions/github-script@v6
if: ${{ github.event.issue.user.type == 'User' && startsWith(github.event.issue.title, '[CONFERENCE]') && contains(github.event.issue.labels.*.name, 'conference') }} #adds comment only if the issue is created by a user
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issueNumber = context.payload.issue.number;
const comment = "Automated issue, no action is required."

github.issues.createComment({
...context.repo,
issue_number: issueNumber,
body: comment
});