Export - Error appears when exporting report to Campfire #1167623
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ProposalPolice™ - Issue Comment Workflow | |
| on: | |
| issue_comment: | |
| types: [created, edited] | |
| concurrency: | |
| # Serializes runs per-issue so two comments posted close together can't each create their own | |
| # OpenAI Conversation for duplicate-check, splitting an issue's duplicate-detection history in two. | |
| group: proposal-police-${{ github.event.issue.number }} | |
| cancel-in-progress: false | |
| queue: max | |
| jobs: | |
| proposal-police-workflow: | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| if: '!contains(fromJSON(''["OSBotify", "imgbot[bot]", "melvin-bot[bot]", "codecov[bot]"]''), github.actor) && !contains(github.event.issue.assignees.*.login, github.event.comment.user.login)' | |
| steps: | |
| # A content-free job claim is acceptable from approved contributors and partner engineers, but is spam | |
| # from everyone else. author_association is not enough for concealed members, so verify team membership | |
| # with the read:org token. Partner affiliation is accepted only when the commenter explicitly states it. | |
| - name: Check whether the commenter is an approved contributor or partner | |
| id: commenterTrust | |
| env: | |
| # Passed through the environment rather than interpolated into the script, so crafted values can't inject shell. | |
| COMMENTER: ${{ github.event.comment.user.login }} | |
| COMMENT_BODY: ${{ github.event.comment.body }} | |
| GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} | |
| run: | | |
| TRUSTED=false | |
| for TEAM in expensify-expensify contributor-plus contributor-plus-backend; do | |
| if OUTPUT=$(gh api "/orgs/Expensify/teams/${TEAM}/memberships/${COMMENTER}" --silent 2>&1); then | |
| TRUSTED=true | |
| break | |
| elif [[ "$OUTPUT" != *'(HTTP 404)'* ]]; then | |
| echo "::warning::Could not verify ${COMMENTER}'s ${TEAM} membership: ${OUTPUT}" | |
| fi | |
| done | |
| shopt -s nocasematch | |
| if [[ "$COMMENT_BODY" =~ (^|[[:space:]])from[[:space:]]+(Callstack|Margelo|Software[[:space:]]?Mansion)([^[:alnum:]_]|$) ]]; then | |
| TRUSTED=true | |
| fi | |
| echo "TRUSTED=${TRUSTED}" >> "$GITHUB_OUTPUT" | |
| - uses: useblacksmith/checkout@0647fdbab2614a5eb86d2971070e325060d91056 # v1.7.0 | |
| # Classifies new comments that don't follow the proposal template, detects duplicate proposals, | |
| # and grades edits to existing proposals. Action type logic can be found in the script files. | |
| - name: Run ProposalPolice™ Comment Check Script | |
| uses: ./.github/actions/javascript/proposalPoliceComment | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PROPOSAL_POLICE_API_KEY: ${{ secrets.PROPOSAL_POLICE_API_KEY }} | |
| IS_TRUSTED_COMMENTER: ${{ steps.commenterTrust.outputs.TRUSTED }} |