Skip to content

Commit

Permalink
Update check_application_document.yml (#2122)
Browse files Browse the repository at this point in the history
  • Loading branch information
semuelle authored Nov 21, 2023
1 parent 54c041c commit 9979c1f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 24 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/check_application_document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,6 @@ on:
types: [opened, synchronize]

jobs:
discussion_private:
if: |
github.event.action == 'opened' &&
contains(github.event.pull_request.body, 'Project Abstract') && (
!contains(github.event.pull_request.body, '- [ ] I prefer the discussion') ||
(
contains(github.event.pull_request.body, '- [ ] I prefer the discussion') &&
!contains(github.event.pull_request.body, '@_______:matrix.org')
)
)
runs-on: ubuntu-latest
steps:
- name: Add 'discussion private' label if the application is private
uses: actions/github-script@v6
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["discussion private"]
})
get_filename:
if: contains(github.event.pull_request.body, 'Project Abstract')
runs-on: ubuntu-latest
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/private-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check for private discussion

on:
workflow_dispatch:
pull_request:
types: [opened, edited]

jobs:
discussion_private:
if: |
contains(github.event.pull_request.body, 'Project Abstract') && (
!contains(github.event.pull_request.body, '- [ ] I prefer the discussion') ||
(
contains(github.event.pull_request.body, '- [ ] I prefer the discussion') &&
!contains(github.event.pull_request.body, '@_______:matrix.org')
)
)
runs-on: ubuntu-latest
steps:
- name: Add 'discussion private' label if the application is private
uses: actions/github-script@v6
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["discussion private"]
})

0 comments on commit 9979c1f

Please sign in to comment.