Skip to content

Conversation

nitin-ramchandani
Copy link
Contributor

Adding workflow to trigger CoC analysis, post Lint workflow is successful.

CoC analysis validates the contribution yml files against the following areas:

  • Privacy (Personal Identifiable Information)
  • HAP (Hate, Abuse, Profanity)
  • Inappropriate Content (Adult, Illegal, Gambling)
  • Regulated Industries (Medical, Financial)

@github-actions github-actions bot added the ci label May 10, 2024
Signed-off-by: Nitin Ramchandani <nitin.ramchandani@ibm.com>
@jjasghar jjasghar merged commit 425b7a1 into instructlab:main May 10, 2024
pull_request_number=$(jq --raw-output '.workflow_run.pull_requests[0].number' "$GITHUB_EVENT_PATH")
github_org=$(echo ${{ github.repository }} | cut -d "/" -f 1)
repo_name=$(echo ${{ github.repository }} | cut -d "/" -f 2)
curl -X 'POST' "https://pr-analysis-handler.1fuhf5gskmng.us-east.codeengine.appdomain.cloud/analyze-pr?pr_number=${pull_request_number}&owner=${github_org}&repo=${repo_name}" -H 'accept: application/json' -H 'Authorization: Bearer ${{ secrets.COC_ANALYSIS_TOKEN }}' -d '' &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
curl -X 'POST' "https://pr-analysis-handler.1fuhf5gskmng.us-east.codeengine.appdomain.cloud/analyze-pr?pr_number=${pull_request_number}&owner=${github_org}&repo=${repo_name}" -H 'accept: application/json' -H 'Authorization: Bearer ${{ secrets.COC_ANALYSIS_TOKEN }}' -d '' &
curl -X 'POST' "https://pr-analysis-handler.1fuhf5gskmng.us-east.codeengine.appdomain.cloud/analyze-pr?pr_number=${{ github.event.workflow_run.pull_requests[0].number }}&owner=${{ github.event.organization }}&repo=${{ github.event.repository }}" -H 'accept: application/json' -H 'Authorization: Bearer ${{ secrets.COC_ANALYSIS_TOKEN }}' -d '' &

I think this is slightly cleaner as it does not require any shell commands.

See https://docs.github.com/en/webhooks/webhook-events-and-payloads#workflow_run

@@ -0,0 +1,21 @@
name: CoC violation analysis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: CoC violation analysis
# SPDX-License-Identifier: Apache-2.0
name: CoC violation analysis

workflows: [Lint]
types:
- completed
jobs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
jobs:
env:
LC_ALL: en_US.UTF-8
defaults:
run:
shell: bash
permissions:
contents: read
jobs:

Comment on lines +17 to +19
pull_request_number=$(jq --raw-output '.workflow_run.pull_requests[0].number' "$GITHUB_EVENT_PATH")
github_org=$(echo ${{ github.repository }} | cut -d "/" -f 1)
repo_name=$(echo ${{ github.repository }} | cut -d "/" -f 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pull_request_number=$(jq --raw-output '.workflow_run.pull_requests[0].number' "$GITHUB_EVENT_PATH")
github_org=$(echo ${{ github.repository }} | cut -d "/" -f 1)
repo_name=$(echo ${{ github.repository }} | cut -d "/" -f 2)

run-name: Running CoC violation analysis
on:
workflow_run:
workflows: [Lint]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
workflows: [Lint]
workflows:
- Lint

@bjhargrave
Copy link
Contributor

I guess this got merged before my review was complete. I'll make a new PR.

@jjasghar
Copy link
Member

Yep, we wanted to test this ASAP, so I went ahead and merged it. I had to put the SECRET in and all and the only way was to get it merged.

dal0643 pushed a commit to dal0643/taxonomy that referenced this pull request May 17, 2024
Adding workflow to trigger CoC analysis, post `Lint` workflow is
successful.

CoC analysis validates the contribution yml files against the following
areas:

- Privacy (Personal Identifiable Information)
- HAP (Hate, Abuse, Profanity)
- Inappropriate Content (Adult, Illegal, Gambling)
- Regulated Industries (Medical, Financial)

Signed-off-by: Nitin Ramchandani <nitin.ramchandani@ibm.com>
Signed-off-by: “David <dalowe@gmail.com>
reformanda pushed a commit to reformanda/taxonomy that referenced this pull request May 18, 2024
Adding workflow to trigger CoC analysis, post `Lint` workflow is
successful.

CoC analysis validates the contribution yml files against the following
areas:

- Privacy (Personal Identifiable Information)
- HAP (Hate, Abuse, Profanity)
- Inappropriate Content (Adult, Illegal, Gambling)
- Regulated Industries (Medical, Financial)

Signed-off-by: Nitin Ramchandani <nitin.ramchandani@ibm.com>
Signed-off-by: JDWilson <reformanda@users.noreply.github.com>
b4d pushed a commit to b4d/taxonomy that referenced this pull request May 24, 2024
Adding workflow to trigger CoC analysis, post `Lint` workflow is
successful.

CoC analysis validates the contribution yml files against the following
areas:

- Privacy (Personal Identifiable Information)
- HAP (Hate, Abuse, Profanity)
- Inappropriate Content (Adult, Illegal, Gambling)
- Regulated Industries (Medical, Financial)

Signed-off-by: Nitin Ramchandani <nitin.ramchandani@ibm.com>
Signed-off-by: b4d <b4d@sablun.org>
jjasghar pushed a commit to luke-inglis/taxonomy that referenced this pull request Jun 7, 2024
Adding workflow to trigger CoC analysis, post `Lint` workflow is
successful.

CoC analysis validates the contribution yml files against the following
areas:

- Privacy (Personal Identifiable Information)
- HAP (Hate, Abuse, Profanity)
- Inappropriate Content (Adult, Illegal, Gambling)
- Regulated Industries (Medical, Financial)

Signed-off-by: Nitin Ramchandani <nitin.ramchandani@ibm.com>
jjasghar pushed a commit to acidonper/taxonomy that referenced this pull request Jun 10, 2024
Adding workflow to trigger CoC analysis, post `Lint` workflow is
successful.

CoC analysis validates the contribution yml files against the following
areas:

- Privacy (Personal Identifiable Information)
- HAP (Hate, Abuse, Profanity)
- Inappropriate Content (Adult, Illegal, Gambling)
- Regulated Industries (Medical, Financial)

Signed-off-by: Nitin Ramchandani <nitin.ramchandani@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants