-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes: - Check for broken links in documentation (#700) - Support macOS `arm64` installs via Homebrew (#798) - Validate installers before publishing (#813) - Auto-generate maintainer away notification issues (#842) - Install dotnet via Jammy feeds on Ubuntu 22.04 and greater (#839) - Access Azure storage account using service principle credentials (#851) - Update documentation to use reference-style links (#680) - Unify documentation line length (#862) - Add generic username/password UI (#871) - Bitbucket DC OAuth support (#607) - Distribute GCM as a dotnet tool (#886) - Drop `-core` suffix from entry executable #551 - Speed up build graph (#924)
- Loading branch information
Showing
166 changed files
with
5,286 additions
and
1,558 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: maintainer-absence | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
startDate: | ||
description: 'First day of maintainer absence [mm-dd-yyyy]' | ||
required: true | ||
endDate: | ||
description: 'Last day of maintainer absence [mm-dd-yyyy]' | ||
required: true | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
create-issue: | ||
name: create-issue | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const startDate = new Date('${{ github.event.inputs.startDate }}'); | ||
const endDate = new Date('${{ github.event.inputs.endDate }}'); | ||
if (startDate > endDate) { | ||
throw 'Start date cannot be later than end date.'; | ||
} | ||
// Calculate total days of absence | ||
const differenceInDays = endDate.getTime() - startDate.getTime(); | ||
const lengthOfAbsence = differenceInDays/(1000 * 3600 * 24); | ||
// Create issue | ||
issue = await github.rest.issues.create({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
// Use the briefer input date format in title (instead of JavaScript's full date string) | ||
title: `Maintainer(s) will be away from ${{ github.event.inputs.startDate }} until ${{ github.event.inputs.endDate }}`, | ||
body: `The ${context.repo.repo} maintainer(s) will be away for ${lengthOfAbsence} day${lengthOfAbsence > 1 ? 's' : ''} beginning on | ||
${startDate.toDateString()} and ending on ${endDate.toDateString()}. During this time, the maintainer(s) | ||
will not be actively monitoring PRs, discussions, etc. Please report any issues | ||
requiring immediate attention to [@GitCredManager](https://twitter.com/GitCredManager) on Twitter.` | ||
}); | ||
// Pin issue - we use GraphQL since there is no GitHub API available for this | ||
const mutation = `mutation($issueId: ID!) { | ||
pinIssue(input: { issueId: $issueId }) { | ||
issue { | ||
repository { | ||
id | ||
} | ||
} | ||
} | ||
}`; | ||
const variables = { | ||
issueId: issue.data.node_id | ||
} | ||
const result = await github.graphql(mutation, variables) |
This file contains 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
Oops, something went wrong.