Index: .github/workflows/closed-issues.yml =================================================================== --- .github/workflows/closed-issues.yml +++ .github/workflows/closed-issues.yml @@ -10,4 +10,4 @@ steps: - uses: andymckay/labeler@1.0.4 with: - remove-labels: "awaiting-review" \ No newline at end of file + remove-labels: 'awaiting-review' Index: .github/workflows/issue-release-workflow.yml =================================================================== --- .github/workflows/issue-release-workflow.yml +++ .github/workflows/issue-release-workflow.yml @@ -4,7 +4,7 @@ # /cherry-pick <...> # # This comment will attempt to cherry-pick the given commits to the latest -# release branch (release/Y.x) and if successful push the result to a branch +# release branch (release/Y.x) and if successful, push the result to a branch # on github. # # /branch // @@ -31,9 +31,9 @@ name: Backport Commits runs-on: ubuntu-20.04 if: >- - (github.repository == 'llvm/llvm-project') && - !startswith(github.event.comment.body, '') && - contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick') + (github.repository == 'llvm/llvm-project') && + !startswith(github.event.comment.body, '') && + contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick') steps: - name: Fetch LLVM sources uses: actions/checkout@v2 @@ -64,16 +64,16 @@ name: Create Pull Request runs-on: ubuntu-20.04 if: >- - (github.repository == 'llvm/llvm-project') && - !startswith(github.event.comment.body, '') && - contains(github.event.comment.body, '/branch') + (github.repository == 'llvm/llvm-project') && + !startswith(github.event.comment.body, '') && + contains(github.event.comment.body, '/branch') steps: - name: Fetch LLVM sources uses: actions/checkout@v2 - name: Setup Environment - run: | + run: | pip install -r ./llvm/utils/git/requirements.txt - name: Create Pull Request Index: .github/workflows/issue-subscriber.yml =================================================================== --- .github/workflows/issue-subscriber.yml +++ .github/workflows/issue-subscriber.yml @@ -10,20 +10,20 @@ runs-on: ubuntu-latest if: github.repository == 'llvm/llvm-project' steps: - - name: Setup Automation Script - run: | - curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/github-automation.py - curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/requirements.txt - chmod a+x github-automation.py - pip install -r requirements.txt + - name: Setup Automation Script + run: | + curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/github-automation.py + curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/requirements.txt + chmod a+x github-automation.py + pip install -r requirements.txt - - name: Update watchers - # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable - env: - LABEL_NAME: ${{ github.event.label.name }} - run: | - ./github-automation.py \ - --token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \ - issue-subscriber \ - --issue-number '${{ github.event.issue.number }}' \ - --label-name "$LABEL_NAME" + - name: Update watchers + # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable + env: + LABEL_NAME: ${{ github.event.label.name }} + run: | + ./github-automation.py \ + --token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \ + issue-subscriber \ + --issue-number '${{ github.event.issue.number }}' \ + --label-name "$LABEL_NAME" Index: .github/workflows/llvm-bugs.yml =================================================================== --- .github/workflows/llvm-bugs.yml +++ .github/workflows/llvm-bugs.yml @@ -19,39 +19,39 @@ MAILGUN_API_KEY: ${{ secrets.LLVM_BUGS_KEY }} with: script: | - const Mailgun = require("mailgun.js"); + const Mailgun = require('mailgun.js'); const formData = require('form-data'); - const mailgun = new Mailgun(formData); - const DOMAIN = "email.llvm.org"; + const mailgun = new Mailgun(formData); + const DOMAIN = 'email.llvm.org'; - const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY}); + const mg = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY }); github.rest.issues.get({ issue_number: context.issue.number, owner: context.repo.owner, - repo: context.repo.repo, + repo: context.repo.repo }) - .then(function(issue) { + .then((issue) => { const payload = { author : issue.data.user.login, issue : issue.data.number, title : issue.data.title, url : issue.data.html_url, - labels : issue.data.labels.map(label => { return label.name }), - assignee : issue.data.assignees.map(assignee => { return assignee.login }), + labels : issue.data.labels.map((label) => label.name), + assignee : issue.data.assignees.map((assignee) => assignee.login), body : issue.data.body }; - + const data = { - from: "LLVM Bugs ", - to: "llvm-bugs@lists.llvm.org", + from: 'LLVM Bugs ', + to: 'llvm-bugs@lists.llvm.org', subject: `[Bug ${issue.data.number}] ${issue.data.title}`, - template: "new-github-issue", + template: 'new-github-issue', 'o:tracking-clicks': 'no', 'h:X-Mailgun-Variables': JSON.stringify(payload) }; - return mg.messages.create(DOMAIN, data) + return mg.messages.create(DOMAIN, data); }) - .then(msg => console.log(msg)); + .then((msg) => console.log(msg)); Index: .github/workflows/new-issues.yml =================================================================== --- .github/workflows/new-issues.yml +++ .github/workflows/new-issues.yml @@ -10,5 +10,5 @@ steps: - uses: andymckay/labeler@1.0.4 with: - add-labels: "new issue" + add-labels: 'new issue' ignore-if-labeled: true