Merge remote-tracking branch 'origin/trunk' into issue703

This commit is contained in:
nate smith 2022-01-20 12:11:26 -06:00
commit 44f9d03a85
303 changed files with 18460 additions and 4062 deletions

15
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types:
- version-update:semver-minor
- version-update:semver-major
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View file

@ -2,7 +2,11 @@ name: Code Scanning
on:
push:
branches: [trunk]
pull_request:
branches: [trunk]
paths-ignore:
- '**/*.md'
schedule:
- cron: "0 0 * * 0"

View file

@ -17,6 +17,15 @@ jobs:
- name: Check out code
uses: actions/checkout@v2
- name: Cache Go modules
uses: actions/cache@v2
with:
path: ~/go
key: ${{ runner.os }}-build-${{ hashFiles('go.mod') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Download dependencies
run: go mod download

19
.github/workflows/issueauto.yml vendored Normal file
View file

@ -0,0 +1,19 @@
name: Issue Automation
on:
issues:
types: [opened]
jobs:
issue-auto:
runs-on: ubuntu-latest
steps:
- name: label incoming issue
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.AUTOMATION_TOKEN }}
ISSUENUM: ${{ github.event.issue.number }}
ISSUEAUTHOR: ${{ github.event.issue.user.login }}
run: |
if ! gh api orgs/cli/public_members/$ISSUEAUTHOR --silent 2>/dev/null
then
gh issue edit $ISSUENUM --add-label "needs-triage"
fi

View file

@ -15,6 +15,7 @@ jobs:
PRNUM: ${{ github.event.pull_request.number }}
PRHEAD: ${{ github.event.pull_request.head.label }}
PRAUTHOR: ${{ github.event.pull_request.user.login }}
PR_AUTHOR_TYPE: ${{ github.event.pull_request.user.type }}
if: "!github.event.pull_request.draft"
run: |
commentPR () {
@ -42,8 +43,12 @@ jobs:
' -f colID="$(colID "Needs review")" -f prID="$PRID"
}
if gh api orgs/cli/public_members/$PRAUTHOR --silent 2>/dev/null
if [ "$PR_AUTHOR_TYPE" = "Bot" ] || gh api orgs/cli/public_members/$PRAUTHOR --silent 2>/dev/null
then
if [ "$PR_AUTHOR_TYPE" != "Bot" ]
then
gh pr edit $PRNUM --add-assignee $PRAUTHOR
fi
if ! errtext="$(addToBoard 2>&1)"
then
cat <<<"$errtext" >&2
@ -55,6 +60,8 @@ jobs:
exit 0
fi
gh pr edit $PRNUM --add-label "external"
if [ "$PRHEAD" = "cli:trunk" ]
then
closePR

View file

@ -16,10 +16,17 @@ jobs:
with:
go-version: 1.16
- name: Generate changelog
id: changelog
run: |
echo "GORELEASER_CURRENT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
git fetch --unshallow
script/changelog | tee CHANGELOG.md
echo "::set-output name=tag-name::${GITHUB_REF#refs/tags/}"
gh api repos/$GITHUB_REPOSITORY/releases/generate-notes \
-f tag_name="${GITHUB_REF#refs/tags/}" \
-f target_commitish=trunk \
-q .body > CHANGELOG.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install osslsigncode
run: sudo apt-get install -y osslsigncode
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
@ -27,13 +34,16 @@ jobs:
args: release --release-notes=CHANGELOG.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GORELEASER_CURRENT_TAG: ${{steps.changelog.outputs.tag-name}}
GITHUB_CERT_PASSWORD: ${{secrets.GITHUB_CERT_PASSWORD}}
DESKTOP_CERT_TOKEN: ${{secrets.DESKTOP_CERT_TOKEN}}
- name: Checkout documentation site
uses: actions/checkout@v2
with:
repository: github/cli.github.com
path: site
fetch-depth: 0
token: ${{secrets.SITE_GITHUB_TOKEN}}
ssh-key: ${{secrets.SITE_SSH_KEY}}
- name: Update site man pages
env:
GIT_COMMITTER_NAME: cli automation
@ -55,7 +65,6 @@ jobs:
api-write --silent projects/columns/cards/$card/moves -f position=top -F column_id=$DONE_COLUMN
done
echo "moved ${#cards[@]} cards to the Done column"
- name: Install packaging dependencies
run: sudo apt-get install -y rpm reprepro
- name: Set up GPG