-
Notifications
You must be signed in to change notification settings - Fork 154
docs: add maintainers and public roadmap #1167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e010e8a
docs: added maintainers handbook page
dreamorosi ced516a
docs: added maintainers handbook page
dreamorosi 6e3a149
docs: update mkdocs & nav
dreamorosi 0f1dbdd
docs: updated toc
dreamorosi 48e4a6c
chore: update gh-issue templates
dreamorosi 0f2aa15
docs: update notes about languages
dreamorosi f906036
docs: update label
dreamorosi fa68ba1
chore: update stalebot + removed autoassign bot
dreamorosi 552fd83
chore: update labels in scripts
dreamorosi 5c5b5db
docs: updates to maintainers & labels
dreamorosi c286066
fix: label name
dreamorosi 545b2b0
fix: label name
dreamorosi 856f6d8
Update .github/stale.yml
dreamorosi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
const { LABEL_PENDING_RELEASE, LABEL_RELEASED } = require("./constants"); | ||
|
||
/** | ||
* Fetch issues using GitHub REST API | ||
* | ||
* @param {object} gh_client - Pre-authenticated REST client (Octokit) | ||
* @param {string} org - GitHub Organization | ||
* @param {string} repository - GitHub repository | ||
* @param {string} state - GitHub issue state (open, closed) | ||
* @param {string} label - Comma-separated issue labels to fetch | ||
* @return {Object[]} issues - Array of issues matching params | ||
* @see {@link https://octokit.github.io/rest.js/v18#usage|Octokit client} | ||
*/ | ||
|
||
const fetchIssues = async ({ | ||
gh_client, | ||
org, | ||
repository, | ||
state = "all", | ||
label = LABEL_PENDING_RELEASE, | ||
}) => { | ||
try { | ||
const { data: issues } = await gh_client.rest.issues.listForRepo({ | ||
owner: org, | ||
repo: repository, | ||
state: state, | ||
labels: label, | ||
}); | ||
|
||
return issues; | ||
} catch (error) { | ||
console.error(error); | ||
throw new Error("Failed to fetch issues"); | ||
} | ||
|
||
}; | ||
|
||
/** | ||
* Notify new release and close staged GitHub issue | ||
* | ||
* @param {object} gh_client - Pre-authenticated REST client (Octokit) | ||
* @param {string} owner - GitHub Organization | ||
* @param {string} repository - GitHub repository | ||
* @param {string} release_version - GitHub Release version | ||
* @see {@link https://octokit.github.io/rest.js/v18#usage|Octokit client} | ||
*/ | ||
|
||
const notifyRelease = async ({ | ||
gh_client, | ||
owner, | ||
repository, | ||
release_version, | ||
}) => { | ||
const release_url = `https://github.com/${owner}/${repository}/releases/tag/v${release_version}`; | ||
|
||
const issues = await fetchIssues({ | ||
gh_client: gh_client, | ||
org: owner, | ||
repository: repository, | ||
}); | ||
|
||
issues.forEach(async (issue) => { | ||
console.info(`Updating issue number ${issue.number}`); | ||
|
||
const comment = `This is now released under [${release_version}](${release_url}) version!`; | ||
try { | ||
await gh_client.rest.issues.createComment({ | ||
owner: owner, | ||
repo: repository, | ||
body: comment, | ||
issue_number: issue.number, | ||
}); | ||
} catch (error) { | ||
console.error(error); | ||
throw new Error(`Failed to update issue ${issue.number} about ${release_version} release`) | ||
} | ||
|
||
|
||
// Close issue and remove staged label; keep existing ones | ||
const labels = issue.labels | ||
.filter((label) => label.name != LABEL_PENDING_RELEASE) | ||
.map((label) => label.name); | ||
|
||
try { | ||
await gh_client.rest.issues.update({ | ||
repo: repository, | ||
owner: owner, | ||
issue_number: issue.number, | ||
state: "closed", | ||
labels: [...labels, LABEL_RELEASED], | ||
}); | ||
} catch (error) { | ||
console.error(error); | ||
throw new Error("Failed to close issue") | ||
} | ||
|
||
console.info(`Issue number ${issue.number} closed and updated`); | ||
}); | ||
}; | ||
|
||
// context: https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts | ||
|
||
module.exports = async ({ github, context }) => { | ||
const { RELEASE_VERSION } = process.env; | ||
console.log(`Running post-release script for ${RELEASE_VERSION} version`); | ||
|
||
await notifyRelease({ | ||
gh_client: github, | ||
owner: context.repo.owner, | ||
repository: context.repo.repo, | ||
release_version: RELEASE_VERSION, | ||
}); | ||
}; |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(non-blocking)
While I love the automation, I'm a bit concerned if we could close the issue unexpectedly?
(e.g. an issue with multiple PR and a lot of on going work like a feature request)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can reopen those issues if needed.
The idea is that if there's a "big feature issue" like Idempotency, we should have smaller issues for each one of the work streams, and each PR should correspond to one of these issues, not the main bigger one.
What do you think about trying this out and , if it doesn't work or becomes a hassle, remove it in a few weeks?