Skip to content

[FEATURE] Exasol integration #194

[FEATURE] Exasol integration

[FEATURE] Exasol integration #194

Workflow file for this run

---
# Enables issue-claiming via comment commands (/assign-me, /unassign-me, /assign
# @user, /unassign @user) and automatically releases claims that have gone
# stale so issues don't sit locked to an inactive assignee.
#
# Reference: https://github.com/takanome-dev/assign-issue-action
name: Assign Issue
on:
schedule:
- cron: "0 6 * * *" # Runs daily; drives automatic unassignment/reminders
issue_comment:
types: [created]
workflow_dispatch:
jobs:
assign:
# Always run for scheduled/manual triggers. For comment triggers, only run
# when the comment plausibly contains an assign/unassign command, so we
# don't invoke the action on every unrelated issue comment in the repo.
if: >-
github.event_name != 'issue_comment' ||
contains(github.event.comment.body, '/assign') ||
contains(github.event.comment.body, '/unassign')
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Assign or unassign issue
uses: takanome-dev/assign-issue-action@c7086b052ac0039e7192085e82de2f9d74080f0b # v3.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
maintainers: 'joshua-stauffer'
required_label: 'ready-for-work'
assigned_label: 'claimed'
pin_label: 'pinned'
days_until_unassign: 7
enable_reminder: true
reminder_days: auto
allow_self_assign_author: false
enable_auto_suggestion: true
max_assignments: 3
block_assignment: true
# Override the action's default newcomer-welcome text: it links
# CONTRIBUTING.md with a relative path, which resolves to the
# issue's own URL instead of the repo file when rendered in an
# issue comment. Use an absolute link instead.
assigned_newcomer_text: |
### πŸŽ‰ Welcome to the Project!
Hey @{{ handle }}, thank you for your interest in this issue! 🎊
We're excited to have you on board. Start by exploring our [Contributing guidelines](https://github.com/fivetran/great_expectations/blob/develop/CONTRIBUTING.md) and set up your local development workspace by following the steps in our documentation to get started smoothly.
> [!IMPORTANT]
> This issue will be automatically unassigned if idle for **{{ total_days }} days**.
<details>
<summary>ℹ️ Helpful resources for first-time contributors</summary>
- Check out the project's README for setup instructions
- Read through the codebase documentation if available
- Don't hesitate to ask questions here on GitHub
- Please open a (draft) pull request early to show the direction you're heading towards
</details>
<details>
<summary>πŸ“‹ Assignment details</summary>
- To prevent automatic unassignment, a maintainer can add the **{{{ pin_label }}}** label
- You can unassign yourself at any time by commenting with `/unassign-me`
- Updates and status reports are encouraged to show progress
</details>
Happy coding! πŸš€
# The assignment action above silently declines a `/assign-me` self-claim
# when the issue lacks the `ready-for-work` label β€” it posts no comment,
# so the contributor gets no explanation. Close that gap with a friendly
# note that says why the claim didn't take and points to the issues that
# are actually open for claiming. Only fires for self-claims on open
# issues that are missing the label; maintainer `/assign @user` and
# already-ready issues are unaffected.
- name: Explain why a not-ready issue can't be self-claimed
if: >-
github.event_name == 'issue_comment' &&
github.event.issue.state == 'open' &&
contains(github.event.comment.body, '/assign-me') &&
!contains(github.event.issue.labels.*.name, 'ready-for-work')
uses: actions/github-script@v7
with:
script: |
// Hidden marker so we can recognize our own note and avoid
// re-posting it every time a contributor re-comments `/assign-me`
// on the same not-ready issue (the event fires on each comment).
const MARKER = '<!-- assign-me:not-ready-for-work -->';
const issue_number = context.payload.issue.number;
const handle = context.payload.comment.user.login;
// Skip if we already left this note on the issue within the last
// day, mirroring the assignment action's own anti-spam window.
const since = new Date(Date.now() - 24 * 60 * 60 * 1000);
const recent = await github.paginate(github.rest.issues.listComments, {
owner: context.repo.owner,
repo: context.repo.repo,
issue_number,
since: since.toISOString(),
per_page: 100,
});
if (recent.some((c) => c.body && c.body.includes(MARKER))) {
core.info(`Already explained on issue #${issue_number} recently; skipping.`);
return;
}
const readyUrl =
'https://github.com/fivetran/great_expectations/issues' +
'?q=is%3Aopen+label%3Aready-for-work+-label%3Aclaimed';
const body = [
`Thanks for your interest, @${handle}! πŸ™Œ`,
'',
"This issue isn't marked **`ready-for-work`** yet, so it can't be " +
'self-claimed right now. Issues get that label once they have been ' +
'triaged and are ready for a contributor to pick up.',
'',
`πŸ‘‰ **[Browse issues that are ready to claim](${readyUrl})** ` +
'(open, `ready-for-work`, and not already claimed).',
'',
'Find one that interests you and comment `/assign-me` on it to claim it. ' +
'Happy contributing! πŸš€',
'',
MARKER,
].join('\n');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number,
body,
});
core.info(`Posted not-ready explanation on issue #${issue_number}.`);